/* ============================================
   LOTTERY SPA - Bright Premium Lottery Theme
   Vibrant Gold, Purple & Orange Color Palette
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
    /* Dark Theme Palette */
    --bg-primary: #0a0118;
    --bg-secondary: #1a0b2e;
    --bg-card: rgba(30, 10, 50, 0.4);
    --bg-card-hover: rgba(45, 20, 70, 0.5);
    --bg-glass: rgba(20, 5, 30, 0.65);
    --bg-glass-hover: rgba(40, 10, 60, 0.85);
    --bg-input: rgba(255, 255, 255, 0.07);
    --border-color: rgba(255, 255, 255, 0.12);
    --border-active: #7c3aed;
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;

    /* Vibrant Accents */
    --accent-primary: #8b5cf6;
    --accent-primary-glow: rgba(139, 92, 246, 0.4);
    --accent-gold: #ffd700;
    --accent-gold-glow: rgba(255, 215, 0, 0.5);
    --accent-green: #34d399;
    --accent-red: #f87171;
    --accent-cyan: #22d3ee;
    --accent-purple: #a78bfa;
    --accent-orange: #fb923c;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7c3aed, #d946ef);
    --gradient-gold: linear-gradient(135deg, #f59e0b, #fcd34d);
    --gradient-green: linear-gradient(135deg, #059669, #34d399);
    --gradient-hero: linear-gradient(135deg, #4c1d95 0%, #7c3aed 50%, #d946ef 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    --gradient-sidebar: linear-gradient(180deg, #0f0518 0%, #1e0a3c 50%, #2e1065 100%);

    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px var(--accent-primary-glow);
    --shadow-gold: 0 0 20px var(--accent-gold-glow);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --sidebar-width: 260px;
    --header-height: 70px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-mono: 'JetBrains Mono', monospace;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased
}

body {
    font-family: 'Outfit', sans-serif;
    background: #0a0118;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: var(--accent-purple);
    text-decoration: none;
    transition: var(--transition)
}

a:hover {
    color: #6d28d9
}

img {
    max-width: 100%;
    display: block
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none
}

input,
select,
textarea {
    font-family: inherit;
    outline: none;
    border: none
}

ul,
ol {
    list-style: none
}

::selection {
    background: var(--accent-gold);
    color: #fff
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px
}

::-webkit-scrollbar-track {
    background: var(--bg-primary)
}

::-webkit-scrollbar-thumb {
    background: #c9c3d8;
    border-radius: 3px
}

::-webkit-scrollbar-thumb:hover {
    background: #a099b0
}

/* ---- Layout ---- */
#app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--gradient-sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 150;
    transition: transform var(--transition);
    box-shadow: 4px 0 24px rgba(30, 10, 60, 0.15)
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4)
}

.sidebar-brand {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto
}

.nav-section {
    margin-bottom: 20px
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    padding: 8px 12px;
    margin-bottom: 4px
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 2px
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(249, 115, 22, 0.15));
    color: #fbbf24;
    font-weight: 600
}

.nav-item .icon {
    width: 20px;
    text-align: center;
    font-size: 16px
}

.nav-item .badge {
    margin-left: auto;
    background: var(--accent-red);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1)
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08)
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff
}

.sidebar-user-info {
    flex: 1;
    min-width: 0
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.sidebar-user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5)
}

#app {
    position: relative;
    z-index: 20;
    min-height: 100vh;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.topbar {
    height: var(--header-height);
    background: rgba(15, 5, 24, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 200
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px
}

.topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary)
}

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

.mobile-toggle {
    display: none;
    background: none;
    color: var(--text-primary);
    font-size: 22px;
    padding: 6px
}

.page-content {
    flex: 1;
    padding: 28px
}

/* ---- Landing (No Sidebar) ---- */
body.landing-mode .sidebar,
body.landing-mode .topbar {
    display: none
}

body.landing-mode .main-content {
    margin-left: 0;
    padding-top: var(--header-height);
}

body.landing-mode .page-content {
    padding: 0;
}

/* Ensure hero section accounts for the new main-content padding */
body.landing-mode .hero {
    margin-top: calc(-1 * var(--header-height));
    min-height: calc(100vh - var(--header-height));
}

/* ---- Public Navbar ---- */
.public-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 1, 24, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04)
}

.public-nav-brand {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary)
}

.public-nav-brand .logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 3px 12px rgba(249, 115, 22, 0.3)
}

.public-nav-links {
    display: flex;
    align-items: center;
    gap: 8px
}

