/* ===== CSS Variables ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.1);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ===== Utility Classes ===== */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-glow {
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    }
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    transform: scale(1.05);
}

.btn-icon.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border-color: var(--danger);
}

/* ===== Screens ===== */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
}

/* ===== Login Screen ===== */
#login-screen {
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container {
    display: flex;
    gap: 30px;
    max-width: 900px;
    width: 100%;
    z-index: 1;
}

.login-card {
    flex: 1;
    padding: 40px;
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    box-shadow: var(--shadow-glow);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-body {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-group label i {
    color: var(--primary-light);
}

.input-group input {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.login-footer {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.stats-preview {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-item i {
    font-size: 24px;
    color: var(--primary-light);
}

.stat-item span {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-item label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Leaderboard Preview */
.leaderboard-preview {
    width: 350px;
    padding: 30px;
}

.leaderboard-preview h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--accent);
}

.leaderboard-preview h3 i {
    color: var(--accent);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.leaderboard-item:hover {
    background: var(--bg-glass-hover);
}

.leaderboard-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
}

.leaderboard-rank.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1e1b4b;
}

.leaderboard-rank.rank-2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: white;
}

.leaderboard-rank.rank-3 {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

.leaderboard-rank.rank-other {
    background: var(--bg-glass);
    color: var(--text-secondary);
}

.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    overflow: hidden;
}

.leaderboard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leaderboard-info {
    flex: 1;
    min-width: 0;
}

.leaderboard-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-stats {
    font-size: 12px;
    color: var(--text-muted);
}

.leaderboard-points {
    font-weight: 700;
    color: var(--accent);
    font-size: 16px;
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0.1;
    animation: float-shape 20s infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float-shape {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(50px, 50px) rotate(90deg);
    }

    50% {
        transform: translate(0, 100px) rotate(180deg);
    }

    75% {
        transform: translate(-50px, 50px) rotate(270deg);
    }
}

/* ===== Quiz Screen ===== */
#quiz-screen {
    padding: 20px;
}

.quiz-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Header */
.quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 16px;
}

.user-score {
    font-size: 13px;
    color: var(--accent);
}

.user-score i {
    font-size: 12px;
}

/* Timer */
.timer-container {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: var(--bg-glass);
    stroke-width: 6;
}

.timer-ring-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.timer-ring-progress.warning {
    stroke: var(--warning);
}

.timer-ring-progress.danger {
    stroke: var(--danger);
}

.timer-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition);
}

.timer-text.danger {
    color: var(--danger);
    animation: timer-pulse 1s infinite;
}

@keyframes timer-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
        text-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
    }
}

.timer-container.hidden {
    opacity: 0.3;
}

/* Main Content */
.quiz-main {
    flex: 1;
    display: flex;
    gap: 20px;
    min-height: 0;
}

/* Participants Sidebar */
.participants-sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.sidebar-header h3 i {
    color: var(--primary-light);
}

.participant-count {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.participants-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.participant-item.me {
    border: 1px solid var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

.participant-item.me .participant-name strong {
    color: var(--primary-light);
}

.message-item.me {
    background: rgba(99, 102, 241, 0.05);
    border-left: 3px solid var(--primary);
}

.message-item.me .message-sender {
    color: var(--primary-light);
}

.participant-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    overflow: hidden;
}

.participant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.participant-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: var(--success);
    border: 2px solid var(--bg-dark);
    border-radius: 50%;
}

.participant-info {
    flex: 1;
    min-width: 0;
}

.participant-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.participant-points {
    font-size: 12px;
    color: var(--accent);
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Question Banner */
.question-banner {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    min-height: 120px;
}

.question-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    font-size: 18px;
    color: var(--text-secondary);
}

.question-status.waiting i {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.question-content {
    text-align: center;
}

.question-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--bg-glass);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary-light);
    margin-bottom: 15px;
    text-transform: capitalize;
}

.question-text {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 15px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-points {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.welcome-message {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
}

.bot-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.welcome-content h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.welcome-content p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.welcome-content ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.welcome-content li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.welcome-content li i {
    color: var(--primary-light);
    width: 20px;
}

/* Message Items */
.message-item {
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-avatar.bot {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.message-avatar.system {
    background: var(--text-muted);
}

.message-avatar.winner {
    background: linear-gradient(135deg, var(--accent), #d97706);
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.message-sender {
    font-weight: 600;
    font-size: 14px;
}

.message-time {
    font-size: 12px;
    color: var(--text-muted);
}

.message-text {
    padding: 12px 16px;
    background: var(--bg-glass);
    border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-item.bot .message-text {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.message-item.system .message-text {
    background: rgba(100, 116, 139, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.2);
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

.message-item.winner .message-text {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.2));
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent);
    font-weight: 600;
    text-align: center;
}

/* Input Area */
.input-area {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.input-wrapper {
    display: flex;
    gap: 12px;
}

.input-wrapper input {
    flex: 1;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.input-wrapper input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper button {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.input-wrapper button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.input-wrapper button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.input-status i {
    color: var(--primary-light);
}

.input-status.active {
    color: var(--success);
}

.input-status.active i {
    color: var(--success);
}

/* Leaderboard Sidebar */
.leaderboard-sidebar {
    width: 300px;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.leaderboard-sidebar.show {
    display: flex;
}

.leaderboard-sidebar .sidebar-header {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
}

.leaderboard-sidebar .sidebar-header h3 {
    color: var(--accent);
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.btn-close:hover {
    color: var(--text-primary);
}

.leaderboard-sidebar .leaderboard-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    min-width: 300px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

.toast-icon {
    font-size: 20px;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--danger);
}

.toast.info .toast-icon {
    color: var(--primary);
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive */
@media (max-width: 1200px) {
    .leaderboard-preview {
        display: none;
    }

    .participants-sidebar {
        width: 240px;
    }
}

@media (max-width: 900px) {
    .participants-sidebar {
        display: none;
    }

    .leaderboard-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        height: 100%;
        width: 300px;
        border-radius: 0;
        z-index: 100;
    }
}

@media (max-width: 600px) {
    #login-screen {
        padding: 15px;
    }

    .login-card {
        padding: 25px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .login-header h1 {
        font-size: 22px;
    }

    .quiz-header {
        padding: 10px 15px;
    }

    .user-details {
        display: none;
    }

    .timer-container {
        width: 50px;
        height: 50px;
    }

    .timer-text {
        font-size: 18px;
    }

    .question-text {
        font-size: 18px;
    }

    .input-wrapper input {
        padding: 12px 16px;
        font-size: 14px;
    }

    .input-wrapper button {
        width: 48px;
        height: 48px;
    }
}

/* Auto-login notice */
.auto-login-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    color: var(--primary-light);
    font-size: 15px;
}

.auto-login-notice i {
    font-size: 20px;
}

/* Main system link */
.main-system-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.main-system-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-light);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.main-system-link a:hover {
    color: var(--text-primary);
}

.main-system-link .hint {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* Empty Leaderboard */
.leaderboard-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.leaderboard-empty i {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 15px;
    opacity: 0.5;
}

.leaderboard-empty p {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: 500;
}

.leaderboard-empty span {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Exit Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 1px solid var(--border-color);
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-icon {
    color: var(--primary);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.modal-icon i {
    font-size: 32px;
}

.loading-spinner {
    font-size: 24px;
    color: var(--primary-light);
    margin-top: 10px;
}