/**
 * NextBall - E-Sports Competitive Theme
 * 
 * Bold, energetic design for competitive gaming
 * Color palette: Deep black, Emerald green, Championship gold
 */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Bebas+Neue&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Colors - E-Sports Theme */
    --bg-primary: #050508;
    --bg-secondary: #0a0a0f;
    --bg-card: rgba(16, 16, 24, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-surface: #0d0d14;

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    /* Primary: Emerald Green (Field/Game) */
    --accent-primary: #10b981;
    --accent-primary-dark: #059669;
    --accent-primary-glow: rgba(16, 185, 129, 0.4);

    /* Secondary: Championship Gold */
    --accent-gold: #f59e0b;
    --accent-gold-light: #fbbf24;
    --accent-gold-glow: rgba(245, 158, 11, 0.4);

    /* Team Colors */
    --red-team: #ef4444;
    --red-team-dark: #dc2626;
    --blue-team: #3b82f6;
    --blue-team-dark: #2563eb;

    /* Status */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Effects */
    --blur-glass: 20px;
    --border-subtle: 1px solid rgba(255, 255, 255, 0.06);
    --border-accent: 1px solid rgba(16, 185, 129, 0.3);
    --shadow-glow: 0 0 60px var(--accent-primary-glow);
    --shadow-gold: 0 0 40px var(--accent-gold-glow);

    /* Typography */
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 3rem;
    --font-size-5xl: 4rem;

    /* Spacing & Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 500;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden { display: none !important; }

.screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Main Menu - Scrollable on small screens */
#main-menu {
    overflow-y: auto;
    overflow-x: hidden;
    align-items: flex-start;
    padding: 1rem 0;
}

#main-menu .menu-container {
    margin: auto;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.menu-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(245, 158, 11, 0.08), transparent),
        var(--bg-primary);
}

/* Field Lines Pattern */
.field-lines {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: 
        linear-gradient(90deg, var(--accent-primary) 1px, transparent 1px),
        linear-gradient(var(--accent-primary) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: fieldMove 20s linear infinite;
}

@keyframes fieldMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* Floating Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 8s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    opacity: 0.1;
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-gold);
    opacity: 0.08;
    bottom: 10%;
    right: -5%;
    animation-delay: -3s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

/* ============================================
   LOADING SCREEN
   ============================================ */
.loading-screen {
    background: var(--bg-primary);
    z-index: 1000;
}

.loading-content {
    text-align: center;
}

.logo-glow {
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 20px var(--accent-primary-glow)); }
    50% { filter: drop-shadow(0 0 40px var(--accent-gold-glow)); }
}

.logo {
    font-family: var(--font-display);
    font-size: 5rem;
    letter-spacing: 4px;
    color: var(--accent-primary);
}

.logo span {
    color: var(--text-primary);
}

.loading-bar {
    width: 200px;
    height: 3px;
    background: var(--bg-glass);
    border-radius: 2px;
    margin: 2rem auto 1rem;
    overflow: hidden;
}

.loading-progress {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-gold));
    border-radius: 2px;
    animation: loadingSlide 1.5s ease-in-out infinite;
}

@keyframes loadingSlide {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(250%); }
    100% { transform: translateX(-100%); }
}

.loading-text {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================
   MAIN MENU - COMPETITIVE LAYOUT
   ============================================ */
.menu-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    padding: 2rem;
}

/* Header */
.menu-header {
    text-align: center;
    margin-bottom: 3rem;
}

.menu-header .logo {
    font-size: 4.5rem;
    margin-bottom: 0.25rem;
    text-shadow: 0 0 60px var(--accent-primary-glow);
}

.tagline {
    color: var(--text-muted);
    font-size: var(--font-size-base);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 600;
}

/* Main Action Area */
.main-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Play Button - Hero */
.play-section {
    flex: 2;
}

.play-btn {
    position: relative;
    width: 100%;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.play-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-primary), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.play-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent-primary);
}

.play-btn:hover::before {
    opacity: 0.1;
}

.play-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 0 30px var(--accent-primary-glow);
    flex-shrink: 0;
}

.play-content {
    text-align: left;
}