.public-nav-links a,
.public-nav-links button {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    background: none
}

.public-nav-links a:hover {
    color: var(--text-primary)
}

.public-nav .btn-glow {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--accent-primary-glow)
}

/* ---- Hero Section ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Increase transparency on hero overlay to show plasma */
    background: rgba(10, 1, 24, 0.3);
    backdrop-filter: blur(20px);
    z-index: 1;
}

.global-plasma {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: #0a0118;
    background-image: radial-gradient(circle at 15% 50%, rgba(124, 58, 237, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(249, 115, 22, 0.1), transparent 25%);
    pointer-events: none;
    overflow: hidden;
}

.plasma-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: moveBlob 20s infinite alternate;
}

.plasma-blob:nth-child(1) {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: #7c3aed;
    animation-duration: 25s;
}

.plasma-blob:nth-child(2) {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: #db2777;
    animation-duration: 30s;
    animation-direction: alternate-reverse;
}

.plasma-blob:nth-child(3) {
    top: 30%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: #2563eb;
    animation-duration: 22s;
}

@keyframes moveBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* ---- Global Waves ---- */
.global-waves {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 5;
    pointer-events: none;
}

body:not(.landing-mode) .global-waves {
    display: none;
}

.waves {
    position: relative;
    width: 100%;
    height: 20vh;
    margin-bottom: -7px;
    min-height: 150px;
    max-height: 400px;
}

.parallax>use {
    animation: move-forever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}

.parallax>use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.parallax>use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.parallax>use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 13s;
}

.parallax>use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 20s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(-90px, 0, 0);
    }

    100% {
        transform: translate3d(85px, 0, 0);
    }
}

.hero-container {
    max-width: 100%;
    padding: 0 40px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 10;
}

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        justify-content: center;
    }
}

.hero-blast-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#hero-blast-canvas {
    width: 100%;
    height: 100%;
}

.winner-bg-text {
    position: absolute;
    top: 20%;
    left: 0;
    width: 100%;
    font-size: 120px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
    user-select: none;
    animation: scrollBgText 40s linear infinite;
}

@keyframes scrollBgText {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.hero-text {
    max-width: 640px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse 2s infinite;
}

.hero h1 {
    font-size: clamp(40px, 5vw, 72px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.hero .text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.hero-stat .value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.hero-stat .label {
    font-size: 13px;
    color: var(--text-muted);
}

.hero-visual {
    position: relative;
    perspective: 1000px;
}

.hero-image {
    width: 100%;
    max-width: 580px;
    border-radius: 24px;
    box-shadow: 0 40px 80px -20px rgba(124, 58, 237, 0.25);
    animation: floatImage 6s ease-in-out infinite;
    z-index: 2;
    position: relative;
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.05) rotate(2deg);
    filter: brightness(1.1);
}

.hero h1 {
    background: linear-gradient(to right, #fff 20%, #ffd700 40%, #ffd700 60%, #fff 80%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineText 6s linear infinite;
    display: inline-block;
}

@keyframes shineText {
    to {
        background-position: 200% center;
    }
}



.floating-ticket {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: floatTicket 5s ease-in-out infinite;
    z-index: 20;
}

.ticket-1 {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
    transform: rotate(5deg);
}

.ticket-2 {
    bottom: 15%;
    left: 0%;
    animation-delay: 2.5s;
    transform: rotate(-5deg);
}

@keyframes floatTicket {

    0%,
    100% {
        transform: translateY(0) rotate(5deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

@keyframes floatImage {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ---- Feature Icons Section ---- */
.features-section {
    padding: 80px 0;
    text-align: center;
    width: 100%;
}

.features-section h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-primary)
}

.features-section .subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 48px
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
}

.feature-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 16px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.feature-card:hover .feature-icon-img {
    transform: scale(1.15) rotate(5deg);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
    line-height: 1.4
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-primary-glow);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    animation: shimmerBtn 4s infinite;
    pointer-events: none;
}

@keyframes shimmerBtn {
    0% {
        left: -100%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    40% {
        left: 200%;
        opacity: 0;
    }

    100% {
        left: 200%;
        opacity: 0;
    }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-primary-glow)
}

.btn-secondary {
    background: #fff;
    color: #0a0118;
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm)
}

.btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--border-active)
}

.btn-gold {
    background: var(--gradient-gold);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-gold-glow)
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-gold-glow)
}

.btn-danger {
    background: var(--accent-red);
    color: #fff
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px)
}

