/* Adiosos.io - Main Stylesheet */
/* Dark Theme with Neon Accents */

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

/* CSS Variables */
:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252542;
    --text-primary: #ffffff;
    --text-secondary: #b8b8d1;
    --text-muted: #6c6c8a;
    --accent-purple: #9b5de5;
    --accent-cyan: #00f5d4;
    --accent-yellow: #fee440;
    --accent-pink: #f15bb5;
    --accent-orange: #ff6b35;
    --success: #00c853;
    --error: #ff5252;
    --warning: #ffc107;
    --neon-glow: 0 0 10px var(--accent-purple), 0 0 20px var(--accent-purple), 0 0 40px var(--accent-purple);
    --neon-glow-cyan: 0 0 10px var(--accent-cyan), 0 0 20px var(--accent-cyan), 0 0 40px var(--accent-cyan);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hard: 0 8px 32px rgba(0, 0, 0, 0.5);
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(155, 93, 229, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 245, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(254, 228, 64, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Fredoka One', cursive;
    font-weight: 400;
    line-height: 1.2;
}

/* Neon Title */
.neon-title {
    font-family: 'Fredoka One', cursive;
    font-size: 4rem;
    color: var(--text-primary);
    text-shadow: 
        0 0 5px var(--accent-purple),
        0 0 10px var(--accent-purple),
        0 0 20px var(--accent-purple),
        0 0 40px var(--accent-purple),
        0 0 80px var(--accent-purple);
    animation: neonPulse 2s ease-in-out infinite alternate;
    letter-spacing: 2px;
}

@keyframes neonPulse {
    from {
        text-shadow: 
            0 0 5px var(--accent-purple),
            0 0 10px var(--accent-purple),
            0 0 20px var(--accent-purple),
            0 0 40px var(--accent-purple),
            0 0 80px var(--accent-purple);
    }
    to {
        text-shadow: 
            0 0 2px var(--accent-purple),
            0 0 5px var(--accent-purple),
            0 0 10px var(--accent-purple),
            0 0 20px var(--accent-purple),
            0 0 40px var(--accent-purple);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Main Screen Layout */
.main-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.logo-section {
    text-align: center;
    margin-bottom: 60px;
}

.logo-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

/* Buttons */
.btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    padding: 16px 40px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(155, 93, 229, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(155, 93, 229, 0.6);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.2);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(0, 245, 212, 0.1);
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.4);
    transform: translateY(-3px);
}

.btn-small {
    font-size: 0.9rem;
    padding: 10px 20px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Menu Buttons */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 350px;
}

/* Input Fields */
.input-field {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 14px 20px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
    width: 100%;
}

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

.input-field:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.2);
}

.input-field.error {
    border-color: var(--error);
}

/* Input Group */
.input-group {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 350px;
}

.input-group .input-field {
    flex: 1;
}

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

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

.modal {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: var(--shadow-hard);
    transform: scale(0.9) translateY(20px);
    transition: all var(--transition-normal);
    border: 1px solid var(--bg-tertiary);
}

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

.modal-title {
    font-size: 1.8rem;
    color: var(--accent-cyan);
    margin-bottom: 10px;
    text-align: center;
}

.modal-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.modal-actions .btn {
    flex: 1;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

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

.form-error {
    font-size: 0.85rem;
    color: var(--error);
    display: none;
}

.form-error.visible {
    display: block;
}

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.char-counter.warning {
    color: var(--warning);
}

.char-counter.limit {
    color: var(--error);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 26, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.loading-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 3000;
}

.toast {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 16px 24px;
    box-shadow: var(--shadow-hard);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--accent-cyan);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.warning {
    border-left-color: var(--warning);
}

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

.toast-message {
    flex: 1;
    font-size: 0.95rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
}

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

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

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

.toast.removing {
    animation: slideOut 0.3s ease forwards;
}

/* User Info Badge */
.user-badge {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--bg-tertiary);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
}

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

