* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --cyan: #00ffff;
    --magenta: #ff00ff;
    --purple: #8b5cf6;
    --teal: #14b8a6;
    --yellow: #facc15;
    --bg-dark: #0a0a1a;
    --bg-mid: #1a0a2e;
    --glass-bg: rgba(10, 10, 26, 0.8);
    --glass-border: rgba(0, 255, 255, 0.2);
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 50%, #000 100%);
    color: white;
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
}

#app-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.hidden {
    display: none !important;
}

/* ==================== LOADING ==================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

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

.loading-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 900;
    color: var(--cyan);
    text-shadow: 0 0 20px var(--cyan), 0 0 40px var(--cyan);
    animation: pulse-glow 2s ease-in-out infinite;
}

.loading-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 6vw, 3rem);
    font-weight: 700;
    color: var(--magenta);
    text-shadow: 0 0 20px var(--magenta);
    margin-top: -10px;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 2rem auto 0;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

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

/* ==================== MAIN MENU ==================== */
#main-menu {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.menu-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.title-container {
    text-align: center;
    margin-bottom: 3rem;
}

.main-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 900;
    color: var(--cyan);
    text-shadow: 0 0 30px var(--cyan), 0 0 60px var(--cyan), 0 0 90px rgba(0, 255, 255, 0.5);
    letter-spacing: 0.1em;
    animation: title-glow 3s ease-in-out infinite;
}

.sub-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 6vw, 3rem);
    font-weight: 700;
    color: var(--magenta);
    text-shadow: 0 0 20px var(--magenta), 0 0 40px var(--magenta);
    margin-top: -0.5rem;
    letter-spacing: 0.2em;
}

.tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
    letter-spacing: 0.1em;
}

@keyframes title-glow {
    0%, 100% { 
        text-shadow: 0 0 30px var(--cyan), 0 0 60px var(--cyan), 0 0 90px rgba(0, 255, 255, 0.5);
    }
    50% { 
        text-shadow: 0 0 40px var(--cyan), 0 0 80px var(--cyan), 0 0 120px rgba(0, 255, 255, 0.7);
    }
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 300px;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.menu-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 ease;
}

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

.menu-btn.primary {
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.menu-btn.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.menu-btn.secondary {
    background: linear-gradient(135deg, var(--magenta), var(--purple));
    color: white;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
}

.menu-btn.secondary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.5);
}

.menu-btn.outline {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    color: white;
}

.menu-btn.outline:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.menu-btn:active {
    transform: scale(0.98);
}

.btn-icon {
    font-size: 1.2rem;
}

.settings-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    border-color: var(--cyan);
    transform: rotate(90deg);
}

.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--magenta);
    text-shadow: 0 0 10px var(--magenta);
}

/* ==================== GLASS PANEL ==================== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}

.modal-content {
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
}

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

.modal-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--cyan);
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    border-color: var(--magenta);
    color: var(--magenta);
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.toggle-group {
    display: flex;
    gap: 0.5rem;
}

.toggle-btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--cyan);
    color: var(--cyan);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-switch .slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .slider {
    background: var(--cyan);
}

.toggle-switch input:checked + .slider::before {
    transform: translateX(24px);
}

input[type="range"] {
    width: 100%;
    height: 6px;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--cyan);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--cyan);
}

.brush-selector {
    display: flex;
    gap: 0.5rem;
}

.brush-opt {
    flex: 1;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.brush-opt.active {
    border-color: var(--magenta);
    color: var(--magenta);
}

/* ==================== WORD SELECTION ==================== */
#word-select {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
    padding: 1rem;
}

.word-select-content {
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.sparkle-text {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    color: var(--cyan);
    text-shadow: 0 0 20px var(--cyan);
    margin-bottom: 2rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; text-shadow: 0 0 30px var(--cyan), 0 0 60px var(--magenta); }
}