.btn-success {
    background: var(--accent-green);
    color: #fff
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-1px)
}

.btn-ghost {
    background: none;
    color: var(--text-secondary);
    padding: 8px 16px
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04)
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px
}

.btn-block {
    width: 100%
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important
}

.btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition)
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 0, 0, 0.1)
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary)
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px
}

/* ---- Plan Cards ---- */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px
}

.plan-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm)
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition)
}

.plan-card:hover {
    transform: translateY(-6px);
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: var(--shadow-glow)
}

.plan-card:hover::before {
    opacity: 1
}

.plan-card .plan-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px
}

.plan-card .plan-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary)
}

.plan-card .plan-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5
}

.plan-card .plan-price {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-primary)
}

.plan-card .plan-price .currency {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-muted)
}

.plan-card .plan-winning {
    font-size: 14px;
    color: var(--accent-orange);
    font-weight: 700;
    margin-bottom: 20px
}

.plan-card .plan-progress {
    margin-bottom: 20px
}

.plan-card .progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px
}

.progress-bar {
    height: 7px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    overflow: hidden
}

.progress-bar .fill {
    height: 100%;
    border-radius: 4px;
    background: var(--gradient-primary);
    transition: width 0.5s ease
}

/* ---- Stat Cards ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    backdrop-filter: blur(5px);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md)
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.06;
    transform: translate(30px, -30px);
    pointer-events: none
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 4px;
    line-height: 1.1
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500
}

.stat-card.cyan .stat-icon {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-cyan)
}

.stat-card.cyan .stat-value {
    color: var(--accent-cyan)
}

.stat-card.cyan {
    border-left: 4px solid var(--accent-cyan)
}

.stat-card.gold .stat-icon {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-gold)
}

.stat-card.gold .stat-value {
    color: var(--accent-gold)
}

.stat-card.gold {
    border-left: 4px solid var(--accent-gold)
}

.stat-card.green .stat-icon {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green)
}

.stat-card.green .stat-value {
    color: var(--accent-green)
}

.stat-card.green {
    border-left: 4px solid var(--accent-green)
}

.stat-card.purple .stat-icon {
    background: rgba(124, 58, 237, 0.12);
    color: var(--accent-purple)
}

.stat-card.purple .stat-value {
    color: var(--accent-purple)
}

.stat-card.purple {
    border-left: 4px solid var(--accent-purple)
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 20px
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04)
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px var(--accent-primary-glow)
}

.form-input::placeholder {
    color: var(--text-muted)
}

.form-textarea {
    resize: vertical;
    min-height: 100px
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary)
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px
}

.form-error {
    font-size: 12px;
    color: var(--accent-red);
    margin-top: 4px
}

/* Auth Form */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0;
    position: relative;
    overflow: hidden;
    z-index: 0;
    width: 100%;
}

/* Animated Background Shapes */
.auth-page::before,
.auth-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -2;
    /* Ensure behind icons */
    opacity: 0.8;
    mix-blend-mode: screen;
    animation: floatShape 8s infinite alternate ease-in-out;
}

.auth-page::before {
    width: 60vw;
    height: 60vw;
    background: #00f3ff;
    /* Neon Cyan */
    top: -20%;
    left: -20%;
    animation-duration: 10s;
}

.auth-page::after {
    width: 50vw;
    height: 50vw;
    background: #ff00ff;
    /* Neon Magenta */
    bottom: -10%;
    right: -10%;
    animation-duration: 12s;
    animation-direction: alternate-reverse;
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 30px) scale(1.1);
    }
}

.global-floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

