/**
 * style.css - 영단어 맞추기 메인 스타일시트
 * 위치: /assets/css/style.css
 *
 * Cosmic 컬러 스킴 + 카카오톡 스타일 UI
 * ANTIGRAVITY 효과: Particle Ring, Noise Pattern, Light Spiral
 */

/* ==========================================
   CSS VARIABLES
   ========================================== */
:root {
    /* Cosmic Color Scheme */
    --primary: #667eea;
    --primary-light: #7c94f4;
    --primary-dark: #5268d4;
    --secondary: #764ba2;
    --accent: #f093fb;
    --accent-yellow: #FFE500; /* 카카오 옐로우 */
    --accent-cyan: #06d6a0;
    --accent-pink: #ef476f;

    /* Background Colors (Cosmic Dark) */
    --bg-dark: #0f0f23;
    --bg-darker: #0a0a1a;
    --bg-card: #1a1a3e;
    --bg-card-hover: #252550;
    --bg-gradient: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #2a1a4a 100%);

    /* Text Colors */
    --text-white: #ffffff;
    --text-light: #e0e0f0;
    --text-gray: #9ca3af;
    --text-muted: #6b7280;

    /* Game Colors */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Chat Style Colors (카카오톡 inspired) */
    --chat-bubble-mine: #FFE500;
    --chat-bubble-other: #ffffff;
    --chat-text-mine: #1a1a1a;
    --chat-text-other: #1a1a1a;

    /* Glow Effects */
    --glow-primary: rgba(102, 126, 234, 0.5);
    --glow-secondary: rgba(118, 75, 162, 0.5);
    --glow-accent: rgba(240, 147, 251, 0.5);

    /* Typography */
    --font-primary: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Orbitron', 'Poppins', sans-serif;
    --font-game: 'Poppins', sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--glow-primary);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-index layers */
    --z-dropdown: 100;
    --z-header: 200;
    --z-modal: 300;
    --z-toast: 400;
    --z-loading: 500;

    /* Aliases for component styles */
    --color-primary: var(--primary);
    --color-primary-light: var(--primary-light);
    --color-secondary: var(--secondary);
    --color-accent: var(--accent);
    --color-success: var(--success);
    --color-warning: var(--warning);
    --color-error: var(--danger);
    --color-info: var(--info);
    --color-text: var(--text-white);
    --color-text-secondary: var(--text-gray);
    --color-text-muted: var(--text-muted);
    --color-background: var(--bg-dark);
    --color-surface: var(--bg-card);
    --color-surface-elevated: var(--bg-card-hover);
    --color-border: rgba(102, 126, 234, 0.2);
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --header-height: 70px;
    --space-2xs: 2px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--bg-dark);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-white);
}

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

.display-title {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 5s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================
   CONTAINER
   ========================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-sm { max-width: 800px; }
.container-lg { max-width: 1400px; }

/* ==========================================
   LOADING SCREEN
   ========================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loading);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loading-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.loading-logo .logo-icon {
    font-size: 3rem;
    animation: pulse 1s infinite;
}

.loading-logo .logo-text {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto var(--space-md);
}

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

.loading-text {
    color: var(--text-gray);
    font-size: 0.875rem;
}

@keyframes loading-progress {
    0% { width: 0%; transform: translateX(0); }
    50% { width: 70%; }
    100% { width: 100%; transform: translateX(0); }
}

/* ==========================================
   HEADER
   ========================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    z-index: var(--z-header);
    transition: all var(--transition-normal);
}

.site-header.scrolled {
    height: 60px;
    background: rgba(10, 10, 26, 0.98);
    box-shadow: var(--shadow-lg);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
}

.logo .logo-icon {
    font-size: 2rem;
}

.logo .logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo .logo-main {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: 0.05em;
}

.logo .logo-sub {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-light);
    letter-spacing: 0.1em;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-xs);
}

.nav-list > li > a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-gray);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-list > li > a:hover,
.nav-list > li > a.active {
    color: var(--text-white);
    background: rgba(102, 126, 234, 0.15);
}

.nav-list > li > a.nav-play {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-white);
}

.nav-list > li > a.nav-play:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

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

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-lg);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--text-gray);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.dropdown-menu li a:hover {
    color: var(--text-white);
    background: rgba(102, 126, 234, 0.2);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-card);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glow-primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-white);
}

.user-name {
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-lg);
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown li a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-gray);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.user-dropdown li a:hover {
    color: var(--text-white);
    background: rgba(102, 126, 234, 0.2);
}

.user-dropdown li.divider {
    height: 1px;
    background: rgba(102, 126, 234, 0.2);
    margin: var(--space-sm) 0;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-white);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ==========================================
   MOBILE NAVIGATION
   ========================================== */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-darker);
    z-index: var(--z-modal);
    transition: left var(--transition-normal);
    overflow-y: auto;
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.mobile-nav-header .logo-icon {
    font-size: 2rem;
}

