@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;600;700&family=Inter:wght@400;600;800&family=Orbitron:wght@700;900&display=swap');

:root {
    --gold: #f59e0b;
    --accent: #f43f5e;
}

.light-mode {
    --primary: #4f46e5;
    --secondary: #06b6d4;
    --background: #f8fafc;
    --surface: #ffffff;
    --sidebar: #ffffff;
    --sidebar-text: #475569;
    --sidebar-active: #4f46e5;
    --sidebar-hover: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --card-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    --panel-border: 1px solid #e2e8f0;

    /* Rewards Theme */
    --rewards-bg: #ffffff;
    --rewards-border: 1px solid rgba(0, 0, 0, 0.08);
    --rewards-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --rewards-header-text: #0f172a;
    --reward-item-bg: #ffffff;
    --reward-item-border: rgba(0, 0, 0, 0.1);
    --reward-val-bg: #f1f5f9;
    --reward-text-dim: #475569;
    --reward-text-bright: #0f172a;
}

.dark-mode {
    --primary: #818cf8;
    --secondary: #22d3ee;
    --background: #020617;
    --surface: #0f172a;
    --sidebar: #0f172a;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #22d3ee;
    --card-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.7);
    --panel-border: 1px solid rgba(255, 255, 255, 0.03);

    /* Rewards Theme - Dark */
    --rewards-bg: #1e293b;
    --rewards-border: 1px solid rgba(255, 255, 255, 0.05);
    --rewards-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --rewards-header-text: #f1f5f9;
    --reward-item-bg: #0f172a;
    --reward-item-border: rgba(255, 255, 255, 0.1);
    --reward-val-bg: rgba(0, 0, 0, 0.4);
    --reward-text-dim: #94a3b8;
    --reward-text-bright: #ffffff;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background-color: var(--background);
    overflow-y: auto;
    transition: all 0.3s ease;
}

h1,
h2,
h3,
.logo-text,
.nav-item,
.btn-checkin,
.btn-primary,
.btn-save,
.btn-buy,
.amount,
.user-title-badge,
.btn-admin {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
}

/* Layout */
.app-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    min-height: 100vh;
    width: 100%;
}

@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 260px 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
}

/* Sidebar */
.game-sidebar {
    background-color: var(--sidebar);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    border-right: 1px solid var(--border);
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2.5rem;
}

.logo-img {
    width: 110px;
    height: 110px;
    border-radius: 28px;
    border: 3px solid var(--primary);
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.2);
}

.logo-text {
    font-size: 1.4rem;
    letter-spacing: 3px;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.mobile-header {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.logo-img-small {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid var(--primary);
}

.menu-toggle {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.8rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .game-sidebar {
        height: auto;
        width: 100%;
        padding: 1rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
    }

    .mobile-header {
        display: flex;
    }

    .desktop-only {
        display: none !important;
    }

    .game-sidebar .side-nav {
        display: none;
        padding-top: 1rem;
    }

    .game-sidebar.mobile-open .side-nav {
        display: flex;
        animation: fadeIn 0.3s ease forwards;
    }

    .game-sidebar .sidebar-footer {
        display: none;
        padding-top: 1rem;
    }

    .game-sidebar.mobile-open .sidebar-footer {
        display: flex;
    }

    .logo-area {
        padding-bottom: 0;
        margin-bottom: 0;
        border-bottom: none;
    }
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    padding: 1.1rem 1.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--sidebar-active);
    background: var(--sidebar-hover);
    transform: translateX(5px);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--sidebar-active);
    box-shadow: inset 4px 0 0 var(--primary);
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.profile-compact {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 14px;
    flex: 1;
    min-width: 0;
    transition: background 0.2s;
}

.profile-compact:hover {
    background: var(--sidebar-hover);
}

.avatar-side {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    border: 2px solid var(--secondary);
    object-fit: cover;
}

.user-info-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    min-width: 0;
    flex: 1;
}

.user-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-title-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 24px;
    padding: 0.18rem 0.7rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.68rem;
    line-height: 1;
    letter-spacing: 0.4px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
}