.global-floating-icons span {
    position: absolute;
    bottom: -100px;
    font-size: 50px;
    animation: floatUp 15s linear infinite;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-floating-icons span:nth-child(1) {
    left: 10%;
    animation-duration: 18s;
    animation-delay: 0s;
}

.global-floating-icons span:nth-child(1)::before {
    content: '🪙';
    font-size: 60px;
}

.global-floating-icons span:nth-child(2) {
    left: 25%;
    animation-duration: 25s;
    animation-delay: -5s;
}

.global-floating-icons span:nth-child(2)::before {
    content: '💰';
    font-size: 50px;
}

.global-floating-icons span:nth-child(3) {
    left: 70%;
    animation-duration: 20s;
    animation-delay: -10s;
}

.global-floating-icons span:nth-child(3)::before {
    content: '🎟️';
    font-size: 70px;
    transform: rotate(-15deg);
}

.global-floating-icons span:nth-child(4) {
    left: 85%;
    animation-duration: 22s;
    animation-delay: -2s;
}

.global-floating-icons span:nth-child(4)::before {
    content: '₹';
    font-size: 80px;
    font-weight: 800;
    color: #ffd700;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transform: rotate(15deg);
}

.global-floating-icons span:nth-child(5) {
    left: 50%;
    animation-duration: 28s;
    animation-delay: -15s;
}

.global-floating-icons span:nth-child(5)::before {
    content: '💎';
    font-size: 55px;
}

.global-floating-icons span:nth-child(6) {
    left: 40%;
    animation-duration: 24s;
    animation-delay: -8s;
}

.global-floating-icons span:nth-child(6)::before {
    content: '🏆';
    font-size: 65px;
    transform: rotate(-10deg);
}

.global-floating-icons span:nth-child(7) {
    left: 60%;
    animation-duration: 19s;
    animation-delay: -3s;
}

.global-floating-icons span:nth-child(7)::before {
    content: '🎉';
    font-size: 55px;
}

.global-floating-icons span:nth-child(8) {
    left: 15%;
    animation-duration: 27s;
    animation-delay: -12s;
}

.global-floating-icons span:nth-child(8)::before {
    content: '🥇';
    font-size: 60px;
}

.global-floating-icons span:nth-child(9) {
    left: 80%;
    animation-duration: 22s;
    animation-delay: -7s;
}

.global-floating-icons span:nth-child(9)::before {
    content: '🎰';
    font-size: 50px;
}

.global-floating-icons span:nth-child(10) {
    left: 90%;
    animation-duration: 26s;
    animation-delay: -18s;
}

.global-floating-icons span:nth-child(10)::before {
    content: '🎁';
    font-size: 50px;
    transform: rotate(20deg);
}






@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-120vh) rotate(360deg);
        opacity: 0;
    }
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 10;
    animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-card .auth-header {
    text-align: center;
    margin-bottom: 32px
}

.auth-card .auth-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary)
}

.auth-card .auth-header p {
    color: var(--text-secondary);
    font-size: 14px
}

.auth-card .auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted)
}

/* ---- Tables ---- */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
}

table {
    width: 100%;
    border-collapse: collapse
}

th {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 2px solid var(--border-color)
}

td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--text-primary)
}

tr:hover td {
    background: rgba(124, 58, 237, 0.02)
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626
}

.badge-info {
    background: rgba(6, 182, 212, 0.12);
    color: #0891b2
}

.badge-purple {
    background: rgba(124, 58, 237, 0.12);
    color: var(--accent-purple)
}

/* ---- Toast Notifications ---- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    min-width: 300px;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    background: #1a0b2e;
    /* Dark purple */
    color: #ffffff !important;
    backdrop-filter: blur(10px);
}

.toast.success {
    border-left: 4px solid var(--accent-green)
}

.toast.error {
    border-left: 4px solid var(--accent-red)
}

.toast.info {
    border-left: 4px solid var(--accent-purple)
}

.toast-close {
    margin-left: auto;
    background: none;
    color: var(--text-muted);
    font-size: 18px;
    padding: 0 4px;
    cursor: pointer
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0
    }

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

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1
    }

    to {
        transform: translateX(100%);
        opacity: 0
    }
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 16, 51, 0.4);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.2s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15)
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary)
}

.modal-close {
    background: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0
}

.modal-body {
    padding: 24px
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color)
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0
    }

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

/* ---- Loading ---- */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    flex-direction: column;
    gap: 16px
}

.loading-spinner .spinner-lg {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite
}

.loading-spinner p {
    font-size: 14px;
    color: var(--text-muted)
}

.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.7
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary)
}

.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px
}

/* ---- Winners Marquee ---- */
.winners-section {
    padding: 80px 40px;
    overflow: hidden;
    background: transparent;
    position: relative
}

.winners-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 10% 20%, rgba(251, 191, 36, 0.3) 50%, transparent 50%),
        radial-gradient(2px 2px at 90% 80%, rgba(249, 115, 22, 0.2) 50%, transparent 50%),
        radial-gradient(2px 2px at 50% 50%, rgba(124, 58, 237, 0.15) 50%, transparent 50%);
    pointer-events: none
}

.winners-section h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 32px;
    color: var(--text-primary);
    position: relative
}

.winners-track {
    display: flex;
    gap: 20px;
    animation: marquee 30s linear infinite;
    width: max-content
}