.mobile-nav-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: none;
    border-radius: 50%;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mobile-nav-close:hover {
    background: var(--primary);
}

.mobile-nav-list {
    list-style: none;
    padding: var(--space-md);
}

.mobile-nav-list li a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    color: var(--text-gray);
    font-size: 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-nav-list li a:hover,
.mobile-nav-list li a.highlight {
    color: var(--text-white);
    background: rgba(102, 126, 234, 0.15);
}

.mobile-nav-list li a.highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.mobile-nav-auth {
    padding: var(--space-md);
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: calc(var(--z-modal) - 1);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-white);
    box-shadow: 0 4px 15px var(--glow-primary);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--glow-primary);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-white);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glow-primary);
}

.btn-outline {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-white);
}

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

.btn-danger {
    background: var(--danger);
    color: var(--text-white);
}

.btn-game {
    background: linear-gradient(135deg, var(--accent-yellow), #ffd000);
    color: #1a1a1a;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 20px rgba(255, 229, 0, 0.4);
}

.btn-game:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 229, 0, 0.5);
}

.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
}

/* ==========================================
   CARDS
   ========================================== */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: var(--shadow-md);
}

.card-glow:hover {
    box-shadow: 0 0 30px var(--glow-primary);
}

.card-header {
    margin-bottom: var(--space-lg);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--space-sm);
}

.card-body {
    color: var(--text-gray);
}

.card-footer {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(102, 126, 234, 0.15);
}

/* Game Card */
.game-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--primary), transparent);
    animation: rotate-border 4s linear infinite;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.game-card:hover::before {
    opacity: 0.3;
}

.game-card > * {
    position: relative;
    z-index: 1;
}

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

/* ==========================================
   HINT CARDS (Chat Style)
   ========================================== */
.hint-card {
    background: var(--chat-bubble-other);
    color: var(--chat-text-other);
    padding: var(--space-md) var(--space-lg);
    border-radius: 20px 20px 20px 4px;
    max-width: 80%;
    position: relative;
    box-shadow: var(--shadow-sm);
    animation: slideInLeft 0.3s ease;
}

.hint-card.revealed {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text-white);
}

.hint-card .hint-number {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 28px;
    height: 28px;
    background: var(--accent-yellow);
    color: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}

.hint-card .hint-text {
    font-size: 1rem;
    line-height: 1.5;
}

.hint-card .hint-image {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin-top: var(--space-sm);
}

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

/* ==========================================
   GAME UI
   ========================================== */
.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl);
}

/* Timer */
.game-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.timer-display {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    color: var(--text-white);
    text-shadow: 0 0 30px var(--glow-primary);
    transition: all var(--transition-fast);
}

.timer-display.warning {
    color: var(--warning);
    text-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
    animation: pulse-warning 0.5s infinite;
}

.timer-display.danger {
    color: var(--danger);
    text-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
    animation: pulse-danger 0.3s infinite;
}

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

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

.timer-progress {
    width: 100%;
    height: 8px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: var(--space-sm);
}

.timer-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: width 1s linear;
}

.timer-progress-bar.warning {
    background: var(--warning);
}

.timer-progress-bar.danger {
    background: var(--danger);
}

/* Hints Grid */
.hints-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.hint-item {
    min-height: 120px;
}

/* Answer Input */
.answer-section {
    text-align: center;
}

.answer-input-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto var(--space-lg);
}

.answer-input {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    font-family: var(--font-game);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-white);
    background: var(--bg-card);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--radius-lg);
    outline: none;
    transition: all var(--transition-fast);
}

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

.answer-input::placeholder {
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: normal;
}

.answer-input.correct {
    border-color: var(--success);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
    animation: success-pulse 0.5s ease;
}

.answer-input.wrong {
    border-color: var(--danger);
    animation: shake 0.5s ease;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

/* Score Display */
.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
}

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

.score-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.score-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
}

.score-value.highlight {
    color: var(--accent-yellow);
    text-shadow: 0 0 10px rgba(255, 229, 0, 0.5);
}

/* ==========================================
   RANKING TABLE
   ========================================== */
.ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 var(--space-sm);
}

.ranking-table th {
    padding: var(--space-md);
    text-align: left;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ranking-table td {
    padding: var(--space-md);
    background: var(--bg-card);
    color: var(--text-light);
}

.ranking-table tr td:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.ranking-table tr td:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.ranking-table tbody tr {
    transition: all var(--transition-fast);
}

.ranking-table tbody tr:hover td {
    background: var(--bg-card-hover);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffb800);
    color: #1a1a1a;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #1a1a1a;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #b06c2a);
    color: #fff;
}