/* Footer */
.footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.footer a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.mode-btn:hover {
    background: rgba(155, 93, 229, 0.1);
    border-color: var(--accent-purple);
}

.mode-btn.active {
    background: rgba(155, 93, 229, 0.2);
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(155, 93, 229, 0.3);
}

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

.mode-name {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.mode-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Option Buttons */
.option-buttons {
    display: flex;
    gap: 10px;
}

.option-btn {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.option-btn.active {
    background: rgba(0, 245, 212, 0.2);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
}

/* Slider */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
    transition: transform var(--transition-fast);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .neon-title {
        font-size: 2.5rem;
    }
    
    .modal {
        padding: 30px 20px;
    }
    
    .btn {
        padding: 14px 30px;
        font-size: 1rem;
    }
    
    .user-badge {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
    }
    
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .toast-container {
        left: 10px;
        right: 10px;
    }
    
    .toast {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .neon-title {
        font-size: 2rem;
    }
    
    .logo-subtitle {
        font-size: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .input-group {
        flex-direction: column;
    }
}

/* ==========================================
   LOBBY FULLSCREEN (GARTIC PHONE STYLE)
   ========================================== */

.lobby-fullscreen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    overflow: hidden;
}

/* Top Bar */
.lobby-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.2);
}

.topbar-btn {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.topbar-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.05);
}