.winners-track:hover {
    animation-play-state: paused
}

.winner-card {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px)
}

.winner-card .winner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff
}

.winner-card .winner-info .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary)
}

.winner-card .winner-info .amount {
    font-size: 13px;
    color: var(--accent-orange);
    font-weight: 700
}

.winner-card .winner-info .plan {
    font-size: 11px;
    color: var(--text-muted)
}

@keyframes marquee {
    0% {
        transform: translateX(0)
    }

    100% {
        transform: translateX(-50%)
    }
}

/* ---- Section Headers ---- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px
}

.section-header h1,
.section-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

.section-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 4px 0 0 0;
}

/* ---- Wallet Balance Card ---- */
.wallet-card {
    background: linear-gradient(135deg, #7c3aed, #a855f7, #f97316);
    border: none;
    border-radius: var(--radius-xl);
    padding: 32px;
    position: relative;
    overflow: hidden;
    color: #fff
}

.wallet-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent);
    border-radius: 50%;
    pointer-events: none
}

.wallet-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.2), transparent);
    border-radius: 50%;
    pointer-events: none
}

.wallet-card .balance-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
    position: relative
}

.wallet-card .balance-amount {
    font-size: 40px;
    font-weight: 900;
    position: relative;
    font-family: var(--font-mono);
    color: #fff
}

.wallet-card .wallet-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    position: relative
}

.wallet-card .wallet-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px)
}

.wallet-card .wallet-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3)
}

/* ---- Notification List ---- */
.notif-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition)
}

.notif-item:hover {
    background: rgba(124, 58, 237, 0.03)
}

.notif-item.unread {
    background: rgba(251, 191, 36, 0.05)
}

.notif-item .notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(249, 115, 22, 0.1))
}

.notif-item .notif-content {
    flex: 1;
    min-width: 0
}

.notif-item .notif-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-primary)
}

.notif-item .notif-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4
}

.notif-item .notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px
}

/* ---- Page Transition ---- */
.page-enter {
    animation: pageEnter 0.3s ease
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

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

/* ---- Confetti Animation ---- */
@keyframes confettiFall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0
    }
}

.confetti-piece {
    position: fixed;
    width: 8px;
    height: 8px;
    top: -10px;
    z-index: 9998;
    animation: confettiFall 3s ease-in forwards;
    border-radius: 2px
}

/* ---- Utility ---- */
.flex {
    display: flex
}

.items-center {
    align-items: center
}

.justify-between {
    justify-content: space-between
}

.gap-8 {
    gap: 8px
}

.gap-12 {
    gap: 12px
}

.gap-16 {
    gap: 16px
}

.gap-20 {
    gap: 20px
}

.mt-8 {
    margin-top: 8px
}

.mt-16 {
    margin-top: 16px
}

.mt-24 {
    margin-top: 24px
}

.mt-32 {
    margin-top: 32px
}

.mb-8 {
    margin-bottom: 8px
}

.mb-16 {
    margin-bottom: 16px
}

.mb-24 {
    margin-bottom: 24px
}

.text-center {
    text-align: center
}

.text-muted {
    color: var(--text-muted)
}

.text-cyan {
    color: var(--accent-cyan)
}

.text-gold {
    color: var(--accent-gold)
}

.text-green {
    color: var(--accent-green)
}

.text-red {
    color: var(--accent-red)
}

.fw-600 {
    font-weight: 600
}

.fw-700 {
    font-weight: 700
}

.fw-800 {
    font-weight: 800
}

.fs-12 {
    font-size: 12px
}

.fs-14 {
    font-size: 14px
}

.fs-24 {
    font-size: 24px
}

.mono {
    font-family: var(--font-mono)
}

.hidden {
    display: none !important
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

/* ---- Pagination ---- */
/* ---- Pagination ---- */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

@media (max-width: 768px) {
    .pagination-wrapper {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.page-size-selector select {
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination button {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm)
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--accent-purple)
}

.pagination button.active {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px var(--accent-primary-glow)
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed
}

.pagination .page-info {
    font-size: 13px;
    color: var(--text-muted);
    padding: 0 8px
}

/* ---- Search / Filter Toolbar ---- */
.table-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 360px
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm)
}

.search-box input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px var(--accent-primary-glow)
}

.search-box input::placeholder {
    color: var(--text-muted)
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none
}

.filter-select {
    padding: 10px 32px 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    min-width: 130px;
    box-shadow: var(--shadow-sm)
}

.filter-select option {
    background: var(--bg-secondary);
    color: var(--text-primary)
}

