/* Design Tokens */
:root {
    --bg-dark: #090b11;
    --card-bg: rgba(20, 24, 38, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --sidebar-bg: #0f121d;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --primary: #00d2ff;
    --primary-glow: rgba(0, 210, 255, 0.2);
    --success: #00e676;
    --success-glow: rgba(0, 230, 118, 0.15);
    --warning: #ffb300;
    --error: #ff1744;
    --error-glow: rgba(255, 23, 68, 0.2);
    --purple: #d500f9;
    --font-inter: 'Inter', sans-serif;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-inter);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar styling */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
}

.sidebar-header {
    margin-bottom: 40px;
}

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

.logo-accent {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.logo-sub {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-top: 4px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item {
    background: none;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    width: 100%;
}

.menu-item:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.03);
}

.menu-item.active {
    color: var(--primary);
    background-color: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.15);
}

.menu-icon {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.profile-info .name {
    font-size: 14px;
    font-weight: 600;
}

.profile-info .role {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.content-header {
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(9, 11, 17, 0.8);
    backdrop-filter: blur(10px);
}

.title-section h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

.scroll-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 30px;
}

/* Tab Panel Switching */
.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.kpi-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon-wrapper.blue { background-color: rgba(0, 210, 255, 0.1); color: var(--primary); }
.kpi-icon-wrapper.green { background-color: rgba(0, 230, 118, 0.1); color: var(--success); }
.kpi-icon-wrapper.purple { background-color: rgba(213, 0, 249, 0.1); color: var(--purple); }
.kpi-icon-wrapper.orange { background-color: rgba(255, 179, 0, 0.1); color: var(--warning); }

.kpi-icon {
    width: 22px;
    height: 22px;
}

.kpi-data {
    display: flex;
    flex-direction: column;
}

.kpi-title {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.kpi-value {
    font-size: 22px;
    font-weight: 700;
    margin-top: 4px;
}

/* Dashboard Grid layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

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

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* Revenue Card Display */
.revenue-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.revenue-display {
    padding: 30px 0;
}

.revenue-value {
    font-size: 48px;
    font-weight: 800;
    color: var(--success);
    text-shadow: 0 0 20px var(--success-glow);
}

.revenue-description {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 16px;
    line-height: 1.5;
}

/* Forms */
.contest-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

input {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-main);
    font-family: var(--font-inter);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Buttons */
.btn {
    border: none;
    outline: none;
    font-family: var(--font-inter);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 15px var(--primary);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-icon-svg {
    width: 16px;
    height: 16px;
}

.btn-full {
    width: 100%;
    padding: 12px;
}

/* Data Tables */
.table-card {
    padding: 0;
    overflow: hidden;
}

.card-table-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.search-box input {
    width: 260px;
    border-radius: 20px;
    padding: 8px 16px;
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.data-table th {
    padding: 16px 24px;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.01);
}

.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tr:hover {
    background-color: rgba(255, 255, 255, 0.01);
}

.table-placeholder {
    text-align: center;
    padding: 50px 0;
    color: var(--text-muted);
    font-style: italic;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success { background-color: rgba(0, 230, 118, 0.1); color: var(--success); }
.badge-warning { background-color: rgba(255, 179, 0, 0.1); color: var(--warning); }
.badge-error { background-color: rgba(255, 23, 68, 0.1); color: var(--error); }
.badge-info { background-color: rgba(0, 210, 255, 0.1); color: var(--primary); }

/* User detail elements */
.user-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-name {
    font-weight: 600;
}

.user-phone {
    font-size: 11px;
    color: var(--text-muted);
}

.balance-grid {
    display: flex;
    gap: 16px;
}

.bal-item {
    font-size: 12px;
}

.bal-lbl {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.bal-val {
    font-weight: 600;
    margin-top: 2px;
}

.bal-val.dep { color: var(--primary); }
.bal-val.win { color: var(--success); }
.bal-val.bon { color: var(--purple); }

/* Table Action Buttons */
.btn-action {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 6px;
    font-weight: 600;
}

.btn-ban {
    background-color: rgba(255, 23, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(255, 23, 68, 0.2);
}

.btn-ban:hover {
    background-color: var(--error);
    color: #fff;
}

.btn-unban {
    background-color: rgba(0, 230, 118, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.btn-unban:hover {
    background-color: var(--success);
    color: #000;
}

/* Toast */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #1a1e2f;
    border-left: 4px solid var(--primary);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
}

.toast-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Custom Scrollbar for Sleek Look */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 11, 17, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.modal-content {
    background-color: #0f121d;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 95%;
    max-width: 550px;
    padding: 30px;
    box-shadow: var(--shadow);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-close:hover {
    color: var(--text-main);
}

/* Prize Rules Section */
.prize-rules-section {
    margin-top: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.01);
}

.prize-rules-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.prize-rules-section h3 {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.prize-rules-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 5px;
}

.prize-rule-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr 1.2fr auto;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.2s ease-out;
}

.prize-rule-row span {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-remove-rule {
    background: none;
    border: none;
    color: var(--error);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.btn-remove-rule:hover {
    color: #ff5252;
}

.quiz-question-card {
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    animation: fadeIn 0.2s ease-out;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-question-card .question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quiz-question-card .question-header input {
    flex: 1;
    padding: 8px 12px;
}

.quiz-question-card .question-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quiz-question-card .question-options-grid input {
    padding: 8px 12px;
}

.quiz-question-card .question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.quiz-question-card .question-footer .correct-select-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quiz-question-card .question-footer select {
    background: #1e293b;
    color: #fff;
    border: 1px solid #334155;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: inherit;
}

/* ==========================================
   ADMIN LOGIN SCREEN STYLING
   ========================================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at 50% 50%, rgba(0, 210, 255, 0.09) 0%, transparent 65%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.login-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    background: rgba(15, 18, 29, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    text-align: center;
    animation: loginFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-header {
    margin-bottom: 30px;
}

.login-card .logo {
    font-size: 32px;
    margin-bottom: 4px;
}

/* ==========================================
   USER PROFILE DETAILS STYLING
   ========================================== */
.profile-section-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    font-weight: 700;
    margin-top: 5px;
    margin-bottom: 12px;
    border-left: 3px solid var(--primary);
    padding-left: 8px;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 8px;
}

.profile-card {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
}

.profile-field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
}

.profile-field-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-field-row:first-child {
    padding-top: 0;
}

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

.profile-field-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.profile-stat-box {
    background-color: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}

.profile-stat-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.profile-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