.lobby-logo {
    font-family: 'Fredoka One', cursive;
    font-size: 2.2rem;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.logo-text {
    color: #fff;
}

.logo-io {
    color: var(--accent-cyan);
}

.game-code-pill {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: white;
    letter-spacing: 2px;
}

/* Main Lobby Content */
.lobby-main {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.lobby-column {
    background: rgba(100, 80, 180, 0.85);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.column-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: white;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

/* Players Column */
.players-column {
    max-height: calc(100vh - 200px);
}

.max-players-select {
    margin-bottom: 15px;
}

.players-dropdown {
    width: 100%;
    padding: 12px 15px;
    background: rgba(80, 60, 150, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.players-dropdown:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.players-slots {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.player-slot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(80, 60, 150, 0.6);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.player-slot.filled {
    background: rgba(100, 80, 180, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

.player-slot.current-user {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 212, 0.4);
}

.player-slot.empty {
    opacity: 0.5;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
}

.player-slot.empty .player-avatar {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
}

.player-nick {
    flex: 1;
    font-weight: 600;
    font-size: 1rem;
    color: white;
}

.player-slot.empty .player-nick {
    color: rgba(255, 255, 255, 0.4);
}

.player-badge {
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.player-badge.host {
    background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
    color: #1a1a2e;
}

/* Modes Column */
.modes-column {
    display: flex;
    flex-direction: column;
}

.modes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.mode-card {
    background: rgba(200, 180, 240, 0.9);
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 25px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mode-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.mode-card.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 245, 212, 0.2);
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.4);
}

.mode-card:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.mode-icon {
    font-size: 2.5rem;
}

.mode-name {
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    color: #3a2a6d;
}

.mode-description {
    background: rgba(80, 60, 150, 0.6);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: auto;
}

.mode-description p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Settings Column */
.settings-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-label {
    font-family: 'Fredoka One', cursive;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.setting-select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(80, 60, 150, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.setting-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-disabled-msg {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.settings-disabled-msg p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

/* Footer */
.lobby-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
}

.footer-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.footer-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.invite-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #5a4a9a;
}

.qr-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #5a4a9a;
    padding: 15px 20px;
}

.start-btn {
    background: linear-gradient(135deg, #00f5d4, #00d4aa);
    color: #1a1a2e;
    min-width: 200px;
}

.start-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #00ffde, #00e4b4);
}

/* Invite Modal */
.invite-modal {
    max-width: 500px;
}

.invite-link-display {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.invite-input-full {
    flex: 1;
    padding: 15px;
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.qr-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
}

/* Responsive Lobby */
@media (max-width: 1100px) {
    .lobby-main {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    
    .players-column {
        grid-row: span 2;
    }
    
    .modes-column {
        grid-column: 2;
    }
    
    .settings-column {
        grid-column: 2;
    }
}

@media (max-width: 768px) {
    .lobby-main {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 15px;
    }
    
    .lobby-column {
        max-height: none;
    }
    
    .players-column {
        order: 2;
    }
    
    .modes-column {
        order: 1;
    }
    
    .settings-column {
        order: 3;
    }
    
    .modes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mode-card {
        padding: 15px 10px;
    }
    
    .mode-icon {
        font-size: 2rem;
    }
    
    .mode-name {
        font-size: 0.8rem;
    }
    
    .lobby-topbar {
        padding: 10px 15px;
    }
    
    .lobby-logo {
        font-size: 1.6rem;
    }
    
    .footer-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .lobby-footer {
        flex-wrap: wrap;
    }
    
    .start-btn {
        width: 100%;
        order: -1;
    }
}

/* ==========================================
   GAME SCREEN STYLES
   ========================================== */

.game-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--bg-tertiary);
}

.game-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.round-indicator {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.timer {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: var(--accent-cyan);
    min-width: 60px;
    text-align: center;
    padding: 5px 15px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
}

.timer.warning {
    color: var(--warning);
    animation: pulse 0.5s ease infinite;
}

.timer.danger {
    color: var(--error);
    animation: pulse 0.3s ease infinite;
}

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

.current-word {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: 5px;
}

.current-word .hint {
    color: var(--accent-yellow);
}

.game-scores-mini {
    display: flex;
    gap: 15px;
}

.game-content {
    flex: 1;
    display: flex;
    padding: 20px;
    gap: 20px;
}

/* Canvas Container */
.canvas-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    position: relative;
}

#gameCanvas {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hard);
    max-width: 100%;
    height: auto;
    cursor: crosshair;
}

/* Game Sidebar */
.game-sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    border: 1px solid var(--bg-tertiary);
}

.sidebar-section h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.scoreboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

/* Chat Section */
.chat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    padding-right: 5px;
}

.chat-message {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.chat-message .nick {
    font-weight: 600;
    color: var(--accent-purple);
    margin-right: 8px;
}

.chat-message.correct {
    background: rgba(0, 200, 83, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
}

.chat-message.system {
    background: rgba(155, 93, 229, 0.1);
    color: var(--accent-purple);
    font-style: italic;
    text-align: center;
}

.chat-input-group {
    display: flex;
    gap: 10px;
}

.chat-input-group .input-field {
    flex: 1;
}

/* Responsive Lobby */
@media (max-width: 900px) {
    .lobby-content {
        grid-template-columns: 1fr;
    }
    
    .lobby-header {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .lobby-title {
        order: -1;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .game-content {
        flex-direction: column;
    }
    
    .game-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .sidebar-section {
        flex: 1;
        min-width: 250px;
    }
    
    .game-header {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .current-word {
        width: 100%;
        order: -1;
    }
}

/* ==========================================
   DRAWING TOOLS STYLES
   ========================================== */

.drawing-tools {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.drawing-tools.hidden {
    display: none;
}

.tools-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-btn {
    width: 44px;
    height: 44px;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.tool-btn:hover {
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}

.tool-btn.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 245, 212, 0.1);
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
}

.action-btn {
    background: var(--bg-primary);
}

.action-btn:hover {
    background: var(--bg-secondary);
}

/* Brush Size */
.brush-section {
    flex-direction: column;
    gap: 5px;
}

.brush-section label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.brush-section .slider {
    width: 100px;
}

/* Color Palette */
.color-section {
    flex-direction: column;
    gap: 8px;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 3px;
}

.color-swatch {
    width: 22px;
    height: 22px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.color-swatch:hover {
    transform: scale(1.15);
    z-index: 1;
}

.color-swatch.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.custom-color {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-color input[type="color"] {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    background: none;
}

.custom-color input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.custom-color input[type="color"]::-webkit-color-swatch {
    border: 2px solid var(--bg-primary);
    border-radius: 4px;
}

.current-color {
    width: 30px;
    height: 30px;
    border: 2px solid var(--text-primary);
    border-radius: 4px;
}

/* Actions Section */
.actions-section {
    margin-left: auto;
}

/* Responsive Drawing Tools */
@media (max-width: 768px) {
    .drawing-tools {
        gap: 10px;
        padding: 10px;
    }
    
    .tool-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .color-palette {
        grid-template-columns: repeat(8, 1fr);
    }
    
    .color-swatch {
        width: 20px;
        height: 20px;
    }
    
    .brush-section .slider {
        width: 80px;
    }
}

/* ==========================================
   GAME MODE STYLES
   ========================================== */

/* Word Selection */
.word-selection {
    text-align: center;
}

.word-selection-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.word-choices {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.word-choice-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    padding: 15px 30px;
    background: var(--bg-tertiary);
    border: 2px solid var(--accent-purple);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.word-choice-btn:hover {
    background: var(--accent-purple);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(155, 93, 229, 0.4);
}

.waiting-text {
    color: var(--text-secondary);
    font-size: 1.2rem;
    animation: pulse 1.5s ease infinite;
}

.drawer-word {
    color: var(--accent-cyan);
}

.drawer-word strong {
    color: var(--accent-yellow);
    font-size: 1.3em;
}

/* Round End */
.round-end {
    text-align: center;
}

.round-end p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.round-end strong {
    color: var(--accent-yellow);
    font-size: 1.3em;
}

.next-round-text {
    color: var(--text-muted);
    font-style: italic;
}

/* Chat Close Message */
.chat-message.close {
    background: rgba(254, 228, 64, 0.1);
    border-left: 3px solid var(--accent-yellow);
}

/* ==========================================
   RESULTS SCREEN STYLES
   ========================================== */

.results-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.results-title {
    font-family: 'Fredoka One', cursive;
    font-size: 3rem;
    color: var(--accent-yellow);
    text-shadow: 0 0 20px rgba(254, 228, 64, 0.5);
    margin-bottom: 40px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Podium */
.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideUp 0.5s ease backwards;
}

.podium-place.place-1 { animation-delay: 0.3s; }
.podium-place.place-2 { animation-delay: 0.1s; }
.podium-place.place-3 { animation-delay: 0.2s; }

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

.podium-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: white;
    margin-bottom: 10px;
    box-shadow: var(--shadow-hard);
}

.place-1 .podium-avatar {
    width: 90px;
    height: 90px;
    font-size: 2.5rem;
    border: 4px solid var(--accent-yellow);
}

.podium-medal {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.place-1 .podium-medal {
    font-size: 3rem;
}

.podium-nick {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.podium-score {
    font-size: 1rem;
    color: var(--accent-cyan);
    margin-bottom: 10px;
}

.podium-stand {
    width: 120px;
    background: var(--bg-tertiary);
    border-radius: 10px 10px 0 0;
}

.place-1 .podium-stand {
    height: 100px;
    background: linear-gradient(180deg, var(--accent-yellow), var(--accent-orange));
}

.place-2 .podium-stand {
    height: 70px;
    background: linear-gradient(180deg, #c0c0c0, #808080);
}

.place-3 .podium-stand {
    height: 50px;
    background: linear-gradient(180deg, #cd7f32, #8b4513);
}

/* Full Results */
.full-results {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    width: 100%;
    max-width: 500px;
    margin-bottom: 30px;
}

.full-results h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    border: 2px solid transparent;
}

.result-row.current-user {
    border-color: var(--accent-cyan);
    background: rgba(0, 245, 212, 0.05);
}

.result-rank {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: var(--text-muted);
    width: 50px;
}

.result-nick {
    flex: 1;
    font-weight: 600;
}

.result-score {
    font-family: 'Fredoka One', cursive;
    color: var(--accent-yellow);
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive Results */
@media (max-width: 600px) {
    .results-title {
        font-size: 2rem;
    }
    
    .podium {
        flex-direction: column;
        align-items: center;
    }
    
    .podium-place {
        flex-direction: row;
        gap: 15px;
    }
    
    .podium-stand {
        display: none;
    }
    
    .podium-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .place-1 .podium-avatar {
        width: 60px;
        height: 60px;
    }
}

/* ==========================================
   TELEPHONE GAME MODE STYLES
   ========================================== */

.telephone-prompt {
    text-align: center;
    padding: 20px;
}

.prompt-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.prompt-word {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: var(--accent-yellow);
    text-shadow: 0 0 10px rgba(254, 228, 64, 0.3);
}

.guess-input-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.guess-input {
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
}

.submit-drawing-btn {
    display: block;
    margin: 15px auto 0;
}

/* Chain Viewer */
.chain-viewer {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.chain-header {
    text-align: center;
    margin-bottom: 30px;
}

.chain-header h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: var(--accent-purple);
    margin-bottom: 10px;
}

.chain-original {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.chain-original strong {
    color: var(--accent-yellow);
}

.chain-step {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    max-width: 850px;
    width: 100%;
    margin-bottom: 30px;
}

.step-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--bg-tertiary);
}

.step-number {
    font-family: 'Fredoka One', cursive;
    color: var(--accent-cyan);
}

.step-author {
    color: var(--text-muted);
}

.step-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.chain-drawing {
    max-width: 100%;
    max-height: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hard);
}

.chain-word {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: var(--accent-yellow);
    text-align: center;
    padding: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    min-width: 300px;
}

.chain-navigation {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Responsive Chain Viewer */
@media (max-width: 600px) {
    .chain-header h2 {
        font-size: 1.5rem;
    }
    
    .chain-word {
        font-size: 1.5rem;
        padding: 20px;
        min-width: auto;
    }
    
    .step-info {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}

/* ==========================================
   CHAOS GAME MODE STYLES
   ========================================== */

.chaos-intro {
    text-align: center;
    padding: 40px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.mini-game-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 0.6s ease infinite alternate;
}

.mini-game-name {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: var(--accent-purple);
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(155, 93, 229, 0.5);
}

.mini-game-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 30px;
}

.intro-countdown {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: var(--accent-cyan);
}

/* Quick Draw & Copycat Prompts */
.quick-draw-prompt,
.copycat-prompt,
.continue-prompt,
.fake-artist-prompt {
    text-align: center;
    padding: 20px;
}

.copycat-copy {
    text-align: center;
}

.original-to-copy {
    max-width: 300px;
    max-height: 200px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hard);
    margin-top: 15px;
}

.fake-artist-prompt.fake {
    background: rgba(241, 91, 181, 0.1);
    border: 2px solid var(--accent-pink);
    border-radius: var(--border-radius);
    padding: 30px;
}

.fake-artist-prompt .prompt-hint {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.time-hint {
    font-size: 0.9rem;
    color: var(--accent-yellow);
    margin-top: 10px;
}

/* Voting Screen */
.voting-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
}

.voting-screen h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: var(--accent-purple);
    margin-bottom: 15px;
}

.voting-prompt {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.voting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    width: 100%;
}

.voting-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    text-align: center;
    border: 2px solid var(--bg-tertiary);
    transition: all var(--transition-fast);
}

.voting-card:hover {
    border-color: var(--accent-purple);
}

.voting-drawing {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.voting-author {
    font-weight: 600;
    margin-bottom: 15px;
}

.your-drawing {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Player Vote Grid (Fake Artist) */
.player-vote-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    max-width: 800px;
}

.player-vote-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    text-align: center;
    min-width: 150px;
    border: 2px solid var(--bg-tertiary);
    transition: all var(--transition-fast);
}

.player-vote-card:hover {
    border-color: var(--accent-pink);
}

.player-vote-card .player-avatar {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
}

.player-vote-card .player-nick {
    font-weight: 600;
    margin-bottom: 15px;
}

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

/* Results Phase */
.results-phase {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.results-phase h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: var(--accent-yellow);
    margin-bottom: 30px;
}

.fake-artist-reveal {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    max-width: 400px;
}

.fake-artist-reveal.caught {
    border: 3px solid var(--success);
}

.fake-artist-reveal.escaped {
    border: 3px solid var(--accent-pink);
}

.reveal-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.reveal-name {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: var(--accent-pink);
    margin-bottom: 15px;
}

.reveal-word {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.reveal-word strong {
    color: var(--accent-yellow);
}

.reveal-result {
    font-size: 1.1rem;
    color: var(--accent-cyan);
    padding-top: 15px;
    border-top: 1px solid var(--bg-tertiary);
}

.voting-winner {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    border: 3px solid var(--accent-yellow);
}

.winner-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.winner-name {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: var(--accent-yellow);
    margin-bottom: 15px;
}

.winner-points {
    font-size: 1.2rem;
    color: var(--accent-cyan);
}

.next-round-indicator {
    margin-top: 30px;
    color: var(--text-muted);
    font-style: italic;
}

/* ==========================================
   MOBILE RESPONSIVE ENHANCEMENTS
   ========================================== */

/* Touch-friendly canvas */
@media (pointer: coarse) {
    #gameCanvas {
        touch-action: none;
    }
    
    .tool-btn {
        min-width: 48px;
        min-height: 48px;
    }
    
    .color-swatch {
        min-width: 28px;
        min-height: 28px;
    }
}

/* Small screens */
@media (max-width: 480px) {
    .lobby-header {
        padding: 15px;
    }
    
    .lobby-title {
        font-size: 1.4rem;
    }
    
    .game-code-badge {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .lobby-content {
        padding: 15px;
        gap: 15px;
    }
    
    .lobby-panel {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .game-mode-display {
        font-size: 1.2rem;
    }
    
    .player-card {
        padding: 12px;
        gap: 10px;
    }
    
    .player-avatar {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .player-nick {
        font-size: 0.95rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .game-header {
        padding: 10px 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .timer {
        font-size: 1.4rem;
        padding: 5px 12px;
    }
    
    .current-word {
        font-size: 1.2rem;
        letter-spacing: 3px;
    }
    
    .game-content {
        padding: 10px;
        gap: 10px;
    }
    
    .canvas-container {
        padding: 10px;
    }
    
    .drawing-tools {
        gap: 8px;
        padding: 10px;
    }
    
    .tools-section {
        gap: 5px;
    }
    
    .tool-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .brush-section .slider {
        width: 70px;
    }
    
    .color-palette {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .sidebar-section {
        padding: 15px;
    }
    
    .chat-messages {
        min-height: 100px;
        max-height: 150px;
    }
    
    .chat-message {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .word-choice-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .mini-game-name {
        font-size: 1.8rem;
    }
    
    .mini-game-desc {
        font-size: 1rem;
    }
    
    .voting-grid {
        grid-template-columns: 1fr;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .main-screen {
        padding: 20px;
    }
    
    .neon-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .logo-section {
        margin-bottom: 30px;
    }
    
    .game-content {
        flex-direction: row;
    }
    
    .game-sidebar {
        width: 280px;
        flex-direction: column;
    }
    
    .canvas-container {
        min-height: 300px;
    }
}

/* Disconnect overlay */
.disconnect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 26, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    text-align: center;
    padding: 20px;
}

.disconnect-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulse 1s ease infinite;
}

.disconnect-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: var(--error);
    margin-bottom: 15px;
}

.disconnect-message {
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 300px;
}

/* Paused game overlay */
.paused-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 26, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 4000;
    text-align: center;
}

.paused-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: var(--accent-yellow);
    margin-bottom: 15px;
}

.paused-message {
    color: var(--text-secondary);
}

/* Print styles (hide game for printing) */
@media print {
    body {
        display: none;
    }
}