.table-toolbar .result-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto
}

/* ---- Profile Image Upload ---- */
.profile-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px
}

.profile-avatar-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    cursor: pointer
}

.profile-avatar-wrap img,
.profile-avatar-wrap .avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(124, 58, 237, 0.15);
    transition: var(--transition)
}

.profile-avatar-wrap .avatar-placeholder {
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    color: #fff
}

.profile-avatar-wrap:hover img,
.profile-avatar-wrap:hover .avatar-placeholder {
    border-color: var(--accent-purple)
}

.profile-avatar-wrap .upload-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    font-size: 24px;
    color: #fff
}

.profile-avatar-wrap:hover .upload-overlay {
    opacity: 1
}

.profile-upload input[type="file"] {
    display: none
}

.profile-upload .upload-hint {
    font-size: 12px;
    color: var(--text-muted)
}

/* ---- Bank Details Display ---- */
.bank-details-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-top: 8px
}

.bank-details-card .bd-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px
}

.bank-details-card .bd-row:last-child {
    border-bottom: none
}

.bank-details-card .bd-key {
    color: var(--text-muted);
    text-transform: capitalize
}

.bank-details-card .bd-val {
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 12px
}

/* ---- Responsive ---- */
@media(max-width:768px) {
    .sidebar {
        width: 260px;
        z-index: 1000;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0)
    }

    .main-content {
        margin-left: 0
    }

    .mobile-toggle {
        display: block
    }

    .page-content {
        padding: 12px
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px
    }

    .stat-card {
        padding: 16px;
        min-height: 120px
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 12px
    }

    .stat-card .stat-value {
        font-size: 20px;
        font-weight: 800
    }

    .stat-card .stat-label {
        font-size: 11px
    }

    .card {
        border-radius: var(--radius-lg);
        padding: 16px
    }

    .form-label {
        font-size: 12px
    }

    .form-input,
    .form-select,
    .form-textarea {
        font-size: 14px;
        padding: 10px 12px
    }

    .plans-grid {
        grid-template-columns: 1fr
    }

    .form-row {
        grid-template-columns: 1fr
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px
    }

    .section-header h1,
    .section-header h2 {
        font-size: 20px
    }

    .section-header>div {
        width: 100%
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch
    }

    .table-wrapper table {
        min-width: 100%
    }

    .table-wrapper table th,
    .table-wrapper table td {
        padding: 12px 8px;
        font-size: 12px
    }

    .hero h1 {
        font-size: 32px
    }

    .hero-stats {
        gap: 20px
    }

    .public-nav {
        padding: 0 16px
    }

    .wallet-card {
        padding: 24px
    }

    .wallet-card .balance-amount {
        font-size: 28px
    }

    .features-grid {
        grid-template-columns: 1fr
    }

    .card {
        border-radius: var(--radius-md)
    }

    .btn {
        font-size: 13px;
        padding: 8px 12px
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 12px
    }
}

@media(max-width:480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 16px
    }

    .page-content {
        padding: 8px
    }

    .stat-card {
        padding: 14px;
        min-height: 110px
    }

    .stat-card .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        margin-bottom: 10px
    }

    .stat-card .stat-value {
        font-size: 18px;
        font-weight: 800
    }

    .stat-card .stat-label {
        font-size: 10px;
        line-height: 1.2
    }

    .section-header h1,
    .section-header h2 {
        font-size: 18px
    }

    .table-wrapper table th,
    .table-wrapper table td {
        padding: 8px 4px;
        font-size: 10px
    }

    .btn {
        font-size: 12px;
        padding: 6px 10px
    }

    .btn-sm {
        padding: 4px 8px;
        font-size: 11px
    }

    .hero-actions {
        flex-direction: column;
        align-items: center
    }

    .form-group {
        margin-bottom: 16px
    }
}

/* ---- New Home Page Styles ---- */

.section-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

.plans-section {
    padding: 80px 0;
    background: transparent;
}

/* Plan Card Updates */
.plan-card {
    padding: 0;
    /* Reset padding for internal structure */
    display: flex;
    flex-direction: column;
}

.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.plan-header {
    padding: 24px 24px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}

.plan-header .plan-icon {
    margin-bottom: 0;
    width: 48px;
    height: 48px;
    font-size: 24px;
}

.plan-header .plan-name {
    margin-bottom: 2px;
    font-size: 18px;
}

.plan-header .plan-price {
    font-size: 20px;
    margin-bottom: 0;
}