.rank-badge.normal {
    background: var(--bg-dark);
    color: var(--text-gray);
}

/* ==========================================
   FORMS
   ========================================== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--text-white);
    background: var(--bg-card);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--radius-md);
    outline: none;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glow-primary);
}

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

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Image Upload Area */
.upload-area {
    border: 2px dashed rgba(102, 126, 234, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.upload-area .upload-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.upload-area .upload-text {
    color: var(--text-gray);
    margin-bottom: var(--space-sm);
}

.upload-area .upload-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.upload-preview {
    position: relative;
    display: inline-block;
    margin-top: var(--space-md);
}

.upload-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.upload-preview .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Clipboard Paste Button */
.paste-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-gray);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.paste-btn:hover {
    border-color: var(--primary);
    color: var(--text-white);
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    background: var(--bg-darker);
    border-top: 1px solid rgba(102, 126, 234, 0.15);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: var(--space-3xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--space-md);
}

.footer-brand .logo-icon {
    font-size: 1.5rem;
}

.footer-desc {
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-bottom: var(--space-lg);
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text-gray);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--text-white);
    transform: translateY(-2px);
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: var(--space-md);
}

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

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-gray);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(102, 126, 234, 0.15);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: var(--space-md);
}

.footer-legal a {
    color: var(--text-muted);
}

.footer-legal a:hover {
    color: var(--text-light);
}

.footer-legal span {
    color: var(--text-muted);
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
.toast-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    min-width: 280px;
    max-width: 400px;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    font-size: 1.25rem;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-white);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================
   MODALS
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.modal {
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--bg-card);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid rgba(102, 126, 234, 0.15);
}

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

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-dark);
    color: var(--text-white);
}

.modal-body {
    padding: var(--space-xl);
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid rgba(102, 126, 234, 0.15);
}

/* ==========================================
   SECTIONS
   ========================================== */
.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--radius-full);
    color: var(--primary-light);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: var(--space-md);
}

.section-desc {
    color: var(--text-gray);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Page Hero */
.page-hero {
    padding: calc(70px + var(--space-3xl)) 0 var(--space-2xl);
    text-align: center;
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: var(--space-md);
}

.page-desc {
    color: var(--text-gray);
    font-size: 1.125rem;
}

/* ==========================================
   FAQ ACCORDION
   ========================================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.faq-question:hover {
    background: rgba(102, 126, 234, 0.1);
}

.faq-question h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
}

.faq-icon {
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--text-gray);
    line-height: 1.8;
}

/* ==========================================
   UTILITIES
   ========================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mt-5 { margin-top: var(--space-2xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.mb-5 { margin-bottom: var(--space-2xl); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ==========================================
   MAIN CONTENT PADDING
   ========================================== */
.site-main {
    min-height: calc(100vh - 70px - 300px);
    padding-top: 70px;
}

/* ==========================================
   SLIDER / CAROUSEL
   ========================================== */
.slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease;
}

.slider-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.slider-indicators {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-sm);
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.slider-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(15, 15, 35, 0.8);
    border: 1px solid var(--color-border);
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--transition-normal);
}

.slider-arrow:hover {
    background: var(--primary);
}

.slider-arrow.prev { left: var(--space-md); }
.slider-arrow.next { right: var(--space-md); }

/* Card Slider */
.card-slider .slider-track {
    gap: var(--space-md);
    padding: var(--space-sm);
}

.card-slider .slider-slide {
    min-width: 280px;
    flex-shrink: 0;
}

/* ==========================================
   RANKING TABLE
   ========================================== */
.ranking-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
    padding: var(--space-md);
    text-align: left;
}

.ranking-table th {
    background: var(--bg-darker);
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.ranking-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background var(--transition-fast);
}

.ranking-table tbody tr:hover {
    background: var(--color-surface-elevated);
}

.ranking-table tbody tr:last-child {
    border-bottom: none;
}

.ranking-table tbody tr.top-rank {
    background: rgba(102, 126, 234, 0.1);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--color-surface-elevated);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
}

.player-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.player-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.accuracy-badge {
    padding: var(--space-2xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.accuracy-badge.high { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.accuracy-badge.medium { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.accuracy-badge.low { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

/* ==========================================
   SECTION HEADERS
   ========================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.section-header.text-center {
    flex-direction: column;
    text-align: center;
}

.section-header-left {
    flex: 1;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.section-desc {
    color: var(--text-secondary);
}
