/* ================= CSS STYLES ================= */
:root {
    --primary: #FF5500;
    --primary-dark: #d64000;
    --bg-color: #f8f9fa;
    --text-dark: #222;
    --text-light: #666;
    --white: #ffffff;
    --card-bg: #ffffff;
    --border-color: #ddd;
    --input-bg: #fff;
    --sidebar-width: 280px;
}

body.dark-theme {
    --bg-color: #000000;
    --white: #0a0a0a;
    --card-bg: #0d0d0d;
    --text-dark: #f0f0f0;
    --text-light: #999999;
    --border-color: #1a1a1a;
    --input-bg: #111111;
}

body,
.match-card,
.game-card,
.panel,
.modal-content,
.auth-page,
.sidebar,
.sidebar-header,
.tab-btn {
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Hind Siliguri', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    padding-bottom: 80px;
    overflow-x: hidden;
    min-height: 100vh;
    animation: rrrPageFadeIn 0.25s ease-out;
}

@keyframes rrrPageFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Smooth, consistent transitions for interactive elements site-wide */
a, button, .game-card, .btn-login-nav, .btn-reg-nav, input, select, textarea {
    transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- HEADER --- */
header {
    background: var(--white);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo img {
    height: 45px;
    object-fit: contain;
}

.logo-text {
    font-weight: 800;
    font-size: 22px;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-btn {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 16px;
    transition: 0.3s;
}

body.dark-theme .theme-btn {
    background: rgba(255, 255, 255, 0.1);
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-login-nav {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    padding: 6px 15px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.btn-reg-nav {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.user-nav {
    display: none;
    align-items: center;
    gap: 15px;
}

.balance-pill {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.icon-btn {
    font-size: 22px;
    color: #333;
    cursor: pointer;
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    display: none;
}

.notif-dot {
    position: absolute;
    top: 0px;
    right: 0px;
    background: red;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: none;
}

/* --- AUTH PAGES (FULL SCREEN) --- */
.auth-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 2000;
    overflow-y: auto;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-page.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.auth-sub {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* --- SIDEBAR MENU --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: var(--sidebar-width);
    height: 100%;
    background: white;
    z-index: 999;
    transition: right 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    right: 0;
}

.notif-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: var(--sidebar-width);
    height: 100%;
    background: white;
    z-index: 999;
    transition: right 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.notif-sidebar.active {
    right: 0;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: #fff;
    position: relative;
}

.sidebar-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.sidebar-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #eee;
    object-fit: cover;
    border: 3px solid var(--primary);
    padding: 2px;
}

.user-info {
    text-align: center;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
    overflow-y: auto;
    flex: 1;
}

.sidebar-menu li {
    padding: 14px 25px;
    cursor: pointer;
    font-size: 15px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background 0.2s;
    font-weight: 500;
    border-left: 4px solid transparent;
}

.sidebar-menu li:hover {
    background: #fff5f5;
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-menu li i {
    width: 25px;
    text-align: center;
    font-size: 18px;
    color: #888;
}

.sidebar-menu li:hover i {
    color: var(--primary);
}

.notif-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.notif-icon {
    width: 35px;
    height: 35px;
    background: #fff0f0;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-content h5 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 3px;
}

.notif-content p {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
}

/* --- MAIN SECTIONS --- */
.app-section {
    padding: 15px;
    animation: slideUp 0.3s ease-out;
}

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

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

/* HERO & SLIDER */
.hero-banner {
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.alert-box {
    background: #222;
    color: white;
    padding: 8px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-container {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    font-size: 12px;
}

.section-title {
    font-weight: 800;
    font-size: 18px;
    margin: 15px 0;
    color: var(--text-dark);
    border-left: 4px solid var(--primary);
    padding-left: 10px;
}

/* --- GRID SYSTEM --- */
.category-list,
#matches-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {

    .category-list,
    #matches-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1200px) {
    #matches-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .category-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

.game-card {
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    padding: 0 20px;
    transition: transform 0.2s;
    background-color: #000;
}

.game-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    z-index: 1;
    transition: opacity 0.3s;
}

.game-card:hover .game-card-bg {
    opacity: 0.4;
}

.game-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.game-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    background: #fff;
}

/* --- Live section: bigger cards, default landscape (16:9) so the video
   thumbnail is actually visible instead of being cropped into a thin
   120px strip like the category cards above. --- */
#live-slot .category-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#live-slot .game-card {
    height: auto;
    aspect-ratio: 16 / 9;
    padding: 0 20px 16px;
    align-items: flex-end;
}

#live-slot .game-card-bg {
    opacity: 0.85;
}

#live-slot .game-card:hover .game-card-bg {
    opacity: 0.7;
}

@media (min-width: 768px) {
    #live-slot .category-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

.game-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-title {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.match-count {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.match-count::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #00ff00;
    border-radius: 50%;
}

/* --- MATCH VIEW --- */
.how-to-join-btn {
    background: #f1f1f1;
    color: #333;
    font-size: 12px;
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.tab-container {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    background: var(--card-bg);
    color: var(--text-light);
}

.tab-btn.active {
    background: #fff0f0;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.match-card {
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

.m-header {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.m-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.m-title-box {
    flex: 1;
}

.m-title {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.m-time {
    font-size: 10px;
    color: var(--primary);
    font-weight: 600;
}

.m-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-bottom: 15px;
    text-align: center;
}

.m-stat-box {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 9px;
    color: #777;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 11px;
    font-weight: 800;
    color: #000;
}

.progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 5px;
}

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

.m-status-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

.btn-join-outline {
    border: 1px solid var(--primary);
    color: white;
    background: var(--primary);
    padding: 8px 0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    width: 48%;
    text-align: center;
}

.btn-join-outline:hover {
    opacity: 0.9;
}

.btn-view-participants {
    border: 1px solid #333;
    color: #333;
    background: transparent;
    padding: 8px 0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    width: 48%;
    text-align: center;
}

.btn-view-participants:hover {
    background: #eee;
}

.btn-view-result {
    border: 1px solid #ccc;
    color: #333;
    background: #f9f9f9;
    padding: 4px 20px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    min-width: 80px;
    text-align: center;
    transition: 0.2s;
}

.btn-view-result:hover {
    background: #eee;
}

.btn-full-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: #fff;
    cursor: not-allowed;
    padding: 4px 20px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
}

.m-btn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.btn-prize {
    background: #333;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.btn-room {
    background: linear-gradient(45deg, #FF5500, #ff8800);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.timer-display {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #d64000;
    padding-top: 5px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
    background: #fff5f5;
    border-radius: 4px;
    padding: 5px;
}

/* RESULT VIEW PAGE */
.result-view-header {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.result-view-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 15px;
}

.result-table th {
    background: #f8f9fa;
    text-align: left;
    padding: 10px;
    font-weight: 700;
    color: #444;
    border-bottom: 2px solid #eee;
}

.result-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.result-table tr:last-child td {
    border-bottom: none;
}

.winner-row {
    background: #f0fff4;
}

/* GENERAL UI ELEMENTS */
.card-panel {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
}

.card-panel h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-field {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: 0.3s;
    font-size: 14px;
    background: var(--input-bg);
    color: var(--text-dark);
}

.input-field:focus {
    border-color: var(--primary);
    background: var(--input-bg);
    box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.1);
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    width: 100%;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(255, 85, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CANCEL BUTTON STYLE */
.btn-cancel {
    background: #f1f1f1;
    color: #555;
    border: 1px solid #ddd;
    padding: 16px;
    border-radius: 8px;
    width: 100%;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    text-align: center;
    display: block;
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-cancel:hover {
    background: #e9e9e9;
    border-color: #ccc;
}

/* GOOGLE BTN STYLE */
.google-btn {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: 0.2s;
}

.google-btn:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

/* MODALS */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    padding: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal.active {
    display: flex;
    animation: fadeIn 0.2s;
}

.modal-box {
    background: var(--card-bg);
    width: 100%;
    max-width: 400px;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
}

/* PAYMENT & RULES */
.payment-details-box {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
}

/* Bkash Theme */
.theme-bkash-bg {
    background: #e2136e;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

/* Nagad Theme */
.theme-nagad-bg {
    background: #ec1c24;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.rules-box {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.rules-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000;
}

.rules-list {
    list-style: none;
    font-size: 12px;
    color: #444;
    line-height: 1.8;
}

.rules-list li {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.rules-list li i {
    color: #d64000;
    margin-top: 4px;
    font-size: 10px;
}

.step-container {
    display: none;
    animation: slideInRight 0.3s ease;
}

.step-container.active-step {
    display: block;
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

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

.method-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 15px;
    background: #fff;
    transition: 0.2s;
}

.method-btn:hover {
    border-color: var(--primary);
    background: #fff5f5;
}

.method-btn img {
    height: 35px;
    object-fit: contain;
}

.back-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    cursor: pointer;
    color: var(--text-light);
    font-weight: 600;
}

.hidden {
    display: none !important;
}

/* Joined Members Table */
.joined-list {
    list-style: none;
    padding: 0;
}

.joined-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #eee;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 5px;
}

.joined-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.joined-uid {
    font-size: 12px;
    color: #777;
}

/* =====================================================================
   THEME: theme-toxic / theme-elite — v22/v23 (screenshot-based +
   "Elite" premium look). Everything from here on is scoped under
   body.theme-toxic or body.theme-elite so it never touches the
   "Original" theme. Switch it from Admin > App Banners > Template.
   ===================================================================== */

/* Hidden by default on the original theme; only the new themes show them. */
.bottom-nav,
.wallet-hero,
.profile-hero {
    display: none;
}

body.theme-toxic {
    --toxic-navy: #12172b;
    --toxic-navy-2: #1b2140;
    --toxic-accent: #ff5500;
    --toxic-blue: #2b6fff;
}

body.theme-elite {
    --toxic-navy: #0f0c29;
    --toxic-navy-2: #24243e;
    --toxic-accent: #a855f7;
    --toxic-blue: #00e5ff;
}

/* Room for the fixed bottom nav so content never sits under it. */
body.theme-toxic #main-content {
    padding-bottom: 78px;
}

/* Room for the fixed bottom nav so content never sits under it. */
body.theme-elite #main-content {
    padding-bottom: 78px;
}

/* On the original theme this stays hidden via the default rule above.
   Under theme-toxic we turn it into the fixed 5-icon bar from the
   screenshots. */
body.theme-toxic .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
    padding: 8px 0 6px;
}

/* On the original theme this stays hidden via the default rule above.
   Under theme-toxic we turn it into the fixed 5-icon bar from the
   screenshots. */
body.theme-elite .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 500;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
    padding: 8px 0 6px;
}

body.theme-toxic .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #888;
    text-decoration: none;
}

body.theme-elite .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #888;
    text-decoration: none;
}

body.theme-toxic .bottom-nav-item i {
    font-size: 18px;
}

body.theme-elite .bottom-nav-item i {
    font-size: 18px;
}

body.theme-toxic .bottom-nav-item.active {
    color: var(--toxic-accent);
}

body.theme-elite .bottom-nav-item.active {
    color: var(--toxic-accent);
}

/* The "Play" icon gets the highlighted circle treatment from the
   screenshot regardless of active state, matching the reference design. */
body.theme-toxic .bottom-nav-item:nth-child(2) i {
    background: #efe6ff;
    color: #7c4dff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

/* The "Play" icon gets the highlighted circle treatment from the
   screenshot regardless of active state, matching the reference design. */
body.theme-elite .bottom-nav-item:nth-child(2) i {
    background: #efe6ff;
    color: #7c4dff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

/* ---- Category grid & match cards (Play tab) ------------------------ */
body.theme-toxic .match-card {
    border-radius: 14px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* ---- Category grid & match cards (Play tab) ------------------------ */
body.theme-elite .match-card {
    border-radius: 14px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

body.theme-toxic .m-stats-grid {
    background: #fafafa;
}

body.theme-elite .m-stats-grid {
    background: #fafafa;
}

body.theme-toxic .timer-display.match-countdown {
    background: #1fae5c;
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    padding: 6px 10px;
    display: inline-block;
}

body.theme-elite .timer-display.match-countdown {
    background: #1fae5c;
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    padding: 6px 10px;
    display: inline-block;
}

body.theme-toxic .primary-btn {
    background: var(--toxic-accent);
    border-radius: 8px;
}

body.theme-elite .primary-btn {
    background: var(--toxic-accent);
    border-radius: 8px;
}

/* Desktop: use the full width as a responsive grid instead of a narrow
   phone-width column — category list and match list both get a proper
   multi-column layout on larger screens. */
@media (min-width: 900px) {
    body.theme-toxic #main-content {
        max-width: 1200px;
        margin: 0 auto;
        padding-left: 24px;
        padding-right: 24px;
    }

    body.theme-elite #main-content {
        max-width: 1200px;
        margin: 0 auto;
        padding-left: 24px;
        padding-right: 24px;
    }

    body.theme-toxic .category-list {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    body.theme-elite .category-list {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    body.theme-toxic #matches-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        align-items: start;
    }

    body.theme-elite #matches-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        align-items: start;
    }

    /* The fixed bottom nav becomes a slim top-of-content bar on desktop
       instead of a phone-style tab strip pinned to the browser edge. */
    body.theme-toxic .bottom-nav {
        position: sticky;
        top: 0;
        max-width: 1200px;
        margin: 0 auto 20px;
        border-radius: 12px;
        border: 1px solid #eee;
    }

    body.theme-elite .bottom-nav {
        position: sticky;
        top: 0;
        max-width: 1200px;
        margin: 0 auto 20px;
        border-radius: 12px;
        border: 1px solid #eee;
    }

    body.theme-toxic #main-content {
        padding-bottom: 24px;
    }

    body.theme-elite #main-content {
        padding-bottom: 24px;
    }
}

/* ---- Modals (Join Match / Room Details / info popups) -------------- */
body.theme-toxic .modal-box {
    border-radius: 16px;
    padding: 22px;
}

/* ---- Modals (Join Match / Room Details / info popups) -------------- */
body.theme-elite .modal-box {
    border-radius: 16px;
    padding: 22px;
}

body.theme-toxic .btn-cancel {
    border-radius: 8px;
}

body.theme-elite .btn-cancel {
    border-radius: 8px;
}

/* ---- Wallet hero card ------------------------------------------------ */
body.theme-toxic .wallet-hero {
    display: block;
    max-width: 480px;
    margin: 0 auto 20px;
}

/* ---- Wallet hero card ------------------------------------------------ */
body.theme-elite .wallet-hero {
    display: block;
    max-width: 480px;
    margin: 0 auto 20px;
}

body.theme-toxic .wallet-hero-card {
    background: linear-gradient(135deg, var(--toxic-blue), var(--toxic-navy-2));
    color: #fff;
    border-radius: 16px;
    padding: 20px;
}

body.theme-elite .wallet-hero-card {
    background: linear-gradient(135deg, var(--toxic-blue), var(--toxic-navy-2));
    color: #fff;
    border-radius: 16px;
    padding: 20px;
}

body.theme-toxic .wallet-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 13px;
    opacity: 0.9;
}

body.theme-elite .wallet-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 13px;
    opacity: 0.9;
}

body.theme-toxic .wallet-hero-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
}

body.theme-elite .wallet-hero-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
}