.plan-body {
    padding: 20px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.winning-info {
    background: rgba(255, 255, 255, 0.05);
    /* Dark transparent background */
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    margin-bottom: 20px;
}

.winning-info .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.winning-info .amount {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 2px;
}

/* ---- Winners Animation Section ---- */
.winners-section {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
    /* Darker background to make gold pop */
    background: linear-gradient(180deg, var(--bg-primary) 0%, #1e1b4b 50%, var(--bg-primary) 100%);
}

.animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.trophy-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.15;
    z-index: 0;
}

.trophy-icon {
    font-size: 300px;
    line-height: 1;
    filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.6));
    animation: trophyFloat 6s ease-in-out infinite, trophyGlow 4s ease-in-out infinite alternate;
    transform-origin: center bottom;
}

.trophy-shine {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, transparent 70%);
    filter: blur(40px);
    animation: shinePulse 4s infinite;
}

@keyframes trophyFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes trophyGlow {
    0% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.4));
        opacity: 0.8;
    }

    100% {
        filter: drop-shadow(0 0 60px rgba(255, 215, 0, 0.8));
        opacity: 1;
    }
}

@keyframes shinePulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    margin: 0;
    background: linear-gradient(135deg, #1e0a3c 0%, #2d1b69 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(45, 27, 105, 0.3);
}

.cta-content {
    padding: 60px 80px;
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.cta-content h2 {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    line-height: 1.6;
}

.cta-image {
    max-width: 500px;
    margin-right: -40px;
    transform: rotate(-5deg) translateY(20px);
    transition: transform 0.5s ease;
}

.cta-section:hover .cta-image {
    transform: rotate(0deg) translateY(10px);
}

@media (max-width: 900px) {
    .cta-section {
        flex-direction: column;
        text-align: center;
        padding: 60px 20px;
        margin: 0;
    }

    .cta-content {
        padding: 0;
        margin-bottom: 40px;
    }

    .cta-image {
        margin: 0;
        max-width: 80%;
    }
}

/* Footer */
.footer {
    background: transparent;
    border-top: 1px solid var(--border-color);
    padding: 60px 20px 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 24px;
}

.footer-brand .logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
}

.footer-links {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.footer-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.copyright {
    color: var(--text-muted);
    font-size: 13px;
}

/* ---- Enhanced Plans Grid ---- */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.plan-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 0;
    pointer-events: none;
}

.plan-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-gold);
    background: var(--bg-card-hover);
}

.plan-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.plan-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
    z-index: 2;
    animation: pulse 2s infinite;
}

.plan-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
}

.plan-card:hover .plan-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.plan-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.plan-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.plan-meta {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.plan-meta-item {
    display: flex;
    flex-direction: column;
}

.plan-meta-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.plan-meta-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.plan-meta-value.highlight {
    color: #f59e0b;
    /* Gold */
    background: -webkit-linear-gradient(45deg, #f59e0b, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plan-progress-wrap {
    margin-bottom: 20px;
}

.plan-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

.plan-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 4px;
    transition: width 1s ease-out;
}

.plan-action-btn {
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-action-btn:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.3);
}

.plan-action-btn.gold {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: white;
    box-shadow: 0 8px 20px -5px rgba(245, 158, 11, 0.4);
}

.plan-action-btn.gold:hover {
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 12px 25px -5px rgba(245, 158, 11, 0.5);
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(251, 191, 36, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }
}

/* --- Countdown Timer Styles --- */
.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 15px 0;
}

