/* ====================================================
   Fa-mă să râd – Game Styles
   ==================================================== */

/* ---- Status Bar ---- */
.status-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.5rem;
    background: rgba(var(--card-bg-rgb, 20, 20, 40), 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
    gap: 1rem;
}
.status-bar.hidden { display: none; }
.room-pill, .timer-pill, .phase-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.phase-badge { background: rgba(255,255,255,0.07); color: var(--text-muted, #aaa); }

/* ---- Tabs ---- */
.game-tabs-header {
    position: sticky;
    top: 45px;
    z-index: 90;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1rem 0.5rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    margin: 0 auto 0.5rem auto;
    overflow-x: auto;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.game-tabs-header.hidden { display: none; }
.game-tab-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 0.75rem 1.25rem;
    color: var(--text-muted, #aaa);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.game-tab-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }
.game-tab-btn.active {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}
.game-tab-content { animation: fadeInUp 0.3s ease; }
.game-tab-content.hidden { display: none; }

/* ---- Loader ---- */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 1rem;
    color: var(--text-muted, #aaa);
}
.premium-loader {
    width: 48px; height: 48px;
    border: 4px solid rgba(245,158,11,0.25);
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Lobby & General ---- */
.lobby-container, .room-container, .game-container, .results-container {
    max-width: 960px;   width: 100%;
}
.lobby-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.lobby-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));  margin-bottom: 2rem; }
.room-card {
    background: var(--card-bg, rgba(255,255,255,0.05));
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 16px;
    
    cursor: pointer;
    transition: all 0.25s ease;
}
.room-card:hover { transform: translateY(-3px); border-color: #f59e0b; box-shadow: 0 8px 32px rgba(245,158,11,0.2); }
.room-card h3 { margin: 0 0 0.75rem; font-size: 1.1rem; }
.room-info { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.badge { font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-primary { background: rgba(245,158,11,0.2); color: #fbbf24; }
.badge-waiting { background: rgba(99,102,241,0.2); color: #818cf8; }
.badge-playing { background: rgba(16,185,129,0.2); color: #34d399; }
.room-stat { font-size: 0.8rem; color: var(--text-muted, #aaa); display: flex; align-items: center; gap: 0.3rem; }

/* ---- Room Waiting ---- */
.comedy-icon {
    font-size: 4rem; display: block; text-align: center; margin-bottom: 0.5rem;
    animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.player-list-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin: 1.25rem 0; }
.player-pill {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.45rem 1rem; border-radius: 999px;
    background: rgba(245,158,11, 0.12); border: 1px solid rgba(245,158,11, 0.25);
    font-size: 0.9rem; font-weight: 600;
}
.room-info-box { display: inline-flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; }

/* View container logic moved to global style.css */

/* ---- Game Play Styles ---- */
.round-progress-bar {
    height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; margin-bottom: 1.5rem; overflow: hidden;
}
.round-progress-fill {
    height: 100%; background: linear-gradient(90deg, #f59e0b, #fbbf24); border-radius: 2px; transition: width 0.5s ease;
}

.phase-center { text-align: center; margin-bottom: 1rem; }
.phase-banner {
    display: inline-block; padding: 0.4rem 1rem; border-radius: 999px; font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.phase-banner.pitching { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.phase-banner.voting { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }

/* ---- Pitch Card (main game view) ---- */
.pitch-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.pitch-card.active {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(217,119,6,0.05));
    box-shadow: 0 0 30px rgba(245,158,11,0.15);
}
.pitch-card.performer {
    border-color: #a855f7;
    background: linear-gradient(135deg, rgba(168,85,247,0.1), rgba(109,40,217,0.05));
    box-shadow: 0 0 30px rgba(168,85,247,0.2);
}

/* Question Card */
.question-card {
    background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(239,68,68,0.08));
    border: 2px solid rgba(245,158,11,0.35);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    margin: 1.25rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25), 0 0 40px rgba(245,158,11,0.1);
    position: relative;
}
.question-card::before {
    content: '❓';
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}
@media (max-width: 600px) {
    .question-card { font-size: 1rem; padding: 1rem 1.25rem; }
}

/* ---- Timer ---- */
.timer-circle {
    width: 84px; height: 84px;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
    border: 4px solid #f59e0b;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 800; color: #fff;
    margin: 0 auto 1.5rem;
    transition: border-color 0.3s ease, color 0.3s ease;
}
.timer-circle.urgent { border-color: #ef4444; color: #ef4444; animation: pulseUrgent 0.8s infinite; }
.timer-circle.hesitation-zone { border-color: #a855f7; color: #a855f7; }
@keyframes pulseUrgent { 0%, 100% { transform: scale(1); box-shadow: none; } 50% { transform: scale(1.08); box-shadow: 0 0 20px rgba(239,68,68,0.5); } }

/* ---- Interaction Buttons (Am râs / A ezitat) ---- */
.interaction-bar {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.btn-laugh {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 16px;
    padding: 1rem 1.75rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(16,185,129,0.35);
    flex: 1;
    min-width: 140px;
    justify-content: center;
}
.btn-laugh:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 30px rgba(16,185,129,0.5);
}
.btn-laugh.used {
    background: rgba(16,185,129,0.2);
    border: 2px solid rgba(16,185,129,0.4);
    box-shadow: none;
    opacity: 0.65;
    cursor: default;
}
.btn-laugh:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-hesitate {
    background: rgba(239,68,68,0.12);
    border: 2px solid rgba(239,68,68,0.3);
    border-radius: 16px;
    padding: 1rem 1.75rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 140px;
    justify-content: center;
    opacity: 0.4;
    pointer-events: none;
}
.btn-hesitate.active {
    opacity: 1;
    pointer-events: auto;
    box-shadow: 0 4px 20px rgba(239,68,68,0.25);
    animation: hesitateGlow 2s infinite;
}
.btn-hesitate.active:hover {
    background: rgba(239,68,68,0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(239,68,68,0.4);
}
@keyframes hesitateGlow { 0%, 100% { box-shadow: 0 4px 20px rgba(239,68,68,0.25); } 50% { box-shadow: 0 4px 30px rgba(239,68,68,0.5); } }

/* Laugh count badge */
.laugh-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #34d399;
    margin-top: 1rem;
}

/* Floating score animation */
.floating-score {
    position: absolute;
    font-size: 1.5rem;
    font-weight: 900;
    color: #10b981;
    pointer-events: none;
    animation: floatUp 1.2s ease forwards;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 100;
}
.floating-score.hesitate-penalty { color: #ef4444; }
@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    60% { opacity: 1; transform: translateY(-40px) scale(1.2); }
    100% { opacity: 0; transform: translateY(-70px) scale(0.9); }
}

/* Performer banner */
.performer-banner {
    display: flex; align-items: center; gap: 0.75rem; justify-content: center;
    font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem;
    color: #fbbf24;
}
.performer-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 900; color: #fff;
    box-shadow: 0 3px 12px rgba(245,158,11,0.35);
    flex-shrink: 0;
}

/* ---- Pitch Modal (performer start) ---- */
.fmsr-performer-modal {
    border: 2px solid rgba(168,85,247,0.4);
    background: linear-gradient(135deg, rgba(168,85,247,0.1), rgba(109,40,217,0.05));
    text-align: center;
}

/* ---- Voting ---- */
.vote-instruction { text-align: center; font-size: 0.95rem; color: var(--text-muted, #aaa); margin: 0 0 1.25rem; }
.vote-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.vote-player-btn {
    width: 140px;
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    padding: 1rem 0.5rem; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,255,255,0.08);
    cursor: pointer; transition: all 0.2s ease; color: var(--text-main); font-size: 0.85rem; font-weight: 700;
}
.vote-player-btn:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.02); border-color: #f59e0b; background: rgba(245,158,11, 0.12); box-shadow: 0 8px 24px rgba(245,158,11,0.2);
}
.vote-player-btn.voted { border-color: #f59e0b; background: rgba(245,158,11, 0.18); box-shadow: 0 4px 20px rgba(245,158,11,0.3); }
.vote-player-btn:disabled:not(.voted) { opacity: 0.4; cursor: default; }

.vote-avatar {
    width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 900; color: #fff;
    box-shadow: 0 3px 8px rgba(245,158,11,0.25);
}
.vote-player-btn:hover:not(:disabled) .vote-avatar { background: linear-gradient(135deg, #10b981, #059669); }
.vote-player-btn.voted .vote-avatar { background: linear-gradient(135deg, #a855f7, #7c3aed); }

/* ---- Reveal Modal ---- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(8px);
    z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fadeInBg 0.3s ease;
    overflow-y: auto;
}
.modal-overlay.hidden { display: none; }
@keyframes fadeInBg { from { opacity: 0; } to { opacity: 1; } }

.reveal-row {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background: rgba(255,255,255,0.05); border-radius: 12px; margin-bottom: 0.5rem;
}
.reveal-rank { width: 30px; height: 30px; border-radius: 50%; background: #333; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.9rem; }
.reveal-rank.gold { background: linear-gradient(135deg, #fef08a, #eab308); color: #000; }
.reveal-rank.silver { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #000; }
.reveal-rank.bronze { background: linear-gradient(135deg, #fdba74, #ea580c); color: #fff; }

/* ---- Emoji bar ---- */
#game-emoji-bar {
    position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 2000; width: 100%; max-width: 500px; padding: 0 1rem; pointer-events: none;
}
#game-emoji-bar .emoji-reactions-bar {
    pointer-events: auto; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 2rem; padding: 0.5rem 1rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* ---- Hesitation Warning Overlay Text ---- */
.hesitation-alert {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(168,85,247,0.15);
    border: 1px solid rgba(168,85,247,0.4);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #a855f7;
    margin-top: 0.75rem;
    animation: pulseHes 1.5s infinite;
}
@keyframes pulseHes { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ---- Utils ---- */
.fade-in { animation: fadeInUp 0.4s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ---- Toast ---- */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { padding: 0.75rem 1.25rem; border-radius: 12px; font-size: 0.9rem; font-weight: 600; color: #fff; backdrop-filter: blur(12px); animation: fadeInUp 0.3s ease; box-shadow: 0 4px 24px rgba(0,0,0,0.3); }
.toast-error { background: rgba(239,68,68,0.85); border: 1px solid rgba(239,68,68,0.5); }
.toast-info { background: rgba(245,158,11,0.85); border: 1px solid rgba(245,158,11,0.4); }