.play-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--text-primary);
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.play-subtitle {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.play-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-gold);
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Secondary Actions */
.secondary-actions {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    color: inherit;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.action-icon {
    width: 44px;
    height: 44px;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.action-btn:hover .action-icon {
    background: rgba(16, 185, 129, 0.2);
}

.action-text h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    letter-spacing: 1px;
    color: var(--text-primary);
}

.action-text p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1.25rem 2rem;
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.stat-item:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
}

.stat-info {
    text-align: left;
}

.stat-value {
    font-family: var(--font-display);
    font-size: var(--font-size-2xl);
    color: var(--text-primary);
    line-height: 1;
}

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

/* Bottom Row */
.bottom-row {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

/* Leaderboard Preview */
.leaderboard-preview {
    flex: 1;
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.leaderboard-preview:hover {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-gold);
}

.leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.leaderboard-header h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all {
    font-size: var(--font-size-sm);
    color: var(--accent-gold);
    text-decoration: none;
}

.top-players {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.top-player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
}

.top-player-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-size-sm);
}

.top-player-rank.gold { color: #ffd700; }
.top-player-rank.silver { color: #c0c0c0; }
.top-player-rank.bronze { color: #cd7f32; }

.top-player-name {
    flex: 1;
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.top-player-mmr {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* Nickname Section - KALDIRILDI */

/* Stats Preview Section */
.stats-preview-section {
    flex: 1;
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.stats-preview-section:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.stats-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stats-preview-header h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-preview-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stats-preview-rank {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
}

.preview-rank-icon {
    font-size: 2rem;
}

.preview-rank-info {
    display: flex;
    flex-direction: column;
}

.preview-rank-name {
    font-weight: 700;
    color: var(--text-primary);
}

.preview-mmr {
    font-size: var(--font-size-sm);
    color: var(--accent-primary);
}

.stats-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.preview-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.4rem;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
}

.preview-stat-value {
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--text-primary);
}

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.btn-primary:hover {
    background: var(--accent-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--accent-primary-glow);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: var(--border-subtle);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
}

.btn-full { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: var(--font-size-sm); }

.btn-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: var(--border-subtle);
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-success {
    background: var(--accent-primary);
    color: #000;
    font-weight: 700;
}

.btn-success:hover {
    box-shadow: var(--shadow-glow);
    transform: scale(1.02);
}

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

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* ============================================
   INPUT FIELDS
   ============================================ */
.input-glass {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--bg-surface);
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: 500;
    outline: none;
    transition: all var(--transition-fast);
}

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

.input-glass:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.input-glass.xs {
    width: 60px;
    padding: 0.4rem 0.5rem;
    text-align: center;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content.compact {
    max-width: 420px;
}

.glass-panel {
    background: var(--bg-card);
    border: var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: var(--border-subtle);
}

.modal-header h2 {
    font-family: var(--font-display);
    font-size: var(--font-size-2xl);
    letter-spacing: 1px;
}

.modal-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: var(--border-subtle);
    text-align: center;
}

/* Form */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* Room List */
.room-list {
    max-height: 400px;
    overflow-y: auto;
}

.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-glass);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: all var(--transition-fast);
}

.room-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

.room-info h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-lg);
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.room-players {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.room-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.room-empty p {
    margin-bottom: 1rem;
}

/* ============================================
   GAME SCREEN - HAXBALL STYLE LAYOUT
   ============================================ */
#game-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-secondary);
    height: 100vh;
    overflow: hidden;
}

/* Top Bar */
.game-topbar {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 0.5rem 2rem;
    background: var(--bg-primary);
    border-bottom: var(--border-subtle);
    flex-shrink: 0;
    height: 50px;
}