.timer-segment {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    min-width: 60px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-segment span {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.timer-segment label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1px;
}

.draw-live-badge {
    background: var(--gradient-purple);
    color: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    font-weight: 800;
    font-size: 18px;
    margin: 15px 0;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.full-batch-status {
    background: rgba(139, 92, 246, 0.05);
    border: 1px dashed var(--accent-purple);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

/* ---- Fix Admin and User Dashboard Mobile Layout ---- */
@media (max-width: 768px) {

    /* Override hardcoded inline grids across JS components */
    div[style*="display:grid"],
    div[style*="display: grid"],
    div[style*="grid-template-columns:"] {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Ensure cards don't bleed out of viewport */
    .card {
        max-width: 100vw;
        box-sizing: border-box;
    }

    /* Wrap flex rows like button groups or badges */
    .flex {
        flex-wrap: wrap;
    }

    /* Keep tables fully constrained and scrollable */
    .table-wrapper {
        width: 100%;
        overflow-x: auto;
    }

    /* Ensure buttons align well on mobile */
    .btn {
        white-space: normal;
        height: auto;
    }

    /* Ensure forms do not overflow */
    .form-group,
    .form-input,
    .form-select,
    .form-textarea {
        max-width: 100%;
    }

    /* Ensure entire layout does not exceed viewport width */
    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    #app,
    .main-content {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .page-content {
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }
}
/* ---- Lottery Lobby - Sections & Horizontal Batches ---- */
.plan-section {
    position: relative;
    z-index: 10;
}

.plan-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}

.batches-horizontal-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 5px 25px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-secondary);
}

.batches-horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}

.batches-horizontal-scroll::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

.batch-card {
    flex: 0 0 300px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-snap-align: start;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.batch-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.batch-card.full {
    border-color: var(--accent-orange);
}

.batch-card.drawn {
    opacity: 0.85;
    background: rgba(20, 10, 40, 0.4);
}

.batch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.batch-num {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.batch-card-body {
    flex: 1;
}

.batch-progress-box {
    margin: 15px 0;
}

.progress-bar-sm {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-sm .fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 1s ease-out;
}

.winner-reveal {
    background: rgba(139, 92, 246, 0.1);
    border: 1px dashed var(--accent-purple);
    padding: 10px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.batch-card-footer {
    margin-top: auto;
}

/* ---- Improved Real Estate Layout ---- */
.plan-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
}

.plan-info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-right: 30px;
    border-right: 1px solid var(--border-color);
}

.plan-icon-lg {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.plan-stats-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: auto;
}

.ps-item {
    background: rgba(255, 255, 255, 0.04);
    padding: 12px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
}

.ps-item .lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.ps-item .val {
    font-size: 18px;
    font-weight: 900;
}

.batches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.batch-tile {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: var(--transition);
}

.batch-tile:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-4px);
    border-color: var(--accent-primary);
}

.batch-tile.active-glow {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.3);
}

.tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tile-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    color: var(--accent-green);
    background: rgba(52, 211, 153, 0.1);
    padding: 4px 8px;
    border-radius: 20px;
}

.live-indicator .dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.tile-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 4px;
}

.tile-progress-bar .fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
}

.tile-status-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.winner-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(251, 191, 36, 0.08);
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(251, 191, 36, 0.3);
}

.winner-medal {
    font-size: 24px;
}

.winner-info .lbl {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-gold);
}

.winner-info .val {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

@media (max-width: 992px) {
    .plan-wrapper {
        grid-template-columns: 1fr;
    }
    .plan-info-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 24px;
        flex-direction: row;
        align-items: center;
    }
    .plan-stats-strip {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---- Spotlight + Tabbed History UI ---- */
.plan-hero-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.lobby-plan-header {
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.plan-branding {
    display: flex;
    align-items: center;
    gap: 20px;
}

.plan-icon-square {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.1);
}

.plan-brief-stats {
    display: flex;
    gap: 30px;
}

.plan-brief-stats .stat {
    display: flex;
    flex-direction: column;
}

.plan-brief-stats .lbl {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.plan-brief-stats .val {
    font-size: 24px;
    font-weight: 900;
}

.lobby-content-split {
    display: grid;
    grid-template-columns: 400px 1fr;
    min-height: 400px;
}

/* Left Spotlight */
.entry-spotlight {
    padding: 40px;
    background: linear-gradient(to bottom, rgba(124, 58, 237, 0.03), transparent);
    border-right: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.spotlight-card {
    width: 100%;
    background: var(--bg-glass-hover);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: 30px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.card-tag {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--accent-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.live-pulse {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 6px;
}

.progress-bar-lg {
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar-lg .fill {
    height: 100%;
    background: var(--gradient-primary);
    box-shadow: 0 0 15px var(--accent-primary-glow);
}

/* Right Explorer */
.history-explorer {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px;
    border-radius: 12px;
    align-self: flex-start;
}

.tab-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    background: none;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.compact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-row {
    background: rgba(255, 255, 255, 0.03);
    padding: 14px 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
    transition: 0.2s;
}

.list-row:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.table-container-sm {
    max-height: 400px;
    overflow-y: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.compact-table {
    width: 100%;
    border-collapse: collapse;
}

.compact-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 12px 20px;
    background: rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
}

.compact-table td {
    padding: 12px 20px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.empty-tab-state {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

@media (max-width: 1100px) {
    .lobby-content-split {
        grid-template-columns: 1fr;
    }
    .entry-spotlight {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