body.theme-toxic .wallet-hero-label {
    margin-top: 16px;
    font-size: 12px;
    opacity: 0.8;
}

body.theme-elite .wallet-hero-label {
    margin-top: 16px;
    font-size: 12px;
    opacity: 0.8;
}

body.theme-toxic .wallet-hero-amount {
    font-size: 32px;
    font-weight: 800;
    margin-top: 4px;
}

body.theme-elite .wallet-hero-amount {
    font-size: 32px;
    font-weight: 800;
    margin-top: 4px;
}

body.theme-toxic .wallet-hero-stats {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

body.theme-elite .wallet-hero-stats {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

body.theme-toxic .wallet-hero-stat {
    flex: 1;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}

body.theme-elite .wallet-hero-stat {
    flex: 1;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}

body.theme-toxic .wallet-hero-stat i {
    color: var(--toxic-blue);
    margin-bottom: 4px;
}

body.theme-elite .wallet-hero-stat i {
    color: var(--toxic-blue);
    margin-bottom: 4px;
}

body.theme-toxic .wallet-hero-stat-label {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

body.theme-elite .wallet-hero-stat-label {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

body.theme-toxic .wallet-hero-stat-val {
    font-size: 18px;
    font-weight: 800;
    color: #222;
}

body.theme-elite .wallet-hero-stat-val {
    font-size: 18px;
    font-weight: 800;
    color: #222;
}

body.theme-toxic .wallet-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

body.theme-elite .wallet-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}

body.theme-toxic .wallet-hero-btn {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}

body.theme-elite .wallet-hero-btn {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}

body.theme-toxic .wallet-hero-btn.add {
    background: var(--toxic-blue);
    color: #fff;
}

body.theme-elite .wallet-hero-btn.add {
    background: var(--toxic-blue);
    color: #fff;
}

body.theme-toxic .wallet-hero-btn.withdraw {
    background: #1fae5c;
    color: #fff;
}

body.theme-elite .wallet-hero-btn.withdraw {
    background: #1fae5c;
    color: #fff;
}

body.theme-toxic .wallet-hero-quick {
    margin-top: 14px;
}

body.theme-elite .wallet-hero-quick {
    margin-top: 14px;
}

body.theme-toxic .wallet-hero-quick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px;
    text-decoration: none;
    color: #222;
}

body.theme-elite .wallet-hero-quick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px;
    text-decoration: none;
    color: #222;
}

body.theme-toxic .wallet-hero-quick-item i {
    color: var(--toxic-blue);
    font-size: 18px;
}

body.theme-elite .wallet-hero-quick-item i {
    color: var(--toxic-blue);
    font-size: 18px;
}

body.theme-toxic .wallet-hero-quick-title {
    font-weight: 700;
    font-size: 14px;
}

body.theme-elite .wallet-hero-quick-title {
    font-weight: 700;
    font-size: 14px;
}

body.theme-toxic .wallet-hero-quick-sub {
    font-size: 12px;
    color: #888;
}

body.theme-elite .wallet-hero-quick-sub {
    font-size: 12px;
    color: #888;
}

/* ---- Profile hero + menu list ---------------------------------------- */
body.theme-toxic .profile-hero {
    display: block;
    max-width: 480px;
    margin: 0 auto 20px;
}

/* ---- Profile hero + menu list ---------------------------------------- */
body.theme-elite .profile-hero {
    display: block;
    max-width: 480px;
    margin: 0 auto 20px;
}

body.theme-toxic .original-theme-only {
    display: none;
}

body.theme-elite .original-theme-only {
    display: none;
}

body.theme-toxic .profile-hero-header {
    text-align: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 24px 20px 16px;
}

body.theme-elite .profile-hero-header {
    text-align: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 24px 20px 16px;
}

body.theme-toxic .profile-hero-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

body.theme-elite .profile-hero-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

body.theme-toxic .profile-hero-name {
    font-weight: 700;
    font-size: 17px;
}

body.theme-elite .profile-hero-name {
    font-weight: 700;
    font-size: 17px;
}

body.theme-toxic .profile-hero-stats {
    display: flex;
    background: #fff;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 16px 16px;
    margin-top: -1px;
    margin-bottom: 14px;
    padding: 12px 0;
}

body.theme-elite .profile-hero-stats {
    display: flex;
    background: #fff;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 16px 16px;
    margin-top: -1px;
    margin-bottom: 14px;
    padding: 12px 0;
}

body.theme-toxic .profile-hero-stat {
    flex: 1;
    text-align: center;
    border-right: 1px solid #eee;
}

body.theme-elite .profile-hero-stat {
    flex: 1;
    text-align: center;
    border-right: 1px solid #eee;
}

body.theme-toxic .profile-hero-stat:last-child {
    border-right: none;
}

body.theme-elite .profile-hero-stat:last-child {
    border-right: none;
}

body.theme-toxic .profile-hero-stat-val {
    font-weight: 800;
    font-size: 16px;
    color: var(--toxic-blue);
}

body.theme-elite .profile-hero-stat-val {
    font-weight: 800;
    font-size: 16px;
    color: var(--toxic-blue);
}

body.theme-toxic .profile-hero-stat-label {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

body.theme-elite .profile-hero-stat-label {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

body.theme-toxic .profile-hero-menu {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    overflow: hidden;
}

body.theme-elite .profile-hero-menu {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    overflow: hidden;
}

body.theme-toxic .profile-hero-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    border-bottom: 1px solid #f2f2f2;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

body.theme-elite .profile-hero-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    border-bottom: 1px solid #f2f2f2;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

body.theme-toxic .profile-hero-menu-item:last-child {
    border-bottom: none;
}

body.theme-elite .profile-hero-menu-item:last-child {
    border-bottom: none;
}

body.theme-toxic .profile-hero-menu-item i {
    color: var(--toxic-blue);
    width: 18px;
    text-align: center;
}

body.theme-elite .profile-hero-menu-item i {
    color: var(--toxic-blue);
    width: 18px;
    text-align: center;
}

body.theme-toxic .profile-hero-menu-item.logout-item {
    color: #fff;
    background: var(--toxic-blue);
    justify-content: center;
    font-weight: 700;
}

body.theme-elite .profile-hero-menu-item.logout-item {
    color: #fff;
    background: var(--toxic-blue);
    justify-content: center;
    font-weight: 700;
}

body.theme-toxic .profile-hero-menu-item.logout-item i {
    display: none;
}

body.theme-elite .profile-hero-menu-item.logout-item i {
    display: none;
}

@media (min-width: 900px) {

    body.theme-toxic .wallet-hero,
    body.theme-toxic .profile-hero {
        max-width: 520px;
    }

    body.theme-elite .wallet-hero,
    body.theme-elite .profile-hero {
        max-width: 520px;
    }
}


/* New Results page (results.php) — base styling, works under either theme. */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
}

.result-item-img {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.result-item-info {
    flex: 1;
    min-width: 0;
}

.result-item-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
}

.result-item-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.result-item-prize {
    font-weight: 800;
    font-size: 15px;
    color: var(--text-light);
}

.result-item-prize.won {
    color: #1fae5c;
}


/* AMOLED dark mode: cards get a soft glow instead of a shadow (shadows
   don't read against pure black) so they still feel like they're
   floating above the page instead of blending flat into it. */
body.dark-theme .card-panel,
body.dark-theme .match-card,
body.dark-theme .modal-box,
body.dark-theme .wallet-hero-stat,
body.dark-theme .wallet-hero-quick-item,
body.dark-theme .profile-hero-header,
body.dark-theme .profile-hero-stats,
body.dark-theme .profile-hero-menu {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 4px 20px rgba(0, 0, 0, 0.6);
}

/* ---- Category cards under the new theme: thumbnail only, no circular
   icon overlay (that overlay stays on the Original theme), redesigned
   as a clean top-image + white-info "boxed" card like the reference. */
body.theme-toxic .game-card {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
}

/* ---- Category cards under the new theme: thumbnail only, no circular
   icon overlay (that overlay stays on the Original theme), redesigned
   as a clean top-image + white-info "boxed" card like the reference. */
body.theme-elite .game-card {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
}

body.theme-toxic .game-card-bg {
    position: static;
    width: 100%;
    height: 110px;
    opacity: 1;
    border-radius: 12px 12px 0 0;
}

body.theme-elite .game-card-bg {
    position: static;
    width: 100%;
    height: 110px;
    opacity: 1;
    border-radius: 12px 12px 0 0;
}

body.theme-toxic .game-card:hover .game-card-bg {
    opacity: 1;
}

body.theme-elite .game-card:hover .game-card-bg {
    opacity: 1;
}

body.theme-toxic .game-avatar {
    display: none;
}

body.theme-elite .game-avatar {
    display: none;
}

body.theme-toxic .game-card-content {
    position: static;
    display: block;
    width: auto;
    padding: 10px 12px;
}

body.theme-elite .game-card-content {
    position: static;
    display: block;
    width: auto;
    padding: 10px 12px;
}

body.theme-toxic .game-title {
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
    text-shadow: none;
}

body.theme-elite .game-title {
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
    text-shadow: none;
}

body.theme-toxic .match-count {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 3px;
}

body.theme-elite .match-count {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 3px;
}

body.theme-toxic .match-count::before {
    display: none;
}

body.theme-elite .match-count::before {
    display: none;
}

/* ---- Profile hero: email/ID lines under the name ---------------------- */
body.theme-toxic .profile-hero-email {
    color: var(--text-light);
    font-size: 13px;
    margin-top: 2px;
}

/* ---- Profile hero: email/ID lines under the name ---------------------- */
body.theme-elite .profile-hero-email {
    color: var(--text-light);
    font-size: 13px;
    margin-top: 2px;
}

body.theme-toxic .profile-hero-id {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 2px;
}

body.theme-elite .profile-hero-id {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 2px;
}

/* ---- All Rules page (rules.php) --------------------------------------- */
.rules-block {
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
}

.rules-block:last-child {
    border-bottom: none;
}

.rules-block-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.rules-block-body {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

/* New theme: 2-column boxed grid even on small phones (the reference
   design uses 2 cards per row from the start, not stacked full-width). */
body.theme-toxic .category-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* New theme: 2-column boxed grid even on small phones (the reference
   design uses 2 cards per row from the start, not stacked full-width). */
body.theme-elite .category-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}


/* =====================================================================
   THEME: theme-elite (v23) — original, top-tier premium design.
   Everything below only targets body.theme-elite and is appended last
   on purpose: it reuses theme-toxic's layout/structure (grid, nav,
   card skeletons — already cloned above) and overrides just the look
   with a distinct dark glassmorphic + neon aesthetic and animation
   layer. No new endpoints, no new data flow — pure CSS/visual.
   ===================================================================== */

@keyframes eliteFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

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

@keyframes eliteGlow {

    0%,
    100% {
        box-shadow: 0 0 12px rgba(168, 85, 247, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06);
    }

    50% {
        box-shadow: 0 0 22px rgba(0, 229, 255, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
    }
}

@keyframes eliteShimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes eliteBgDrift {
    0% {
        background-position: 0% 50%;
    }

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

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

body.theme-elite {
    background: linear-gradient(120deg, #0f0c29, #1b1240, #24243e, #150e33);
    background-size: 300% 300%;
    animation: eliteBgDrift 18s ease infinite;
}

body.theme-elite header,
body.theme-elite .sidebar,
body.theme-elite .card-panel,
body.theme-elite .match-card,
body.theme-elite .game-card,
body.theme-elite .wallet-hero-card,
body.theme-elite .wallet-hero-stat,
body.theme-elite .wallet-hero-quick-item,
body.theme-elite .profile-hero-header,
body.theme-elite .profile-hero-stats,
body.theme-elite .profile-hero-menu,
body.theme-elite .modal-box,
body.theme-elite .bottom-nav {
    background: rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f1eaff;
    animation: eliteFadeUp 0.5s ease both;
}

body.theme-elite .m-stats-grid,
body.theme-elite .wallet-hero-quick-item,
body.theme-elite .profile-hero-menu-item {
    background: transparent !important;
}

body.theme-elite .game-title,
body.theme-elite .m-title,
body.theme-elite .wallet-hero-stat-val,
body.theme-elite .profile-hero-name,
body.theme-elite .card-panel h3,
body.theme-elite .logo-text {
    color: #ffffff !important;
}

body.theme-elite .m-time,
body.theme-elite .match-count,
body.theme-elite .wallet-hero-stat-label,
body.theme-elite .wallet-hero-quick-sub,
body.theme-elite .profile-hero-stat-label,
body.theme-elite .profile-hero-email,
body.theme-elite .profile-hero-id,
body.theme-elite .bottom-nav-item {
    color: #b8aee0 !important;
}

/* Neon gradient buttons with a hover glow + lift, not flat orange. */
body.theme-elite .primary-btn,
body.theme-elite .wallet-hero-btn.add,
body.theme-elite .wallet-hero-btn.withdraw {
    background: linear-gradient(90deg, #a855f7, #00e5ff) !important;
    border: none;
    color: #0f0c29 !important;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.theme-elite .primary-btn:hover,
body.theme-elite .wallet-hero-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 22px rgba(168, 85, 247, 0.45);
}

/* Animated glowing balance number — feels alive, premium. */
body.theme-elite .wallet-hero-amount {
    background: linear-gradient(90deg, #a855f7, #00e5ff, #a855f7);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: eliteShimmer 3s linear infinite;
}

/* Category cards: glass, image zoom + lift on hover, glowing border. */
body.theme-elite .game-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

body.theme-elite .game-card:hover {
    transform: translateY(-4px);
    animation: eliteGlow 1.6s ease infinite;
}

body.theme-elite .game-card-bg {
    transition: transform 0.4s ease;
}

body.theme-elite .game-card:hover .game-card-bg {
    transform: scale(1.08);
}

/* Match cards: subtle glowing accent line on top instead of a plain border. */
body.theme-elite .match-card {
    position: relative;
    overflow: hidden;
}

body.theme-elite .match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #a855f7, #00e5ff);
}

body.theme-elite .timer-display.match-countdown {
    background: linear-gradient(90deg, #16a34a, #00e5ff) !important;
    color: #08131a !important;
    font-weight: 800;
}

/* Avatar gets a soft glowing ring instead of a plain border. */
body.theme-elite .profile-hero-avatar {
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.25), 0 0 18px rgba(0, 229, 255, 0.35);
}

body.theme-elite .profile-hero-menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: background 0.2s ease, padding-left 0.2s ease;
}

body.theme-elite .profile-hero-menu-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    padding-left: 22px;
}

body.theme-elite .profile-hero-menu-item.logout-item {
    background: linear-gradient(90deg, #a855f7, #00e5ff) !important;
    color: #0f0c29 !important;
}

/* Bottom nav: glass bar with an animated glowing active icon instead of
   a flat white strip. */
body.theme-elite .bottom-nav-item.active {
    color: #00e5ff !important;
}

body.theme-elite .bottom-nav-item:nth-child(2) i {
    background: linear-gradient(135deg, #a855f7, #00e5ff) !important;
    color: #0f0c29 !important;
    animation: eliteGlow 2.2s ease infinite;
}

/* Staggered entrance for category/match cards so the page feels alive
   on load instead of everything popping in at once. */
body.theme-elite .category-list>*:nth-child(1) { animation-delay: 0.03s; }
body.theme-elite .category-list>*:nth-child(2) { animation-delay: 0.08s; }
body.theme-elite .category-list>*:nth-child(3) { animation-delay: 0.13s; }
body.theme-elite .category-list>*:nth-child(4) { animation-delay: 0.18s; }
body.theme-elite #matches-container>*:nth-child(1) { animation-delay: 0.03s; }
body.theme-elite #matches-container>*:nth-child(2) { animation-delay: 0.08s; }
body.theme-elite #matches-container>*:nth-child(3) { animation-delay: 0.13s; }
body.theme-elite #matches-container>*:nth-child(4) { animation-delay: 0.18s; }


/* Full-screen RGB animated border frame (see includes/header.php).
   Hidden by default (opacity 0, pointer-events off so it never blocks
   taps); shown by adding .active on page load and on link/form taps.
   Works the same under every theme — deliberately loud/colorful on
   purpose so it reads as "actively loading", not "site is slow". */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    pointer-events: none;
    border: 5px solid transparent;
    border-image: linear-gradient(90deg,
            #ff0000, #ff9900, #ffee00, #33ff00, #00ffee, #0033ff, #cc00ff, #ff0000) 1;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#page-loader.active {
    opacity: 1;
    animation: pageLoaderRgbSpin 1.4s linear infinite;
}

@keyframes pageLoaderRgbSpin {
    from {
        filter: hue-rotate(0deg);
    }

    to {
        filter: hue-rotate(360deg);
    }
}

/* ---- Fix: Elite theme sidebar header was white-on-white (name/email invisible) ---- */
body.theme-elite .sidebar-header {
    background: rgba(255, 255, 255, 0.06) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

body.theme-elite .user-info h4 {
    color: #f1eaff !important;
}

body.theme-elite .user-info p {
    color: #b8aee0 !important;
}