.team-score {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.team-score.red { flex-direction: row; }
.team-score.blue { flex-direction: row-reverse; }

.team-name {
    font-family: var(--font-display);
    font-size: var(--font-size-base);
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.8;
}

.team-score.red .team-name { color: var(--red-team); }
.team-score.blue .team-name { color: var(--blue-team); }

.team-score .score {
    font-family: var(--font-display);
    font-size: var(--font-size-4xl);
}

.team-score.red .score { color: var(--red-team); }
.team-score.blue .score { color: var(--blue-team); }

.game-timer {
    font-family: var(--font-display);
    font-size: var(--font-size-2xl);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

/* Game Area Wrapper - Contains canvas and chat, centered */
.game-area-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    padding: 0.5rem;
    gap: 0.5rem;
}

/* Game Container - Just holds canvas */
.game-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#game-canvas {
    border-radius: var(--radius-md);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

/* Replay Overlay */
.replay-overlay {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.replay-badge {
    background: var(--error);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: var(--font-size-base);
    letter-spacing: 3px;
    animation: replayPulse 1s ease-in-out infinite;
}

@keyframes replayPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.replay-progress {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.replay-progress-bar {
    height: 100%;
    background: white;
    transition: width 0.1s linear;
}

/* Goal Celebration */
.goal-celebration {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 20;
    animation: goalAppear 0.3s ease-out;
}

@keyframes goalAppear {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.goal-text {
    font-family: var(--font-display);
    font-size: 8rem;
    letter-spacing: 0.2em;
    text-shadow: 0 0 60px currentColor;
    animation: goalBounce 0.5s ease-out;
}

@keyframes goalBounce {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.goal-scorer {
    font-size: var(--font-size-xl);
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
}

/* Pause Overlay */
.pause-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 15;
}

.pause-text {
    font-family: var(--font-display);
    font-size: 6rem;
    color: #fff;
    text-align: center;
    text-shadow: 3px 3px 0 #000;
    line-height: 1.1;
    letter-spacing: 4px;
}

.resume-countdown {
    width: 120px;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    margin-top: 1.5rem;
    overflow: hidden;
}

.resume-bar {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.05s linear;
}

/* Chat Panel - Game Screen içinde altta sabit */
.chat-panel {
    width: 100%;
    height: 100px;
    background: rgba(8, 8, 12, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.chat-messages {
    flex: 1;
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
    font-size: var(--font-size-sm);
    max-height: 85px;
}

.chat-message {
    margin-bottom: 0.2rem;
    word-break: break-word;
    line-height: 1.3;
    padding: 0.1rem 0;
}

.chat-sender {
    font-weight: 700;
    color: var(--accent-primary);
    margin-right: 0.3rem;
}

.chat-input-container {
    padding: 0.5rem 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.3);
}

.chat-input-container .input-glass {
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-sm);
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-container .input-glass:focus {
    border-color: var(--accent-primary);
    background: rgba(20, 20, 30, 0.95);
}

/* Controls Info - Game container içinde sağ altta */
.controls-info {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.5rem;
    font-size: 10px;
    color: var(--text-muted);
    z-index: 5;
}

.controls-info span {
    background: rgba(0, 0, 0, 0.5);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
}

/* ============================================
   GAME CHAT PANEL - HAXBALL STYLE (Same width as canvas)
   ============================================ */
.game-chat-panel {
    flex-shrink: 0;
    height: 130px;
    background: rgba(8, 8, 12, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    /* Width will be set by JavaScript to match canvas */
}

#game-chat-panel {
    /* Chat inside game screen - width controlled by JS */
}

.game-chat-panel .chat-messages {
    flex: 1;
    padding: 0.5rem 1rem;
    overflow-y: auto;
    font-size: 13px;
}

.game-chat-panel .chat-message {
    margin-bottom: 0.2rem;
    word-break: break-word;
    line-height: 1.3;
}

.game-chat-panel .chat-sender {
    font-weight: 700;
    color: var(--accent-primary);
    margin-right: 0.25rem;
}

.game-chat-panel .chat-input-container {
    padding: 0.4rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.game-chat-panel .chat-input-container .input-glass {
    padding: 0.4rem 0.75rem;
    font-size: 13px;
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-chat-panel .chat-input-container .input-glass:focus {
    border-color: var(--accent-primary);
}

/* Chat panel visibility control */
#global-chat-panel {
    display: none;
}

/* Show lobby chat when lobby screen is active */
#lobby-screen:not(.hidden) ~ #global-chat-panel {
    display: flex;
}

#global-chat-panel {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    max-width: calc(100% - 2rem);
    z-index: 50;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ============================================
   LEADERBOARD MODAL
   ============================================ */
.leaderboard-panel {
    max-width: 700px;
    max-height: 85vh;
}

.leaderboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.6rem 1.5rem;
    background: var(--bg-glass);
    border: var(--border-subtle);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: var(--font-size-base);
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

.leaderboard-list {
    max-height: 450px;
    overflow-y: auto;
}

.leaderboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
}

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

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

/* Leaderboard Row */
.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-glass);
    border: var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    transition: all var(--transition-fast);
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.leaderboard-row.top-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), transparent);
    border-color: rgba(255, 215, 0, 0.3);
}

