/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    text-align: center;
    background-color: #f0f0f0;
}

h1 {
    color: #333;
}


/* ============================================================
   AUTH PAGES (Login / Signup)
   ============================================================ */
.auth-box {
    width: 320px;
    margin: 80px auto 0;
    padding: 32px 28px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.auth-box input {
    width: 100%;
    padding: 10px 12px;
    margin: 6px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.auth-box button {
    width: 100%;
    padding: 11px;
    margin: 12px 0 0;
    background: #FF6D1F;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-box button:hover {
    background: #e55d12;
}

.error {
    color: #f87171;
    font-size: 13px;
    margin-top: 8px;
}

/* Form labels & selects inside auth box */
.auth-box .form-label {
    display: block;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    margin: 14px 0 4px;
    color: #555;
}

.auth-box select {
    width: 100%;
    padding: 10px 12px;
    margin: 6px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* ============================================================
   SHARED NAV BUTTON (logout / admin)
   ============================================================ */
.logout-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    padding: 7px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px) scale(1.04);
}


/* ============================================================
   DARK DASHBOARD THEME — BODY & BACKGROUND
   ============================================================ */
body.dark {
    /* Dark background with subtle gradient */
    background: linear-gradient(135deg, #1a1a1a 0%, #222222 40%, #1e1e1e 100%);
    background-attachment: fixed;
    color: #e2e8f0;
    font-family: 'Inter', Arial, sans-serif;
    min-height: 100vh;
}


/* ============================================================
   NAVBAR
   ============================================================ */
.dash-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Dark navbar */
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 14px 32px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 109, 31, 0.2);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.dash-logo {
    font-size: 20px;
    font-weight: 700;
    /* Orange gradient text */
    background: linear-gradient(90deg, #FF6D1F, #ffab76);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

.dash-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-email {
    color: #94a3b8;
    font-size: 13px;
}


/* ============================================================
   MAIN CONTAINER
   ============================================================ */
.dash-container {
    max-width: 960px;
    margin: 100px auto 60px;
    padding: 0 24px;
}


/* ============================================================
   GLASSMORPHISM CARDS
   ============================================================ */
.dash-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 28px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    /* Smooth lift + glow + border all at once */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
    /* Fade-in on page load */
    animation: fadeInUp 0.5s ease both;
}

.dash-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 56px rgba(255, 109, 31, 0.2);
    border-color: rgba(255, 109, 31, 0.5);
}

/* Stagger the card load animations */
.dash-card:nth-child(1) {
    animation-delay: 0.05s;
}

.dash-card:nth-child(2) {
    animation-delay: 0.12s;
}

.dash-card:nth-child(3) {
    animation-delay: 0.19s;
}

.dash-card:nth-child(4) {
    animation-delay: 0.26s;
}

/* Icon wiggles on card hover */
.dash-card:hover .card-icon {
    animation: wiggle 0.4s ease;
}

/* User info card — slightly different tint */
.user-card {
    background: linear-gradient(135deg, rgba(255, 109, 31, 0.12), rgba(255, 171, 118, 0.06));
    border-color: rgba(255, 109, 31, 0.25);
    margin-bottom: 28px;
    text-align: left;
}

.user-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 10px;
}


/* ============================================================
   CARD GRID (Charity + Draw side by side)
   ============================================================ */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   CARD INTERNALS
   ============================================================ */
.card-icon {
    font-size: 38px;
    margin-bottom: 12px;
    display: block;
}

.dash-card h3 {
    margin: 0 0 10px;
    color: #FF6D1F;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.dash-card p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
}

/* Action button on cards */
.card-btn {
    display: inline-block;
    padding: 9px 20px;
    background: linear-gradient(135deg, #FF6D1F, #e55d12);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.2s ease,
        background 0.2s ease;
    box-shadow: 0 4px 14px rgba(255, 109, 31, 0.4);
}

.card-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 24px rgba(255, 109, 31, 0.5);
    background: linear-gradient(135deg, #ff8040, #e55d12);
}

.card-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(255, 109, 31, 0.3);
}


/* ============================================================
   SUBSCRIPTION BADGE
   ============================================================ */
.badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(110, 231, 183, 0.3);
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(252, 165, 165, 0.3);
}

/* Plan badges */
.badge-free {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-basic {
    background: rgba(255, 109, 31, 0.15);
    color: #FF6D1F;
    border: 1px solid rgba(255, 109, 31, 0.3);
}

.badge-pro {
    background: rgba(255, 109, 31, 0.2);
    color: #ffab76;
    border: 1px solid rgba(255, 109, 31, 0.4);
    box-shadow: 0 0 12px rgba(255, 109, 31, 0.15);
}

/* Go Premium button */
.premium-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 11px 28px;
    background: linear-gradient(135deg, #FF6D1F, #ff8040, #e55d12);
    background-size: 200% 200%;
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s ease;
    box-shadow: 0 4px 20px rgba(255, 109, 31, 0.35);
    animation: gradientShift 3s ease infinite;
}

.premium-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 109, 31, 0.5);
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}


