/* Modern Coding Game CSS - Dark Theme with Gradients */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --bg-input: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --border-color: #475569;
    --border-light: #64748b;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warning: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

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

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(51, 65, 85, 0.95));
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    padding: 1rem 0;
    position: relative;
    z-index: 100;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 900;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
    letter-spacing: -0.025em;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-brand:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.navbar-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    border-radius: 8px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover::before {
    opacity: 0.1;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.guest-only {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    padding: 1rem 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    backdrop-filter: blur(15px);
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.user-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

.user-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.user-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.username-link {
    font-weight: 800;
    color: var(--text-primary);
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.username-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.profile-link-icon {
    font-size: 0.7rem;
    margin-left: 0.3rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.username-link:hover .profile-link-icon {
    opacity: 1;
}

.username {
    font-weight: 800;
    color: var(--text-primary);
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.025em;
}

.user-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.stat-icon {
    font-size: 1rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.dsa-score {
    font-size: 1rem;
    color: #6f42c1;
    font-weight: 800;
    background: linear-gradient(135deg, #6f42c1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(111, 66, 193, 0.4);
    min-width: 20px;
    text-align: center;
}

.points {
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(245, 158, 11, 0.4);
    min-width: 20px;
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* Queue Status Top */
.queue-status-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
    animation: slideDown 0.3s ease-out;
}

/* Queue Notification - Prominent Alert */
.queue-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.8), rgba(5, 150, 105, 0.8));
    color: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(16, 185, 129, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    text-align: center;
    min-width: 400px;
    max-width: 90vw;
    animation: queueNotificationPulse 0.5s ease-out;
    opacity: 0.85;
}

@keyframes queueNotificationPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.queue-notification.hidden {
    display: none;
}

.queue-notification-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.queue-notification-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    opacity: 0.7;
    color: rgba(255, 255, 255, 0.9);
}

.queue-notification-message {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    opacity: 0.6;
    color: rgba(255, 255, 255, 0.8);
}

.queue-notification-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    opacity: 0.6;
}

.queue-notification-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.queue-notification-dots {
    display: flex;
    gap: 0.25rem;
}

.queue-notification-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: dotPulse 1.5s infinite;
}

.queue-notification-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.queue-notification-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    30% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.queue-status-top .alert {
    margin: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.queue-status-top .alert span {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.queue-status-top .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
    transition: all 0.2s ease;
}

.queue-status-top .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 24px;
    height: 3px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
}

.mobile-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23475569" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Game Modes Section */
.game-modes {
    padding: 5rem 0;
    background: var(--bg-primary);
}

.game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.game-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.game-card.points-10::before {
    background: var(--gradient-success);
}

.game-card.points-30::before {
    background: var(--gradient-warning);
}

.game-card.points-50::before {
    background: var(--gradient-success);
}

.game-card-header {
    margin-bottom: 2rem;
}

.game-card-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.game-card-points {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-card.points-10 .game-card-points {
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-card.points-30 .game-card-points {
    background: var(--gradient-warning);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-card.points-50 .game-card-points {
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-card-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.game-card-features {
    margin-bottom: 2rem;
}

.game-card-features ul {
    list-style: none;
    text-align: left;
}

.game-card-features li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

/* Queue Status */
.queue-status {
    max-width: 600px;
    margin: 2rem auto 0;
}

/* Login Section */
.login-section {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.login-container {
    max-width: 500px;
    margin: 0 auto;
}

.login-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 3rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
}

.login-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.login-form {
    margin-bottom: 2rem;
}

.login-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.login-info p {
    margin-bottom: 0.5rem;
}

/* How It Works Section */
.how-it-works {
    padding: 5rem 0;
    background: var(--bg-primary);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin: 0 auto 1.5rem;
}

.step h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.step p {
    color: var(--text-secondary);
}

/* Stats Section */
.stats-section {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cta-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Dashboard Styles */
.dashboard-header {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.dashboard-welcome h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-welcome p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
}

/* Quick Actions */
.quick-actions {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.action-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.action-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.action-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.action-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Recent Activity */
.recent-activity {
    padding: 5rem 0;
    background: var(--bg-primary);
}

.activity-timeline {
    max-width: 800px;
    margin: 3rem auto 0;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.timeline-item.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.timeline-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.timeline-marker.success {
    background: var(--success-color);
}

.timeline-marker.win {
    background: var(--accent-color);
}

.timeline-marker.info {
    background: var(--primary-color);
}

.timeline-content {
    flex: 1;
}

.timeline-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-time {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Game History */
.game-history {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.history-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
    align-items: center;
}

.history-chart {
    text-align: center;
}

.chart-container {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 2rem;
    height: 200px;
}

.chart-bar {
    width: 60px;
    background: var(--gradient-primary);
    border-radius: 0.5rem 0.5rem 0 0;
    position: relative;
    transition: height 1s ease;
}

.chart-bar.win {
    background: var(--gradient-success);
}

.chart-bar.loss {
    background: var(--gradient-secondary);
}

.chart-label {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.history-summary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.summary-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-value {
    color: var(--text-primary);
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Tips Section */
.tips-section {
    padding: 5rem 0;
    background: var(--bg-primary);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tip-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.tip-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.tip-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.tip-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tip-card p {
    color: var(--text-secondary);
}

/* Dashboard CTA */
.dashboard-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    text-align: center;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-subtitle {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--text-secondary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.social-link:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* Code Editor */
.code-editor {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.code-editor-header {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.code-editor-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.code-editor-controls {
    display: flex;
    gap: 0.5rem;
}

.code-editor-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
}

.code-editor-control.close { background: var(--danger-color); }
.code-editor-control.minimize { background: var(--warning-color); }
.code-editor-control.maximize { background: var(--success-color); }

.code-textarea {
    width: 100%;
    min-height: 300px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: none;
    padding: 1rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
}

.code-textarea:focus {
    outline: none;
}

/* Test Results */
.test-results {
    margin-top: 1rem;
}

.test-result {
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.test-result.passed {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success-color);
}

.test-result.failed {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger-color);
}

.test-result-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.test-result.passed .test-result-icon {
    background: var(--success-color);
    color: white;
}

.test-result.failed .test-result-icon {
    background: var(--danger-color);
    color: white;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    position: relative;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success-color);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning-color);
}

.alert-info {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary-color);
}

.alert-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.alert-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .game-cards {
        grid-template-columns: 1fr;
    }
    
    .navbar-nav {
        display: none;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .features-grid,
    .steps-container,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .dashboard-welcome h1 {
        font-size: 2rem;
    }
    
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .action-cards {
        grid-template-columns: 1fr;
    }
    
    .history-stats {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

.hidden { 
    display: none !important; 
}
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* Responsive utilities */
@media (min-width: 768px) {
    .md\\:flex { display: flex; }
    .md\\:hidden { display: none; }
} 

/* Bot Battle Section */
.bot-battles {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.bot-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.bot-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.bot-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.bot-card.easy-bot::before {
    background: var(--gradient-success);
}

.bot-card.intermediate-bot::before {
    background: var(--gradient-warning);
}

.bot-card.extreme-bot::before {
    background: var(--gradient-secondary);
}

.bot-header {
    margin-bottom: 2rem;
}

.bot-avatar {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.bot-name {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.bot-difficulty {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.bot-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.bot-stats .stat {
    text-align: center;
}

.bot-stats .stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.bot-stats .stat-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.bot-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.bot-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.bot-actions .btn {
    min-width: 120px;
}

.bot-game-status {
    max-width: 600px;
    margin: 2rem auto 0;
}

/* Bot Game Specific Styles */
.bot-opponent-info {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.bot-opponent-info .bot-name {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.bot-opponent-info .difficulty {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.bot-opponent-info .message {
    color: var(--text-primary);
    font-weight: 500;
}

/* Bot Response Animation */
.bot-thinking {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.bot-thinking .thinking-dots {
    display: flex;
    gap: 0.25rem;
}

.bot-thinking .dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: thinking 1.4s infinite ease-in-out;
}

.bot-thinking .dot:nth-child(1) { animation-delay: -0.32s; }
.bot-thinking .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes thinking {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Bot Game Results */
.bot-game-result {
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.bot-game-result.victory {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success-color);
}

.bot-game-result.defeat {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger-color);
}

.bot-game-result .result-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.bot-game-result .result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.bot-game-result .result-message {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.bot-game-result .points-change {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Responsive Design for Bot Section */
@media (max-width: 768px) {
    .bot-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .bot-card {
        padding: 2rem;
    }
    
    .bot-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .bot-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .bot-actions .btn {
        width: 100%;
        max-width: 200px;
    }
} 

/* Game Interface Styles */
.game-container {
    min-height: 100vh;
    background: var(--bg-primary);
}

.game-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.game-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.game-title h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.game-status {
    margin-top: 0.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.initializing {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.status-badge.active {
    background: var(--gradient-success);
    color: white;
}

.status-badge.completed {
    background: var(--gradient-primary);
    color: white;
}

.status-badge.waiting {
    background: var(--gradient-warning);
    color: white;
}

.game-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

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

.info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Game Layout */
.game-layout {
    padding: 2rem 0;
}

.game-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    min-height: 70vh;
}

/* Problem Section */
.problem-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    overflow-y: auto;
}

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

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.problem-difficulty {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.problem-difficulty.easy {
    background: var(--gradient-success);
    color: white;
}

.problem-difficulty.medium {
    background: var(--gradient-warning);
    color: white;
}

.problem-difficulty.hard {
    background: var(--gradient-secondary);
    color: white;
}

.problem-content {
    color: var(--text-primary);
}

.problem-title h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.problem-description {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.problem-signature {
    margin-bottom: 2rem;
}

.problem-signature h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.code-block {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'Fira Code', 'Courier New', monospace;
}

.code-block code {
    color: var(--text-primary);
    font-size: 1rem;
}

.problem-examples h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.test-cases-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
}

.test-case-preview {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.test-case-preview strong {
    color: var(--text-primary);
}

.test-case-preview code {
    background: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: var(--text-primary);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Bot Thinking Indicator */
.bot-thinking {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.bot-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.bot-avatar {
    font-size: 2rem;
}

.bot-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.thinking-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.thinking-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.thinking-dots {
    display: flex;
    gap: 0.25rem;
}

.thinking-dots .dot {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: thinking 1.4s infinite ease-in-out;
}

.thinking-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.thinking-dots .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes thinking {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Code Section */
.code-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.code-actions {
    display: flex;
    gap: 0.75rem;
}

.code-editor {
    flex: 1;
    margin: 1rem 0;
    position: relative;
}

.code-editor textarea {
    width: 100%;
    height: 100%;
    min-height: 400px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
}

.code-editor textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.code-editor textarea::placeholder {
    color: var(--text-muted);
}

/* Code Status */
.code-status {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.code-status.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success-color);
}

.code-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger-color);
}

.code-status.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info-color);
}

.code-status.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning-color);
}

/* Test Results */
/* Enhanced Test Results UI */
.test-results {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 0;
    margin-top: 1rem;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.test-results h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding: 1.5rem 1.5rem 0;
}

/* Test Summary Card */
.test-summary-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 0;
}

.test-summary-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.test-summary-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.test-summary-info h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.test-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    min-width: 200px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Test Cases Grid */
.test-cases-grid {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Test Case Cards */
.test-case-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.test-case-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.test-case-card.passed {
    border-left: 6px solid var(--success-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-card) 100%);
}

.test-case-card.failed {
    border-left: 6px solid var(--danger-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, var(--bg-card) 100%);
}

/* Test Case Header */
.test-case-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.test-case-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.test-case-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.test-case-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.test-case-number {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.test-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.test-status-badge.success {
    background: var(--success-color);
    color: white;
}

.test-status-badge.error {
    background: var(--danger-color);
    color: white;
}

/* Test Case Content */
.test-case-content {
    padding: 1.5rem;
}

.test-io-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Test Input/Output Sections */
.test-input-section,
.test-expected-section,
.test-actual-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
}

.test-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.test-section-icon {
    font-size: 1rem;
}

.test-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.test-value {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

.test-value code {
    background: var(--bg-secondary);
    padding: 0.75rem;
    border-radius: 0.375rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.5;
    display: block;
    border: 1px solid var(--border-color);
    word-break: break-all;
}

.test-value.expected-value code {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.test-value.actual-value.correct code {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.test-value.actual-value.incorrect code {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* Test Hint Section */
.test-hint-section {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.hint-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.hint-icon {
    font-size: 1rem;
}

.hint-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--warning-color);
}

.hint-content {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* No Test Results */
.no-test-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive Design for Test Results */
@media (max-width: 768px) {
    .test-summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .test-progress {
        width: 100%;
    }
    
    .progress-bar {
        min-width: 150px;
    }
    
    .test-case-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .test-io-section {
        gap: 0.75rem;
    }
    
    .test-case-content {
        padding: 1rem;
    }
    
    .test-input-section,
    .test-expected-section,
    .test-actual-section {
        padding: 0.75rem;
    }
}

/* Modals */
.game-end-modal,
.bot-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Bot Game Result */
.bot-result-modal .modal-body {
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.result-message {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.points-change {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

/* Game Result */
.game-result h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.game-result p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

/* Game Result Modal Overrides - Purple and White Color Scheme */
.game-end-modal .game-result,
.game-end-modal .game-result *,
.game-result-notification .game-result,
.game-result-notification .game-result * {
    color: #ffffff !important;
}

.game-end-modal .game-result h3,
.game-end-modal .game-result h4,
.game-result-notification .game-result h3,
.game-result-notification .game-result h4 {
    color: #ffffff !important;
    font-weight: bold !important;
}

.game-end-modal .game-result p,
.game-end-modal .game-result span,
.game-result-notification .game-result p,
.game-result-notification .game-result span {
    color: #ffffff !important;
}

.game-end-modal .game-result strong,
.game-result-notification .game-result strong {
    color: #ffffff !important;
    font-weight: bold !important;
}

/* Additional modal content overrides */
.game-end-modal .modal-body,
.game-end-modal .modal-content,
.game-result-notification .modal-body,
.game-result-notification .modal-content {
    color: #ffffff !important;
    background: #8b5cf6 !important; /* Purple background */
}

.game-end-modal .modal-body *,
.game-result-notification .modal-body * {
    color: #ffffff !important;
}

/* Specific overrides for different text elements */
.game-end-modal .final-points,
.game-end-modal .test-results-summary,
.game-end-modal .points-transfer-info,
.game-result-notification .final-points,
.game-result-notification .test-results-summary,
.game-result-notification .points-transfer-info {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important; /* Semi-transparent white */
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.game-end-modal .final-points p,
.game-end-modal .test-results-summary p,
.game-end-modal .points-transfer-info p,
.game-result-notification .final-points p,
.game-result-notification .test-results-summary p,
.game-result-notification .points-transfer-info p {
    color: #ffffff !important;
}

.game-end-modal .final-points strong,
.game-end-modal .test-results-summary strong,
.game-end-modal .points-transfer-info strong,
.game-result-notification .final-points strong,
.game-result-notification .test-results-summary strong,
.game-result-notification .points-transfer-info strong {
    color: #ffffff !important;
    font-weight: bold !important;
}

.final-points {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

/* Additional game result styling for better visibility */
.game-end-modal .transfer-details,
.game-end-modal .transfer-item,
.game-result-notification .transfer-details,
.game-result-notification .transfer-item {
    color: #ffffff !important;
}

.game-end-modal .transfer-details p,
.game-end-modal .transfer-item p,
.game-result-notification .transfer-details p,
.game-result-notification .transfer-item p {
    color: #ffffff !important;
}

.game-end-modal .transfer-details strong,
.game-end-modal .transfer-item strong,
.game-result-notification .transfer-details strong,
.game-result-notification .transfer-item strong {
    color: #ffffff !important;
    font-weight: bold !important;
}

/* Transfer item backgrounds with white and purple theme */
.game-end-modal .winner-transfer,
.game-result-notification .winner-transfer {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.game-end-modal .admin-transfer,
.game-result-notification .admin-transfer {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.game-end-modal .total-transfer,
.game-result-notification .total-transfer {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    font-weight: bold !important;
}

/* Ensure all text in game result is visible */
.game-end-modal .modal-body,
.game-end-modal .modal-content,
.game-result-notification .modal-body,
.game-result-notification .modal-content {
    background: #8b5cf6 !important; /* Purple background */
}

.game-end-modal .modal-body *,
.game-result-notification .modal-body * {
    color: #ffffff !important;
}

/* Last Game Result Modal - Purple and White Color Scheme */
.last-game-result-modal .modal-content {
    background: #8b5cf6 !important; /* Purple background */
    color: #ffffff !important;
}

.last-game-result-modal .modal-header {
    background: #8b5cf6 !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.last-game-result-modal .modal-header h2 {
    color: #ffffff !important;
    font-weight: bold !important;
}

.last-game-result-modal .modal-body {
    background: #8b5cf6 !important;
    color: #ffffff !important;
}

.last-game-result-modal .modal-body * {
    color: #ffffff !important;
}

.last-game-result-modal .game-result-summary {
    color: #ffffff !important;
}

.last-game-result-modal .result-header {
    color: #ffffff !important;
}

.last-game-result-modal .result-header h3 {
    color: #ffffff !important;
    font-weight: bold !important;
}

.last-game-result-modal .result-header p {
    color: #ffffff !important;
}

.last-game-result-modal .result-details {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.last-game-result-modal .result-details h4 {
    color: #ffffff !important;
    font-weight: bold !important;
}

.last-game-result-modal .result-details span {
    color: #ffffff !important;
}

.last-game-result-modal .result-details strong {
    color: #ffffff !important;
    font-weight: bold !important;
}

.last-game-result-modal .points-info {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.last-game-result-modal .points-info p {
    color: #ffffff !important;
    font-weight: bold !important;
}

.last-game-result-modal .points-transfer {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.last-game-result-modal .points-transfer h4 {
    color: #ffffff !important;
    font-weight: bold !important;
}

.last-game-result-modal .points-transfer div {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.last-game-result-modal .points-transfer span {
    color: #ffffff !important;
}

.last-game-result-modal .points-transfer strong {
    color: #ffffff !important;
    font-weight: bold !important;
}

.last-game-result-modal .game-info {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.last-game-result-modal .game-info p {
    color: #ffffff !important;
}

.last-game-result-modal .game-info strong {
    color: #ffffff !important;
    font-weight: bold !important;
}

.last-game-result-modal .no-game-result {
    color: #ffffff !important;
}

.last-game-result-modal .no-game-result h3 {
    color: #ffffff !important;
    font-weight: bold !important;
}

.last-game-result-modal .no-game-result p {
    color: #ffffff !important;
}

.last-game-result-modal .no-game-icon {
    color: #ffffff !important;
}

.final-points p {
    margin-bottom: 0.5rem;
}

.final-points p:last-child {
    margin-bottom: 0;
}

/* Leaderboard Section Styles */
.leaderboard-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.leaderboard-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.leaderboard-section .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.leaderboard-section .section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.section-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.btn-icon {
    margin-right: 0.5rem;
}

/* Podium Styles */
.podium-container {
    margin-bottom: 3rem;
}

.podium {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 2rem;
    margin-bottom: 2rem;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    position: relative;
    min-width: 150px;
    transition: all 0.3s ease;
}

.podium-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.podium-item.first-place {
    order: 2;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #1a1a1a;
    border: 2px solid #ffd700;
    z-index: 3;
}

.podium-item.second-place {
    order: 1;
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #1a1a1a;
    border: 2px solid #c0c0c0;
    z-index: 2;
}

.podium-item.third-place {
    order: 3;
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: #1a1a1a;
    border: 2px solid #cd7f32;
    z-index: 1;
}

.podium-rank {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.podium-avatar {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.podium-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-align: center;
}

.podium-points {
    font-size: 0.875rem;
    opacity: 0.8;
}

.crown {
    position: absolute;
    top: -10px;
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Leaderboard Table Styles */
.leaderboard-table-container {
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.leaderboard-table {
    width: 100%;
}

.table-header {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px 120px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.table-body {
    max-height: 400px;
    overflow-y: auto;
}

.table-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px 120px;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
    align-items: center;
}

.table-row:hover {
    background: var(--bg-secondary);
}

.table-row.top-player {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
    border-left: 4px solid #ffd700;
}

.table-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-cell.rank {
    justify-content: center;
    font-weight: 600;
    color: var(--text-primary);
}

.table-cell.player {
    gap: 1rem;
}

.table-cell.points {
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.table-cell.games {
    justify-content: center;
}

.table-cell.status {
    justify-content: center;
}

.rank-number {
    font-size: 1.125rem;
    font-weight: 700;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.player-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.player-name {
    font-weight: 600;
    color: var(--text-primary);
}

.player-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.win-rate,
.test-rate,
.streak {
    font-size: 0.75rem;
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
}

.win-rate {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.test-rate {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.streak {
    color: var(--warning-color);
    background: rgba(245, 158, 11, 0.1);
    font-weight: 600;
}

.points-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.points-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.games-count {
    font-weight: 600;
    color: var(--text-primary);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-indicator.online {
    color: var(--success-color);
}

.status-indicator.offline {
    color: var(--text-muted);
}

/* Loading and Error States */
.loading-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.error-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Empty Leaderboard State */
.empty-leaderboard {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-leaderboard h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-leaderboard p {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.empty-actions {
    margin-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .podium {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .podium-item {
        min-width: 200px;
    }
    
    .podium-item.first-place {
        order: 1;
    }
    
    .podium-item.second-place {
        order: 2;
    }
    
    .podium-item.third-place {
        order: 3;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 60px 1fr 80px 60px 80px;
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .player-info {
        gap: 0.75rem;
    }
    
    .player-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .leaderboard-section .section-title {
        font-size: 2rem;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .game-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .game-info {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .game-header {
        padding: 1.5rem 0;
    }
    
    .game-title h1 {
        font-size: 1.5rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .game-layout {
        padding: 1rem 0;
    }
    
    .problem-section,
    .code-section {
        padding: 1.5rem;
    }
    
    .code-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .problem-section,
    .code-section {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .code-editor textarea {
        min-height: 300px;
        font-size: 0.8rem;
    }
} 

/* Login Page Styles */
.login-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.login-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 3rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Fira Code', monospace;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input.error {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    min-height: 1.25rem;
}

.login-footer {
    text-align: center;
}

.login-info {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.login-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.feature-icon {
    font-size: 1.1rem;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-loading.hidden {
    display: none !important;
}

.spinner {
    width: 1.25rem;
    height: 1.25rem;
    animation: spin 1s linear infinite;
}

.spinner.hidden {
    display: none !important;
}

/* Ensure all loading elements are properly hidden */
.btn-loading.hidden,
.btn-loading .hidden,
.spinner.hidden,
svg.hidden,
.hidden svg {
    display: none !important;
}

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

/* Responsive Login */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .login-features {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
}

/* Additional Button and Link Styles */
.btn-full,
.w-full {
    width: 100%;
}

.link-primary {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.link-primary:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Winner Announcement Styles */
.winner-announcement {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    animation: slideDown 0.5s ease-out;
}

.winner-content {
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
    min-width: 300px;
    max-width: 500px;
}

.winner-content.victory {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}

.winner-content.defeat {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.winner-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.winner-content p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.points-earned,
.points-lost {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Profile Page Styles */
.profile-header {
    background: var(--gradient-primary);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.profile-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.online-status {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid white;
}

.online-status.online {
    background: var(--success-color);
}

.online-status.offline {
    background: var(--text-muted);
}

.profile-info {
    flex: 1;
    color: white;
}

.profile-username {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}


.profile-bio {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.5;
    margin: 0;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.stat-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.achievements-container {
    max-height: 600px;
    overflow-y: auto;
}

.achievements-section {
    margin-bottom: 1.5rem;
}

.achievements-section h6 {
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

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

.achievement-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.achievement-item.unlocked {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: #28a745;
    color: white;
}

.achievement-item.unlocked:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-3px) scale(1.02);
}

.achievement-item.locked {
    background: var(--bg-card);
    border-color: var(--border-color);
    opacity: 0.7;
    filter: grayscale(0.3);
}

.achievement-item.locked:hover {
    opacity: 0.9;
    filter: grayscale(0.1);
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.achievement-item.unlocked .achievement-icon {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.achievement-item.locked .achievement-icon {
    color: var(--text-muted);
}

.achievement-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.achievement-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.achievement-item.unlocked .achievement-name {
    color: white;
}

.achievement-item.locked .achievement-name {
    color: var(--text-primary);
}

.achievement-status {
    font-size: 0.75rem;
    font-weight: 500;
}

.achievement-item.unlocked .achievement-status {
    color: #d4edda;
}

.achievement-item.locked .achievement-status {
    color: var(--text-muted);
}

/* Progress Summary Styles */
.achievement-progress {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.progress-summary .stat-item h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.progress-summary .stat-item small {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Achievement Badge Effects */
.achievement-item.unlocked::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    border-radius: 14px;
    z-index: -1;
    animation: shimmer 2s infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .achievement-item {
        padding: 0.75rem;
    }
    
    .achievement-icon {
        font-size: 2rem;
    }
    
    .achievement-name {
        font-size: 0.8rem;
    }
}

.quick-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.quick-stat:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
}

.problem-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.activity-item span {
    flex: 1;
    color: var(--text-primary);
}

.activity-item small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.form-check-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.form-check {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.form-check:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.form-check-input:checked + .form-check-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: white;
}

.badge-secondary {
    background-color: var(--text-muted);
    color: white;
}

/* Tournament Styles */
.tournament-header {
    background: var(--gradient-primary);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
    text-align: center;
}

.tournament-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tournament-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.tournament-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.tournament-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tournament-stats .stat-icon {
    font-size: 2rem;
}

.tournament-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.tournament-stats .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.tournament-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 1rem;
    background: var(--bg-card);
    transition: all 0.2s ease;
}

.tournament-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.tournament-info {
    flex: 1;
}

.tournament-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tournament-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.tournament-details {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tournament-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.tournament-detail-header {
    background: var(--gradient-primary);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tournament-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tournament-title p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

.round-info h6 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.progress {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-primary);
    height: 100%;
    transition: width 0.3s ease;
}

.standings-table {
    max-height: 400px;
    overflow-y: auto;
}

.standing-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: var(--bg-card);
    transition: all 0.2s ease;
}

.standing-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.standing-item.current-user {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.standing-item.eliminated {
    opacity: 0.6;
    background: var(--bg-tertiary);
}

.position {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    margin-right: 1rem;
    flex-shrink: 0;
}

.participant-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.participant-avatar {
    flex-shrink: 0;
}

.avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.participant-details {
    flex: 1;
}

.participant-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.participant-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.participant-stats .stat {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.participant-status {
    flex-shrink: 0;
}

.round-section {
    margin-bottom: 2rem;
}

.round-section h6 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.match-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: var(--bg-card);
    transition: all 0.2s ease;
}

.match-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.match-item.current-user-match {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.match-item.completed {
    opacity: 0.8;
}

.match-players {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.player.winner {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
    font-weight: 600;
}

.vs {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.match-status {
    flex-shrink: 0;
}

.user-status {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.status-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Tournament Preview Section */
.tournaments-preview {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin: 2rem 0;
    border-radius: 20px;
}

.tournaments-preview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.tournaments-preview-text .section-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.tournament-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tournament-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.tournament-feature i {
    font-size: 1.2rem;
    color: #ffd700;
}

.tournament-feature span {
    font-weight: 600;
}

.tournament-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tournament-actions .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.tournament-actions .btn-primary {
    background: #ffd700;
    color: #333;
    border: none;
}

.tournament-actions .btn-primary:hover {
    background: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.tournament-actions .btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.tournament-actions .btn-outline:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
}

.tournaments-preview-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tournament-bracket {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bracket-round {
    text-align: center;
    margin-bottom: 1rem;
}

.bracket-round h4 {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.bracket-matches {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bracket-match {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bracket-match .player {
    flex: 1;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-weight: 600;
    color: white;
}

.bracket-match .player.winner {
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.bracket-match .vs {
    font-weight: 700;
    color: #ffd700;
    font-size: 0.9rem;
}

.bracket-arrow {
    text-align: center;
    font-size: 1.5rem;
    color: #ffd700;
    margin: 1rem 0;
}

/* Tournament Responsive Design */
@media (max-width: 768px) {
    .tournaments-preview-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .tournaments-preview-text .section-title {
        font-size: 2rem;
    }
    
    .tournament-features {
        grid-template-columns: 1fr;
    }
    
    .tournament-actions {
        justify-content: center;
    }
    
    .tournament-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .bracket-match {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .bracket-match .vs {
        order: 2;
    }
}

@media (max-width: 768px) {
    .tournament-header {
        padding: 1.5rem;
    }
    
    .tournament-header h1 {
        font-size: 2rem;
    }
    
    .tournament-stats {
        gap: 1rem;
    }
    
    .tournament-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .tournament-details {
        justify-content: center;
    }
    
    .tournament-actions {
        width: 100%;
        justify-content: center;
    }
    
    .tournament-detail-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .standing-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .participant-info {
        flex-direction: column;
        text-align: center;
    }
    
    .match-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .match-players {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .vs {
        order: 2;
    }
}

/* Profile Responsive Design */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .profile-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .profile-actions .btn {
        width: 100%;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .form-check-group {
        grid-template-columns: 1fr;
    }
}



/* Notification System Styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 350px;
    pointer-events: none;
}

.notification {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    margin-bottom: 12px;
    padding: 16px;
    border-left: 4px solid var(--primary-color);
    pointer-events: auto;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(400px);
    opacity: 0;
}

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

.notification-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-icon {
    font-size: 16px;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.notification-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
}

.notification-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.notification-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-btn-primary {
    background: var(--primary-color);
    color: white;
}

.notification-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.notification-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.notification-btn-secondary:hover {
    background: var(--border-color);
}

/* Chat notification specific styles */
.notification.chat-notification {
    border-left-color: #10b981;
}

.notification.chat-notification .notification-icon {
    color: #10b981;
}

/* Unread message indicator */
.unread-indicator {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Back Button Styles */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.back-button:hover {
    background: var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.back-button:active {
    transform: translateY(0);
}

.back-button i {
    font-size: 12px;
}

/* Page header with back button */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Responsive back button */
@media (max-width: 768px) {
    .back-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .page-title {
        font-size: 20px;
    }
}