.leaderboard-row.top-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), transparent);
    border-color: rgba(192, 192, 192, 0.3);
}

.leaderboard-row.top-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), transparent);
    border-color: rgba(205, 127, 50, 0.3);
}

.leaderboard-row.is-me {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), transparent);
}

.rank-position {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--font-size-lg);
    margin-right: 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
}

.rank-position.gold { color: #ffd700; background: rgba(255, 215, 0, 0.15); }
.rank-position.silver { color: #c0c0c0; background: rgba(192, 192, 192, 0.15); }
.rank-position.bronze { color: #cd7f32; background: rgba(205, 127, 50, 0.15); }

.player-info { flex: 1; display: flex; flex-direction: column; }
.player-name { font-weight: 600; }
.player-stats { font-size: var(--font-size-xs); color: var(--text-muted); }
.player-mmr { color: var(--text-secondary); font-size: var(--font-size-sm); margin-left: 1rem; }

/* Rank Colors */
.rank-iron { color: #5c5c5c; }
.rank-bronze { color: #cd7f32; }
.rank-silver { color: #c0c0c0; }
.rank-gold { color: #ffd700; }
.rank-platinum { color: #00ced1; }
.rank-diamond { color: #b9f2ff; }
.rank-master { color: #9932cc; }
.rank-champion { color: #ff4500; }
.rank-immortal { color: #ff1493; }
.rank-legend { color: #ff0000; text-shadow: 0 0 10px currentColor; }

.leaderboard-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

/* ============================================
   MATCH RESULT OVERLAY
   ============================================ */
.match-result-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.3s ease;
}

.match-result-content {
    text-align: center;
    max-width: 600px;
    width: 90%;
}

.match-result-title {
    font-family: var(--font-display);
    font-size: 4rem;
    letter-spacing: 6px;
    margin-bottom: 0.5rem;
    animation: slideDown 0.5s ease;
}

.match-result-title.victory {
    color: var(--accent-primary);
    text-shadow: 0 0 60px var(--accent-primary-glow);
}

.match-result-title.defeat {
    color: var(--error);
    text-shadow: 0 0 60px rgba(239, 68, 68, 0.5);
}

.match-result-score {
    font-family: var(--font-display);
    font-size: 3rem;
    letter-spacing: 4px;
    margin-bottom: 2rem;
}

.match-result-players {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
    max-height: 280px;
    overflow-y: auto;
}

.match-result-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-glass);
    border-radius: var(--radius-md);
    border-left: 3px solid transparent;
    animation: slideIn 0.3s ease backwards;
}

.match-result-player.win {
    border-left-color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.1);
}

.match-result-player.loss {
    border-left-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.match-result-player.is-me {
    border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.player-result-rank { font-size: 1.25rem; }
.player-result-name { font-weight: 600; }

.player-result-mmr {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.mmr-change {
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 1px;
}

.mmr-change.positive { color: var(--accent-primary); }
.mmr-change.negative { color: var(--error); }
.mmr-new { font-size: 0.8rem; color: var(--text-muted); }

.rank-change {
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    animation: pulse 1s ease infinite;
}

.rank-change.rank-up { background: rgba(16, 185, 129, 0.2); color: var(--accent-primary); }
.rank-change.rank-down { background: rgba(239, 68, 68, 0.2); color: var(--error); }

.streak-badge {
    padding: 0.15rem 0.5rem;
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-gold);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   RESPONSIVE - MAIN MENU AUTO-SCALE
   ============================================ */

/* Small/Medium screens (15 inch laptops, ~900px height) */
@media (max-height: 800px) {
    .menu-container {
        padding: 1rem;
    }
    .menu-header {
        margin-bottom: 1.5rem;
    }
    .menu-header .logo {
        font-size: 3.5rem;
    }
    .tagline {
        font-size: 0.85rem;
        letter-spacing: 3px;
    }
    .play-btn {
        padding: 1.5rem 1.25rem;
    }
    .play-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    .play-title {
        font-size: 2rem;
    }
    .play-subtitle {
        font-size: 0.85rem;
    }
    .action-btn {
        padding: 0.75rem 1rem;
    }
    .action-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .action-text h3 {
        font-size: 1rem;
    }
    .action-text p {
        font-size: 0.75rem;
    }
    .stats-bar {
        padding: 0.75rem 1rem;
        gap: 1.5rem;
        margin-bottom: 1rem;
    }
    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    .stat-value {
        font-size: 1.25rem;
    }
    .stat-label {
        font-size: 0.65rem;
    }
    .main-actions {
        margin-bottom: 1rem;
    }
    .bottom-row {
        gap: 0.75rem;
    }
    .leaderboard-preview,
    .stats-preview-section {
        padding: 1rem;
    }
    .leaderboard-header,
    .stats-preview-header {
        margin-bottom: 0.5rem;
    }
    .leaderboard-header h3,
    .stats-preview-header h3 {
        font-size: 1rem;
    }
    .top-player {
        padding: 0.35rem;
    }
    .top-player-name {
        font-size: 0.8rem;
    }
    .top-player-mmr {
        font-size: 0.7rem;
    }
    .stats-preview-rank {
        padding: 0.35rem;
    }
    .preview-rank-icon {
        font-size: 1.5rem;
    }
    .preview-rank-name {
        font-size: 0.9rem;
    }
    .preview-mmr {
        font-size: 0.8rem;
    }
    .preview-stat {
        padding: 0.3rem;
    }
    .preview-stat-value {
        font-size: 1rem;
    }
    .preview-stat-label {
        font-size: 8px;
    }
    .user-profile-bar {
        padding: 0.5rem 1rem;
        margin-top: 0.75rem;
    }
    .user-rank-icon {
        font-size: 1.25rem;
    }
    .user-name {
        font-size: 0.9rem;
    }
    .user-mmr {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Very small screens (height < 700px) */
@media (max-height: 650px) {
    .menu-container {
        padding: 0.75rem;
    }
    .menu-header {
        margin-bottom: 1rem;
    }
    .menu-header .logo {
        font-size: 2.5rem;
    }
    .tagline {
        font-size: 0.75rem;
        letter-spacing: 2px;
    }
    .play-btn {
        padding: 1rem;
    }
    .play-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    .play-title {
        font-size: 1.5rem;
    }
    .main-actions {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    .secondary-actions {
        gap: 0.5rem;
    }
    .stats-bar {
        padding: 0.5rem 0.75rem;
        gap: 1rem;
        margin-bottom: 0.75rem;
    }
    .bottom-row {
        gap: 0.5rem;
    }
    .leaderboard-preview,
    .stats-preview-section {
        padding: 0.75rem;
    }
    .top-players {
        gap: 0.25rem;
    }
}

/* Width-based responsive */
@media (max-width: 900px) {
    .main-actions { flex-direction: column; }
    .secondary-actions { flex-direction: row; }
    .bottom-row { flex-direction: column; }
    .stats-bar { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 768px) {
    .menu-header .logo { font-size: 3rem; }
    .play-btn { padding: 1.5rem; }
    .play-icon { width: 60px; height: 60px; font-size: 2rem; }
    .play-title { font-size: 1.75rem; }
    .secondary-actions { flex-direction: column; }
    .chat-panel, .controls-info { display: none; }
    .game-topbar { gap: 1rem; padding: 0.5rem 1rem; }
    .team-score .score { font-size: var(--font-size-2xl); }
}

/* ============================================
   USER PROFILE BAR
   ============================================ */
.user-profile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    background: rgba(10, 15, 10, 0.6);
    border: 1px solid rgba(62, 207, 142, 0.2);
    border-radius: var(--radius-lg);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-rank-icon {
    font-size: 1.5rem;
}

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

.user-mmr {
    padding: 0.25rem 0.5rem;
    background: rgba(62, 207, 142, 0.2);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   STATS MODAL
   ============================================ */
.stats-panel {
    max-width: 450px;
}

.stats-content {
    padding: 1rem 0;
}

.stats-rank-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(62, 207, 142, 0.15) 0%, rgba(62, 207, 142, 0.05) 100%);
    border: 1px solid rgba(62, 207, 142, 0.3);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.stats-rank-icon {
    font-size: 3rem;
}

.stats-rank-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stats-rank-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stats-mmr-value {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
}

.stats-peak {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    background: rgba(10, 15, 10, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}

.stat-box.win { border-color: rgba(62, 207, 142, 0.3); }
.stat-box.loss { border-color: rgba(239, 68, 68, 0.3); }
.stat-box.goal { border-color: rgba(245, 158, 11, 0.3); }
.stat-box.assist { border-color: rgba(59, 130, 246, 0.3); }
.stat-box.own-goal { border-color: rgba(156, 163, 175, 0.3); }
.stat-box.streak { border-color: rgba(168, 85, 247, 0.3); }

.stat-box-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-box.win .stat-box-value { color: var(--primary); }
.stat-box.loss .stat-box-value { color: var(--accent-red); }
.stat-box.goal .stat-box-value { color: var(--accent-gold); }
.stat-box.assist .stat-box-value { color: var(--accent-blue); }
.stat-box.streak .stat-box-value { color: #a855f7; }

.stat-box-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.stats-performance h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

/* ============================================
   MODERATION MODAL (Kicked/Banned) - FIXED LAYOUT
   ============================================ */

#moderation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#moderation-modal.hidden {
    display: none;
}

#moderation-modal .modal {
    background: var(--bg-card, #101018);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    max-width: 320px;
    width: 90%;
    text-align: center;
}

#moderation-modal .modal-header {
    border: none;
    padding: 0;
    margin-bottom: 0.75rem;
    justify-content: center;
}

#moderation-modal .modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: 0;
}

#moderation-modal .modal-body {
    padding: 0;
    margin-bottom: 1.25rem;
}

#moderation-modal .modal-body p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

#moderation-modal .modal-footer {
    border: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

#moderation-modal .btn-primary {
    min-width: 100px;
    padding: 0.6rem 1.5rem;
}

/* ============================================
   CONTEXT MENU & MODERATION STYLES
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.modal-overlay .modal {
    background: var(--bg-card, #101018);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    margin: auto;
}

.modal-overlay .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay .modal-header h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.modal-overlay .modal-body {
    margin-bottom: 1rem;
}

.modal-overlay .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay .form-group {
    margin-bottom: 1rem;
}

.modal-overlay .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-overlay .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
}

.modal-overlay .form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.context-menu {
    position: fixed;
    background: var(--bg-card, #0d0d14);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    z-index: 1001;
    min-width: 180px;
    overflow: hidden;
}

.context-menu.hidden {
    display: none;
}

.context-menu-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.9rem;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.context-menu-item[data-action="ban"]:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Staff badges in player list */
.player-item.global-admin {
    border-left: 3px solid #ffd700;
}

.player-item.moderator {
    border-left: 3px solid #00d4aa;
}

.staff-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

.admin-badge {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
}

.mod-badge {
    background: linear-gradient(135deg, #00d4aa, #00a080);
    color: #000;
}

/* ============================================
   SETTINGS MODAL - FIXED LAYOUT
   ============================================ */

#settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#settings-modal.hidden {
    display: none;
}

#settings-modal .modal {
    background: var(--bg-card, #101018);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#settings-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

#settings-modal .modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-primary);
}

#settings-modal .modal-body {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
}

#settings-modal .modal-body p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#settings-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* ============================================
   KEYBINDINGS LIST
   ============================================ */
.keybind-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.keybind-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.keybind-action {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.keybind-keys {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.keybind-keys:hover {
    background: rgba(255, 255, 255, 0.1);
}

.keybind-keys.capturing {
    background: rgba(16, 185, 129, 0.2);
    border: 1px dashed var(--accent-primary);
}

.keybind-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-primary);
    min-width: 1.75rem;
    text-align: center;
}

.keybind-key.capturing {
    background: var(--accent-primary);
    color: #000;
    animation: pulse 1s infinite;
}

.keybind-separator {
    color: var(--text-muted);
    font-size: 0.8rem;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ============================================
   BETA TAG
   ============================================ */
.beta-tag {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-gold);
    background: rgba(245, 158, 11, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(245, 158, 11, 0.3);
    vertical-align: middle;
    margin-left: 0.5rem;
    letter-spacing: 1px;
}