.user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-meta .name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-label {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.game-content {
    padding: 2.5rem 4rem;
    width: 100%;
    position: relative;
    background-color: var(--background);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .game-content {
        padding: 1.5rem 1rem;
    }
}

.view-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-wrapper.centered-view {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* HUD */
.currency-hud {
    display: flex;
    justify-content: flex-end;
    gap: 1.25rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .currency-hud {
        justify-content: center;
        margin-bottom: 2rem;
        gap: 0.75rem;
    }
}

.hud-item {
    background: var(--surface);
    padding: 0.75rem 1.75rem;
    border-radius: 16px;
    border: var(--panel-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--card-shadow);
}

.hud-item .amount {
    font-size: 1.3rem;
    color: var(--primary);
}

.hud-item .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 800;
}

/* Common Panels */
.card-panel {
    background: var(--surface);
    padding: 4rem;
    border-radius: 32px;
    border: var(--panel-border);
    box-shadow: var(--card-shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.4s ease;
}

@media (max-width: 768px) {
    .card-panel {
        padding: 1.5rem;
    }

    .view-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

.info-trigger {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary);
    z-index: 10;
}

.tooltip {
    position: absolute;
    top: 3.5rem;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--primary);
    padding: 1.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
    width: 320px;
    text-align: left;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 100;
}

.info-trigger:hover .tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.btn-primary,
.btn-checkin,
.btn-buy,
.btn-save {
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1.25rem 3rem;
    border-radius: 14px;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
    font-size: 1.1rem;
}

.btn-primary:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.35);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-save {
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: white;
    border: none;
    padding: 1.1rem 2.5rem;
    border-radius: 14px;
    font-size: 1rem;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
    width: 100%;
}

.btn-save:hover:not(:disabled) {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.35);
}

.btn-save:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(1);
}

.btn-checkin {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1.75rem 5rem;
    font-size: 1.6rem;
    border-radius: 8px;
    letter-spacing: 2px;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
    clip-path: polygon(0 0, 95% 0, 100% 25%, 100% 100%, 5% 100%, 0 75%);
    margin: 2rem 0;
}

.btn-checkin:hover:not(:disabled) {
    transform: translateY(-5px) scale(1.03);
    filter: brightness(1.1);
    box-shadow: 0 15px 40px rgba(79, 70, 229, 0.4);
}

.btn-checkin:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    clip-path: none;
    filter: grayscale(1);
    box-shadow: none;
    opacity: 0.6;
}

/* Stats Display */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 3rem;
}

.stat-box {
    background: var(--background);
    padding: 2.5rem;
    border-radius: 28px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.stat-box:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.1);
}

.stat-box .amount {
    font-size: 2.8rem;
    color: var(--primary);
    display: block;
    margin-top: 0.75rem;
}