/* ============================================================
   SUBSCRIPTION PLAN CARDS
   ============================================================ */
.plan-header {
    text-align: center;
    margin-bottom: 36px;
}

.plan-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 8px;
}

.plan-header p {
    color: #94a3b8;
    font-size: 15px;
}

/* 3-column grid */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 768px) {
    .plan-grid {
        grid-template-columns: 1fr;
    }
}

/* Individual plan card */
.plan-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
    animation: fadeInUp 0.5s ease both;
    position: relative;
}

.plan-card:nth-child(1) {
    animation-delay: 0.05s;
}

.plan-card:nth-child(2) {
    animation-delay: 0.12s;
}

.plan-card:nth-child(3) {
    animation-delay: 0.19s;
}

.plan-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 56px rgba(255, 109, 31, 0.18);
    border-color: rgba(255, 109, 31, 0.4);
}

/* Highlighted Pro card */
.plan-highlight {
    background: linear-gradient(135deg, rgba(255, 109, 31, 0.12), rgba(255, 171, 118, 0.06));
    border-color: rgba(255, 109, 31, 0.4);
    box-shadow: 0 8px 32px rgba(255, 109, 31, 0.15);
}

.plan-highlight:hover {
    box-shadow: 0 20px 56px rgba(255, 109, 31, 0.3);
    border-color: rgba(255, 109, 31, 0.6);
}

/* "Most Popular" ribbon */
.plan-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #FF6D1F;
    color: white;
    padding: 4px 18px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(255, 109, 31, 0.4);
}

/* Current plan outline */
.plan-current {
    border-color: rgba(110, 231, 183, 0.5) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.plan-icon {
    font-size: 44px;
    margin-bottom: 14px;
}

.plan-name {
    font-size: 20px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 28px;
    font-weight: 700;
    color: #FF6D1F;
    margin-bottom: 20px;
}

.plan-price span {
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
}

/* Feature list */
.plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 24px;
    padding: 0;
}

.plan-features li {
    padding: 7px 0;
    font-size: 13px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.plan-features li:last-child {
    border-bottom: none;
}

/* Current plan badge */
.plan-badge-current {
    display: inline-block;
    padding: 8px 22px;
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(110, 231, 183, 0.3);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

/* Choose plan button */
.plan-choose-btn {
    width: 100%;
    text-align: center;
    display: block;
}

/* ============================================================
   SCORE INPUT FIELD
   ============================================================ */
.score-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #f1f5f9;
    padding: 9px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    width: auto;
}

.score-input:focus {
    border-color: #FF6D1F;
    background: rgba(255, 255, 255, 0.09);
}

/* Fix: native dropdown option items need explicit dark background */
.score-input option,
select option {
    background-color: #2a2a2a;
    color: #f1f5f9;
}


/* ============================================================
   SCORES TABLE
   ============================================================ */
.score-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    font-size: 14px;
}

.score-table th,
.score-table td {
    padding: 11px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.score-table th {
    color: #FF6D1F;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-table tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.no-scores {
    color: #64748b;
    font-style: italic;
    font-size: 14px;
}


/* ============================================================
   DRAW RESULT CARD
   ============================================================ */
.draw-result {
    margin-top: 20px;
    padding: 22px 18px;
    border-radius: 16px;
    text-align: center;
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* WIN — green glow */
.draw-win {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 78, 59, 0.25));
    border: 1px solid rgba(110, 231, 183, 0.4);
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.15);
}

/* LOSE — red glow */
.draw-lose {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(127, 29, 29, 0.25));
    border: 1px solid rgba(252, 165, 165, 0.4);
    box-shadow: 0 0 28px rgba(239, 68, 68, 0.15);
}

/* Big result emoji */
.draw-emoji {
    font-size: 48px;
    margin-bottom: 8px;
    animation: bounceIn 0.5s ease both;
    animation-delay: 0.1s;
}

/* Win / Lose headline */
.draw-headline {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.draw-win .draw-headline {
    color: #6ee7b7;
}

.draw-lose .draw-headline {
    color: #fca5a5;
}

/* Drawn number pill badge */
.draw-number-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.draw-win .draw-number-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(110, 231, 183, 0.3);
}

.draw-lose .draw-number-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(252, 165, 165, 0.3);
}

/* Subtitle message */
.draw-message {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}


/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

/* Cards slide up + fade in on page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icon does a quick wiggle on card hover */
@keyframes wiggle {
    0% {
        transform: scale(1) rotate(0deg);

    }

    25% {
        transform: scale(1.45) rotate(-12deg);
    }

    50% {
        transform: scale(1.35) rotate(10deg);
    }

    75% {
        transform: scale(1.1) rotate(-6deg);
    }

    100% {
        transform: rotate(0deg) scale(1);
    }
}

/* Draw result card pops in */
@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Draw emoji bounces down from above */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(-16px) scale(0.8);
    }

    60% {
        opacity: 1;
        transform: translateY(4px) scale(1.1);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}