.word-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.word-card {
    padding: 1.5rem;
    border-radius: 16px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 3px solid;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.word-card.easy { border-color: #22c55e; }
.word-card.medium { border-color: var(--yellow); }
.word-card.hard { border-color: #ef4444; }

.word-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.word-card.selected {
    animation: card-pulse 0.3s ease;
}

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

.word-difficulty {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.word-text {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.word-category {
    display: block;
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 0.25rem;
}

.word-points {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--cyan);
}

/* ==================== DRAWING PHASE ==================== */
#drawing-phase, #practice-mode {
    position: relative;
    width: 100%;
    height: 100%;
}

#scene-container, #practice-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#ar-video, #practice-ar-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    display: none;
}

.top-hud {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    z-index: 10;
}

.hud-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.round-info {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.category-tag {
    padding: 0.25rem 0.5rem;
    background: rgba(139, 92, 246, 0.3);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--purple);
}

.difficulty-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.difficulty-badge.easy { background: rgba(34, 197, 94, 0.3); color: #22c55e; }
.difficulty-badge.medium { background: rgba(250, 204, 21, 0.3); color: var(--yellow); }
.difficulty-badge.hard { background: rgba(239, 68, 68, 0.3); color: #ef4444; }

.timer-ring {
    width: 48px;
    height: 48px;
    position: relative;
}

.timer-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.timer-progress {
    fill: none;
    stroke: var(--cyan);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.timer-ring.warning .timer-progress {
    stroke: #ef4444;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
}

.timer-ring.warning .timer-text {
    color: #ef4444;
    animation: timer-pulse 0.5s ease-in-out infinite;
}

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

.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
}

.crosshair-ring {
    width: 40px;
    height: 40px;
    border: 2px solid var(--cyan);
    border-radius: 50%;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.crosshair.active .crosshair-ring {
    opacity: 1;
    box-shadow: 0 0 20px var(--cyan);
    animation: crosshair-pulse 0.5s ease-in-out infinite;
}

.crosshair-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--cyan);
}

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

.bottom-hud {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 10;
}

.drawer-hud {
    text-align: center;
}

.drawing-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--magenta);
    letter-spacing: 0.2em;
    margin-bottom: 0.75rem;
}

.drawer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.control-btn span {
    font-size: 1.5rem;
}

.control-btn small {
    font-size: 0.7rem;
    opacity: 0.7;
}

.control-btn:hover, .control-btn:active {
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.control-btn.hold-draw {
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    border-color: transparent;
    color: var(--bg-dark);
}

.control-btn.hold-draw small {
    opacity: 1;
}

.secret-word {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.secret-word span {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--yellow);
    text-shadow: 0 0 10px var(--yellow);
    margin-top: 0.25rem;
}

.guesser-hud {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.guess-feed {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 60px;
    overflow-y: auto;
}

.guess-bubble {
    padding: 0.35rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.guess-bubble.correct {
    background: rgba(34, 197, 94, 0.3);
    border-color: #22c55e;
    color: #22c55e;
}

.guess-bubble.wrong {
    opacity: 0.5;
}

.guess-input-container {
    display: flex;
    gap: 0.5rem;
}

#guess-input {
    flex: 1;
    padding: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#guess-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#guess-input:focus {
    border-color: var(--cyan);
}

.send-btn {
    width: 50px;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    border: none;
    border-radius: 12px;
    color: var(--bg-dark);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.05);
}

.motion-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem 2rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulse-glow 2s ease-in-out infinite;
}

.warning-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 8;
    box-shadow: inset 0 0 100px rgba(239, 68, 68, 0.5);
    animation: warning-pulse 0.5s ease-in-out infinite;
}

@keyframes warning-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ==================== PRACTICE HUD ==================== */
.practice-hud {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.back-btn {
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    border-color: var(--cyan);
}

.practice-controls {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem;
}

.practice-controls .control-btn {
    flex-direction: row;
    padding: 0.5rem 0.75rem;
    min-width: auto;
}

.practice-controls .control-btn span {
    font-size: 1rem;
}

/* ==================== CELEBRATION ==================== */
#celebration, #times-up {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
}

.celebration-content, .times-up-content {
    text-align: center;
    z-index: 1;
}

#confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.correct-banner {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3rem, 12vw, 6rem);
    font-weight: 900;
    color: #22c55e;
    text-shadow: 0 0 30px #22c55e, 0 0 60px #22c55e;
    animation: correct-pop 0.5s ease-out;
}

@keyframes correct-pop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.winner-name {
    font-size: 1.5rem;
    color: var(--cyan);
    margin-top: 1rem;
}

.times-up-text {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 900;
    color: #ef4444;
    text-shadow: 0 0 30px #ef4444;
    animation: times-up-shake 0.5s ease;
}

@keyframes times-up-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.reveal-word {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.reveal-word span {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--yellow);
    margin-top: 0.5rem;
}

/* ==================== ROUND SUMMARY ==================== */
#round-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
    padding: 1rem;
}

.summary-content {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    text-align: center;
}

.summary-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--cyan);
    margin-bottom: 1.5rem;
}

.scoreboard {
    margin-bottom: 2rem;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.player-avatar {
    font-size: 1.5rem;
}

.player-name {
    flex: 1;
    text-align: left;
}

.player-score {
    font-family: 'JetBrains Mono', monospace;
    color: var(--cyan);
}

.summary-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ==================== ROOM SCREENS ==================== */
#create-room, #join-room {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
    padding: 1rem;
}

.room-content {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.room-content .back-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.room-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--cyan);
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.room-code-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.room-code-display span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--yellow);
    text-shadow: 0 0 20px var(--yellow);
    letter-spacing: 0.2em;
}

.copy-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.qr-placeholder {
    margin-bottom: 1.5rem;
}

.qr-code {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-placeholder-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.player-list {
    margin-bottom: 1.5rem;
    text-align: left;
}

.player-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.code-input-container {
    margin-bottom: 1.5rem;
}

.code-input {
    width: 100%;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    text-align: center;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    color: var(--yellow);
    outline: none;
    transition: border-color 0.3s ease;
}

.code-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.1em;
}

.code-input:focus {
    border-color: var(--cyan);
}

.error-msg {
    color: #ef4444;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    .drawer-controls {
        gap: 0.5rem;
    }
    
    .control-btn {
        padding: 0.5rem 0.75rem;
        min-width: 70px;
    }
    
    .control-btn span {
        font-size: 1.25rem;
    }
    
    .top-hud {
        padding: 0.5rem;
    }
    
    .round-info {
        font-size: 0.8rem;
    }
    
    .category-tag {
        display: none;
    }
}

@media (min-width: 768px) {
    .menu-buttons {
        max-width: 350px;
    }
    
    .word-cards {
        flex-direction: row;
    }
    
    .word-card {
        flex: 1;
    }
}