/* Shop Section */
.shop-tabs {
    display: flex;
    gap: 0.75rem;
    background: var(--border);
    padding: 0.5rem;
    border-radius: 50px;
    width: fit-content;
    margin: 0 auto 3rem;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 40px;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

@media (max-width: 768px) {
    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .shop-tabs {
        margin-bottom: 1.5rem;
    }
}

.tab-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

.shop-item {
    background: var(--surface);
    padding: 3.5rem 2.5rem;
    border-radius: 32px;
    border: var(--panel-border);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.shop-item:hover {
    transform: translateY(-12px);
}

.title-preview {
    padding: 1rem 2.5rem;
    border-radius: 16px;
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    width: 100%;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn-buy {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    width: 100%;
    font-size: 1rem;
    letter-spacing: 1px;
    margin-top: auto;
}

.btn-buy.active {
    background: var(--accent);
    box-shadow: 0 5px 20px rgba(244, 63, 94, 0.3);
}

/* Glow Effects */
.glow-gold {
    border: 2px solid var(--gold);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
}

.glow-red {
    border: 2px solid #ef4444;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.3);
}

.glow-blue {
    border: 2px solid var(--secondary);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.3);
}

/* Leaderboard */
.rank-card {
    background: var(--surface);
    padding: 1.5rem 2.5rem;
    border-radius: 20px;
    border: var(--panel-border);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .rank-card {
        padding: 1rem;
        gap: 0.75rem;
    }
}

.rank-card:hover {
    transform: scale(1.02) translateX(10px);
}

.rank {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--text-muted);
    min-width: 40px;
}

/* Admin CMS Controls */
.admin-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
    .admin-section-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.control-box {
    background: var(--background);
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.control-box .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 0.5px;
}

.control-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-session {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--primary);
    cursor: pointer;
    font-weight: 800;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-session:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.session-value {
    font-size: 1.8rem;
    color: var(--primary);
    min-width: 60px;
    text-align: center;
}

.admin-toggle-full {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: rgba(79, 70, 229, 0.04);
    border-radius: 24px;
    border: 1px solid var(--primary);
}

.switch {
    position: relative;
    width: 64px;
    height: 32px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border);
    transition: 0.4s;
    border-radius: 32px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.slider {
    background: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(32px);
}

.status-badge {
    padding: 0.6rem 1.25rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 800;
}

.status-badge.open {
    background: #10b981;
    color: white;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.status-badge.closed {
    background: var(--accent);
    color: white;
}

/* Utilities */
.theme-icon-toggle {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    font-size: 1.2rem;
    transition: background 0.2s;
}

.theme-icon-toggle:hover {
    background: var(--sidebar-hover);
}

.loader {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* --- PREMIUM TOURNAMENT SYSTEM --- */
.tournament-header {
    margin-bottom: 2.5rem;
    padding: 4rem 2rem !important;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.15), transparent),
        linear-gradient(135deg, var(--surface), var(--background));
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.tournament-badge {
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.tournament-title {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    font-family: 'Chakra Petch', sans-serif;
}

.tournament-meta {
    display: flex;
    justify-content: center;
    gap: 3rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.registration-form {
    margin-top: 3rem;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
    opacity: 0.9;
}

.input-group-fancy {
    display: flex;
    background: var(--background);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 0.4rem;
    transition: all 0.3s ease;
}

.input-group-fancy:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    transform: translateY(-2px);
}

.input-group-fancy input,
.input-group-fancy select {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    color: var(--text);
    font-size: 1rem;
    outline: none;
    appearance: none;
    /* Hide default OS select arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Custom Arrow for select */
.input-group-fancy select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Base styles for option */
.input-group-fancy select option {
    background-color: var(--surface);
    color: var(--text);
    padding: 1rem;
    font-size: 1rem;
}

.input-group-fancy select:focus {
    color: var(--primary);
}

.btn-premium {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    border: none;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-family: 'Chakra Petch', sans-serif;
}

.btn-premium:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

/* Standings & Rank Cards */
.standings-card {
    background: var(--surface);
    border-radius: 32px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.standing-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem;
    border-radius: 20px;
    margin-bottom: 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.standing-item:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(5px);
}

.standing-item.me {
    background: rgba(79, 70, 229, 0.08);
    border-color: rgba(79, 70, 229, 0.3);
}

.rank-badge {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 900;
    font-size: 0.9rem;
    background: var(--background);
    color: var(--text-muted);
}

.rank-1 .rank-badge {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: white;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.rank-2 .rank-badge {
    background: linear-gradient(135deg, #94a3b8, #475569);
    color: white;
}

.rank-3 .rank-badge {
    background: linear-gradient(135deg, #92400e, #451a03);
    color: white;
}

.player-avatar-small {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.player-main {
    flex: 1;
}

.player-name {
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-ign {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Chakra Petch', sans-serif;
    letter-spacing: 0.5px;
}

.player-score {
    text-align: right;
}

.score-val {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
    font-family: 'Chakra Petch', sans-serif;
}

.score-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* Status Tags */
.status-tag {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
}

.tag-mate {
    background: linear-gradient(45deg, #ef4444, #f59e0b);
    color: white;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.tag-dead {
    background: #374151;
    color: #9ca3af;
}

/* Group Cards */
.groups-container {
    background: var(--surface);
    border-radius: 32px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.group-fancy-card {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 24px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.group-fancy-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.03);
}

.group-label {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    display: block;
}

.fancy-member-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.fancy-member {
    font-size: 0.8rem;
    padding: 0.5rem;
    background: var(--background);
    border-radius: 8px;
    color: var(--text-muted);
}

.fancy-member.me {
    color: var(--primary);
    font-weight: 700;
    border: 1px solid var(--primary);
}

/* Common Card Style */
.card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 24px;
    border: var(--panel-border);
    box-shadow: var(--card-shadow);
}

/* Settings View */
.settings-form {
    background: var(--surface);
    padding: 3rem;
    border-radius: 32px;
    border: var(--panel-border);
    box-shadow: var(--card-shadow);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 2rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
    font-family: 'Chakra Petch', sans-serif;
}

.form-group input {
    width: 100%;
    padding: 1.25rem 1.75rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-group input[type="file"] {
    background: rgba(79, 70, 229, 0.03);
    border: 2px dashed var(--border);
    padding: 1.5rem;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: var(--primary);
}

.btn-save {
    margin-top: 1.5rem;
}

/* Initial Loader */
.initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--background);
    z-index: 9999;
    gap: 1.5rem;
}

.initial-loader p {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
    font-size: 0.9rem;
    text-transform: uppercase;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0.5;
        transform: scale(0.98);
    }
}


@media (max-width: 600px) {
    #rewards-grid-main, #rewards-grid-admin {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
