/* ==========================================
   PARTY GAMES - STYLES
   Modernes, cleanes Design mit Animationen
   ========================================== */

/* ========== CSS VARIABLES ========== */
:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #22d3ee;
    --accent: #f472b6;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Backgrounds */
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-input: #334155;
    
    /* Text */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
    --gradient-accent: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
    --gradient-dark: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.4);
    
    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

/* ========== SCREENS ========== */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    overflow-y: auto;
    background: var(--gradient-dark);
}

.screen.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== CONTAINER ========== */
.container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ========== LOGO & BRANDING ========== */
.logo-container {
    text-align: center;
    margin-bottom: 50px;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--bg-card-hover);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.1rem;
    width: 100%;
    max-width: 350px;
}

.btn-icon {
    font-size: 1.3em;
}

.btn-back {
    position: absolute;
    top: 20px;
    left: 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition-fast);
    font-family: inherit;
}

.btn-back:hover {
    color: var(--text-primary);
}

.btn-ready {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--text-muted);
    min-width: 150px;
}

.btn-ready.active {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.btn-start {
    min-width: 200px;
}

.btn-copy {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: transform var(--transition-fast);
}

.btn-copy:hover {
    transform: scale(1.2);
}

/* ========== MENU BUTTONS ========== */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 350px;
    margin-bottom: 50px;
    animation: slideUp 0.5s ease 0.2s both;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== GAME MODE PREVIEW ========== */
.game-modes-preview {
    text-align: center;
    animation: slideUp 0.5s ease 0.4s both;
}

.game-modes-preview h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

.mode-cards {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.mode-card {
    background: var(--bg-card);
    padding: 20px 25px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
}

.mode-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
}

.mode-icon {
    font-size: 2rem;
}

.mode-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    width: 100%;
    max-width: 350px;
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.input {
    width: 100%;
    padding: 16px 20px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}

.input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input::placeholder {
    color: var(--text-muted);
}

.input-code {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 8px;
    text-transform: uppercase;
}

/* ========== AVATAR PICKER ========== */
.avatar-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.avatar-option {
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
    background: var(--bg-input);
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-option:hover {
    background: var(--bg-card-hover);
    transform: scale(1.1);
}

.avatar-option.selected {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-glow);
}

/* ========== LOBBY ========== */
.lobby-header {
    width: 100%;
    margin-bottom: 30px;
}

.lobby-code-display {
    background: var(--bg-card);
    padding: 20px 30px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.lobby-code-display .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.lobby-code-display .code {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 5px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== PLAYERS SECTION ========== */
.players-section {
    width: 100%;
    margin-bottom: 30px;
}

.players-section h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.player-card {
    background: var(--bg-card);
    padding: 15px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.player-card.host::before {
    content: '👑';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.9rem;
}

.player-card.ready {
    border: 2px solid var(--success);
}

.player-card.eliminated {
    opacity: 0.5;
    filter: grayscale(1);
}

.player-avatar {
    font-size: 1.8rem;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.player-status.ready {
    color: var(--success);
}

.player-score {
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 600;
}

/* ========== GAME MODE SELECTOR ========== */
.game-mode-section {
    width: 100%;
    margin-bottom: 30px;
}

.game-mode-section h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.game-mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.mode-btn {
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 20px 15px;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.mode-btn:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

.mode-btn.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: var(--shadow-glow);
}

.mode-btn .mode-icon {
    font-size: 2rem;
}

.mode-btn .mode-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.mode-btn .mode-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.mode-btn .mode-players {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-dark);
    padding: 3px 8px;
    border-radius: 10px;
}

/* ========== LOBBY ACTIONS ========== */
.lobby-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== GAME SCREEN ========== */
#screen-game {
    padding: 0;
}

.game-container {
    display: grid;
    grid-template-columns: 1fr 200px;
    grid-template-rows: auto 1fr auto;
    height: 100vh;
    width: 100%;
    gap: 0;
}

/* Game Header */
.game-header {
    grid-column: 1 / -1;
    background: var(--bg-card);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bg-card-hover);
}

.game-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.game-mode {
    font-size: 1.2rem;
    font-weight: 700;
}

.game-round {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.game-timer {
    background: var(--gradient-primary);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    text-align: center;
}

.timer-value {
    font-size: 1.5rem;
    font-weight: 800;
    display: block;
}

.timer-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.game-timer.warning {
    background: var(--gradient-accent);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Game Content */
.game-content {
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Game Sidebar */
.game-sidebar {
    background: var(--bg-card);
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid var(--bg-card-hover);
}

.game-sidebar h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-players {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.game-player.current {
    border: 2px solid var(--primary);
}

.game-player.eliminated {
    opacity: 0.4;
    text-decoration: line-through;
}

.game-player .avatar {
    font-size: 1.3rem;
}

.game-player .name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-player .score {
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 600;
}

/* Game Actions / Chat */
.game-actions {
    grid-column: 1 / -1;
    background: var(--bg-card);
    border-top: 1px solid var(--bg-card-hover);
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 150px;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-message {
    font-size: 0.9rem;
}

.chat-message .author {
    font-weight: 600;
    color: var(--primary-light);
}

.chat-message.system {
    color: var(--text-muted);
    font-style: italic;
}

.chat-message.correct {
    color: var(--success);
    font-weight: 600;
}

.chat-input-container {
    display: flex;
    padding: 10px 15px;
    gap: 10px;
    border-top: 1px solid var(--bg-card-hover);
}

.chat-input-container .input {
    flex: 1;
    padding: 12px 16px;
}

.btn-send {
    padding: 12px 16px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-send:hover {
    background: var(--primary-dark);
}

/* ========== GAME-SPECIFIC STYLES ========== */

/* Role Display */
.role-display {
    text-align: center;
    padding: 40px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.role-emoji {
    font-size: 5rem;
    margin-bottom: 20px;
    display: block;
}

.role-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.role-description {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

.word-display {
    margin-top: 30px;
    padding: 25px 50px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--primary);
}

.word-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.word-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
}

/* Voting Section */
.voting-section {
    width: 100%;
    max-width: 500px;
}

.voting-title {
    text-align: center;
    margin-bottom: 25px;
}

.voting-title h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.voting-title p {
    color: var(--text-secondary);
}

.voting-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.vote-option {
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.vote-option:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

.vote-option.selected {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.vote-option.voted {
    opacity: 0.6;
    cursor: default;
}

.vote-avatar {
    font-size: 2rem;
}

.vote-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.vote-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Canvas (Scharade) */
.canvas-container {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

#draw-canvas {
    display: block;
    cursor: crosshair;
}

.canvas-tools {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: var(--bg-card);
    justify-content: center;
    flex-wrap: wrap;
}

.tool-btn {
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tool-btn.color {
    border-radius: 50%;
}

.tool-btn:hover {
    transform: scale(1.1);
}

.tool-btn.selected {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

/* Word Hint */
.word-hint {
    text-align: center;
    margin-bottom: 20px;
}

.hint-letters {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 8px;
    font-family: monospace;
}

.hint-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Word Selector */
.word-selector {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.word-option {
    background: var(--bg-card);
    padding: 20px 30px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.word-option:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* Night Phase (Werewolf) */
.night-phase {
    text-align: center;
    padding: 40px;
}

.night-phase .phase-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.night-phase .phase-message {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
}

.night-action-targets {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.night-target {
    background: var(--bg-card);
    padding: 20px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    font-family: inherit;
}

.night-target:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.night-target .avatar {
    font-size: 2rem;
}

.night-target .name {
    font-weight: 600;
    color: var(--text-primary);
}

/* ========== RESULTS SCREEN ========== */
.results-container {
    padding-top: 60px;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.results-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.results-content {
    width: 100%;
    max-width: 500px;
}

.results-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 40px;
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.podium-place.first {
    order: 2;
}

.podium-place.second {
    order: 1;
}

.podium-place.third {
    order: 3;
}

.podium-avatar {
    font-size: 2.5rem;
}

.podium-name {
    font-weight: 700;
}

.podium-score {
    color: var(--secondary);
    font-weight: 600;
}

.podium-stand {
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.podium-place.first .podium-stand {
    height: 100px;
    background: linear-gradient(180deg, #ffd700, #b8860b);
    color: white;
}

.podium-place.second .podium-stand {
    height: 70px;
    background: linear-gradient(180deg, #c0c0c0, #808080);
    color: white;
}

.podium-place.third .podium-stand {
    height: 50px;
    background: linear-gradient(180deg, #cd7f32, #8b4513);
    color: white;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-player {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    padding: 15px 20px;
    border-radius: var(--radius-md);
}

.result-rank {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-muted);
    width: 30px;
}

.result-avatar {
    font-size: 1.5rem;
}

.result-name {
    flex: 1;
    font-weight: 600;
}

.result-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 10px;
    background: var(--bg-dark);
    border-radius: 10px;
}

.result-score {
    font-weight: 700;
    color: var(--secondary);
}

.results-actions {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

/* ========== OVERLAY & MODAL ========== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease;
}

.modal-content {
    text-align: center;
}

.modal h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1100;
}

.toast {
    background: var(--bg-card);
    padding: 15px 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-message {
    font-size: 0.95rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .game-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto auto;
    }
    
    .game-sidebar {
        grid-row: 4;
        border-left: none;
        border-top: 1px solid var(--bg-card-hover);
        display: flex;
        overflow-x: auto;
        padding: 15px;
    }
    
    .game-sidebar h4 {
        display: none;
    }
    
    .game-players {
        flex-direction: row;
    }
    
    .game-player {
        flex-shrink: 0;
    }
    
    .game-mode-selector {
        grid-template-columns: 1fr;
    }
    
    .mode-btn {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 15px 20px;
    }
    
    .mode-btn .mode-icon {
        font-size: 1.5rem;
    }
    
    .logo {
        font-size: 2.2rem;
    }
    
    .lobby-code-display .code {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }
    
    .players-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .voting-options {
        grid-template-columns: 1fr 1fr;
    }
    
    .results-podium {
        transform: scale(0.8);
    }
}

/* ==========================================
   CREATIVE DRAW STYLES
   ========================================== */

/* Intro Screen */
.creativedraw-intro {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.mode-reveal {
    text-align: center;
    animation: scaleIn 0.5s ease;
}

.mode-emoji-large {
    font-size: 5rem;
    display: block;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

.mode-title-large {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.mode-description-large {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 20px;
}

.mode-info {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.info-badge {
    background: var(--bg-card);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

/* Drawing Container */
.creativedraw-container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.draw-prompt {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

.prompt-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.prompt-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-light);
}

.blind-description .description-text {
    font-style: italic;
    color: var(--accent);
}

/* Canvas Area */
.canvas-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.canvas-area {
    position: relative;
    background: white;
}

#creativedraw-canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
}

.previous-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
    opacity: 0.3;
}

.previous-image-overlay.masked-lower {
    clip-path: inset(0 0 50% 0);
    opacity: 1;
}

/* Drawing Tools */
.drawing-tools {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.color-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.color-btn:hover {
    transform: scale(1.15);
}

.color-btn.selected {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

.brush-tools {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.brush-btn {
    width: 50px;
    height: 50px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.brush-btn:hover {
    background: var(--bg-card-hover);
}

.brush-btn.selected {
    border-color: var(--primary);
    background: var(--primary);
}

.brush-preview {
    background: var(--text-primary);
    border-radius: 50%;
}

.brush-btn.selected .brush-preview {
    background: white;
}

.action-tools {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.tool-action-btn {
    padding: 10px 20px;
    background: var(--bg-input);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.tool-action-btn:hover {
    background: var(--bg-card-hover);
}

/* Description Input */
.description-input-area {
    margin-top: 20px;
    text-align: center;
}

.description-input-area label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.description-input-area .input {
    max-width: 400px;
    margin: 0 auto;
}

/* Submit Button */
.btn-submit-drawing {
    width: 100%;
    margin-top: 20px;
    padding: 16px;
    font-size: 1.1rem;
}

/* Waiting Screen */
.waiting-screen {
    text-align: center;
    padding: 60px 20px;
}

.waiting-animation {
    font-size: 4rem;
    animation: pulse 2s ease infinite;
}

.submission-preview {
    margin-top: 30px;
}

/* Caption Phase */
.caption-phase, .vote-phase {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.caption-header, .vote-header {
    text-align: center;
    margin-bottom: 20px;
}

.image-counter {
    display: inline-block;
    background: var(--bg-card);
    padding: 5px 15px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.caption-image-container, .vote-image-container {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.caption-image, .vote-image {
    width: 100%;
    height: auto;
    display: block;
}

.no-image {
    padding: 80px;
    text-align: center;
    font-size: 3rem;
    background: var(--bg-card);
}

.waiting-for-captions {
    text-align: center;
    padding: 30px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

.loading-dots span {
    animation: blink 1.4s infinite both;
    font-size: 2rem;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

/* Caption Input */
.caption-input-area {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-md);
}

.caption-input-area label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.caption-input {
    margin-bottom: 15px;
}

.caption-submitted {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    color: var(--success);
}

.check-mark {
    font-size: 1.5rem;
}

/* Voting */
.captions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.caption-vote-btn {
    width: 100%;
    padding: 20px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: all var(--transition-normal);
    position: relative;
}

.caption-vote-btn:hover:not(.disabled) {
    border-color: var(--primary);
    transform: translateX(5px);
}

.caption-vote-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.caption-vote-btn.voted {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.caption-text {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.your-caption-badge {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.no-captions {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}

.vote-info {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 15px;
    font-size: 0.9rem;
}

/* Vote Result */
.vote-result {
    text-align: center;
    padding: 20px;
}

.winner-caption {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin: 20px 0;
}

.winner-caption.has-winner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border: 2px solid var(--primary);
}

.winner-badge {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.winner-name {
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 5px;
}

.winner-text {
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 10px;
}

.winner-votes {
    color: var(--text-secondary);
}

.no-winner {
    color: var(--text-muted);
}

.all-captions-results {
    margin-top: 20px;
}

.caption-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.caption-result.winner {
    background: rgba(99, 102, 241, 0.2);
}

.caption-result .rank {
    font-weight: 700;
    width: 25px;
}

.caption-result .caption-author {
    font-weight: 500;
    min-width: 80px;
}

.caption-result .caption-text-small {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: left;
}

.caption-result .vote-count {
    font-weight: 600;
}

/* Chain Reveal */
.chain-reveal {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.chain-header {
    text-align: center;
    margin-bottom: 30px;
}

.chain-counter {
    display: inline-block;
    background: var(--primary);
    padding: 5px 15px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.chain-images {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
}

.chain-image-card {
    flex: 0 0 200px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.chain-image-card.animate-in {
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chain-image-wrapper {
    background: white;
}

.chain-image-wrapper img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.no-image-small {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--bg-input);
}

.chain-image-info {
    padding: 10px;
    text-align: center;
}

.round-badge {
    display: inline-block;
    background: var(--primary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    margin-bottom: 5px;
}

.creator-name {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Chain Vote */
.chain-vote {
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.chain-vote-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.chain-vote-btn {
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 15px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.chain-vote-btn:hover:not(.disabled) {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.chain-vote-btn.voted {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.chain-vote-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chain-preview {
    background: white;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 10px;
}

.chain-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.no-preview {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    font-size: 2rem;
}

.chain-starter {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Creative Draw Mode Select Modal */
.creativedraw-mode-select {
    text-align: center;
}

.creativedraw-mode-select h2 {
    margin-bottom: 10px;
}

.modal-subtitle {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.creativedraw-modes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.creativedraw-mode-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: all var(--transition-normal);
}

.creativedraw-mode-btn:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.creativedraw-mode-btn .mode-emoji {
    font-size: 2rem;
}

.creativedraw-mode-btn .mode-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.creativedraw-mode-btn .mode-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.creativedraw-mode-btn .mode-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Animations */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Responsive */
@media (max-width: 600px) {
    .mode-emoji-large {
        font-size: 3.5rem;
    }
    
    .mode-title-large {
        font-size: 1.8rem;
    }
    
    .chain-images {
        flex-direction: column;
        align-items: center;
    }
    
    .chain-image-card {
        flex: 0 0 auto;
        width: 100%;
        max-width: 250px;
    }
    
    .chain-vote-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   ACCOUNT / AUTH STYLES
   ========================================== */

/* Auth Form */
.auth-form {
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.3s ease;
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.auth-switch a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bg-card-hover);
}

.auth-divider span {
    padding: 0 15px;
    font-size: 0.9rem;
}

.input-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Account Banner */
.account-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 15px 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.account-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.account-avatar {
    font-size: 2.5rem;
}

.account-details {
    display: flex;
    flex-direction: column;
}

.account-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.account-stats-mini {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-account-menu {
    background: var(--bg-card-hover);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-account-menu:hover {
    background: var(--primary);
    transform: scale(1.1);
}

/* Account Card */
.account-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.account-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bg-card-hover);
}

.account-avatar-large {
    font-size: 4rem;
    background: var(--gradient-primary);
    padding: 15px;
    border-radius: var(--radius-lg);
}

.account-info-main h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.account-member-since {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Account Stats Grid */
.account-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-box {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 15px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Account Sections */
.account-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 20px;
    width: 100%;
}

.account-section h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.account-section .avatar-picker {
    margin-bottom: 15px;
}

.account-section .btn {
    margin-top: 10px;
}

/* Account Actions */
.account-actions {
    margin-top: 30px;
    width: 100%;
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Responsive Account */
@media (max-width: 500px) {
    .account-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .account-header {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
}

/* ==========================================
   QUIZ BATTLE STYLES
   ========================================== */

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

.quiz-category {
    font-size: 0.9rem;
    color: var(--primary-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.quiz-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    font-size: 1.5rem;
    font-weight: 700;
    animation: pulse 1s infinite;
}

.quiz-timer.warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
}

.quiz-timer.danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.quiz-question-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
}

.quiz-question-text {
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.quiz-answers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.quiz-answer-btn {
    padding: 20px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 15px;
}

.quiz-answer-btn:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.quiz-answer-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
}

.quiz-answer-btn.correct {
    background: var(--success);
    border-color: var(--success);
}

.quiz-answer-btn.wrong {
    background: var(--danger);
    border-color: var(--danger);
}

.quiz-answer-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.answer-letter {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.quiz-leaderboard {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.quiz-leaderboard h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quiz-player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    background: var(--bg-input);
    transition: all var(--transition-fast);
}

.quiz-player-row:first-child {
    background: var(--gradient-primary);
}

.quiz-player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quiz-rank {
    font-size: 1.2rem;
    font-weight: 700;
    width: 30px;
}

.quiz-player-avatar {
    font-size: 1.5rem;
}

.quiz-player-name {
    font-weight: 500;
}

.quiz-player-score {
    font-weight: 700;
    font-size: 1.1rem;
}

/* ==========================================
   STORY BUILDER STYLES
   ========================================== */

.story-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.story-theme {
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    padding: 20px 30px;
    text-align: center;
}

.story-theme-label {
    font-size: 0.85rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.story-theme-text {
    font-size: 1.4rem;
    font-weight: 700;
}

.story-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 25px;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.story-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    font-style: italic;
}

.story-sentence {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.story-sentence-avatar {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.story-sentence-content {
    flex: 1;
}

.story-sentence-author {
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 3px;
}

.story-sentence-text {
    line-height: 1.6;
}

.story-input-area {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.story-turn-info {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.story-turn-info.your-turn {
    color: var(--success);
}

.story-turn-info h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.story-input-wrapper {
    display: flex;
    gap: 10px;
}

.story-input {
    flex: 1;
    padding: 15px 20px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.story-input:focus {
    outline: none;
    border-color: var(--primary);
}

.story-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.story-voting {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 25px;
}

.story-voting h3 {
    text-align: center;
    margin-bottom: 20px;
}

.story-vote-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.story-vote-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.story-vote-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.story-vote-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
}

/* ==========================================
   VOICE CHAT STYLES (KOMPAKT)
   ========================================== */

/* Voice Toggle Button im Header - Host kann Voice an/aus machen */
.btn-voice-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: none; /* Nur Host sieht das */
}

.btn-voice-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: scale(1.05);
}

.btn-voice-toggle.active {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
}

/* Lobby Header mit Voice Button */
.lobby-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

/* Voice Panel Mini - erscheint wenn Voice aktiv */
.voice-panel-mini {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 1px solid var(--success);
    border-radius: var(--radius-lg);
    margin-bottom: 15px;
}

.voice-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--success);
}

.voice-btns {
    display: flex;
    gap: 10px;
}

.btn-voice-action {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-voice-action:hover {
    transform: scale(1.1);
}

.btn-voice-action.join {
    background: var(--success);
}

.btn-voice-action.mute {
    background: var(--warning);
}

.btn-voice-action.leave {
    background: var(--danger);
}

/* Responsive Quiz & Story */
@media (max-width: 600px) {
    .quiz-answers {
        grid-template-columns: 1fr;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .quiz-question-text {
        font-size: 1.2rem;
    }
    
    .story-input-wrapper {
        flex-direction: column;
    }
    
    .voice-chat-panel {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* Animation for score increase */
@keyframes scoreUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: var(--success); }
    100% { transform: scale(1); }
}

.score-animated {
    animation: scoreUp 0.5s ease;
}

