/* ====================================================
   Adevăr sau Provocare - 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(var(--primary-rgb, 99,102,241), 0.15);
    color: var(--primary, #6366f1);
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.phase-badge { background: rgba(255,255,255,0.07); color: var(--text-muted, #aaa); }

/* ---- 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(var(--primary-rgb,99,102,241),0.25);
    border-top-color: var(--primary, #6366f1);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Lobby ---- */
.lobby-container { max-width: 960px;   }
.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: var(--primary, #6366f1);
    box-shadow: 0 8px 32px rgba(var(--primary-rgb,99,102,241), 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-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; }

/* ---- Waiting Room ---- */
.room-container { max-width: 600px;   }
.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(var(--primary-rgb,99,102,241), 0.12);
    border: 1px solid rgba(var(--primary-rgb,99,102,241), 0.25);
    font-size: 0.9rem; font-weight: 600;
}

/* ---- Game View ---- */
/* Redundant .game-container removed to use global style from style.css */

/* Ensure no gaps in main containers */
.game-tab-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* Hot Seat Card */
.hot-seat-card {
    text-align: center;
    padding: 1.5rem 1.25rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(168,85,247,0.18));
    border: 1.5px solid rgba(var(--primary-rgb,99,102,241), 0.35);
    margin-bottom: 1rem;
    animation: fadeInUp 0.4s ease;
    margin-top: 0.5rem;
}
.hot-seat-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #6366f1), #a855f7);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 900; color: #fff;
    margin: 0 auto 1rem;
    box-shadow: 0 0 30px rgba(99,102,241,0.4);
    animation: pulse 2s ease-in-out infinite;
}
.hot-seat-label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted,#aaa); margin-bottom: 0.4rem; }
.hot-seat-name { font-size: 1.8rem; font-weight: 900; color: var(--primary, #6366f1); margin: 0; }

/* Choice Buttons */
.choice-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}
.choice-btn {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.6rem;
    padding: 1.5rem 1rem;
    border-radius: 16px;
    border: 2px solid transparent;
    font-size: 1rem; font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    color: #fff;
}
.choice-btn .choice-icon { font-size: 2rem; }
.choice-btn.truth {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: rgba(59,130,246,0.5);
}
.choice-btn.dare {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: rgba(239,68,68,0.5);
}
.choice-btn:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 12px 36px rgba(0,0,0,0.3); }
.choice-btn:active { transform: scale(0.97); }
.choice-btn::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}

/* Reveal Card */
.reveal-card {
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    animation: fadeInUp 0.5s ease;
    margin-bottom: 1.5rem;
}
.reveal-card.truth-reveal {
    background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(29,78,216,0.15));
    border: 1.5px solid rgba(59,130,246,0.35);
}
.reveal-card.dare-reveal {
    background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(220,38,38,0.15));
    border: 1.5px solid rgba(239,68,68,0.35);
}
.reveal-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.reveal-tag {
    display: inline-block;
    font-size: 0.72rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.12em;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}
.reveal-tag.truth { background: rgba(59,130,246,0.25); color: #93c5fd; }
.reveal-tag.dare { background: rgba(239,68,68,0.25); color: #fca5a5; }
.reveal-message { font-size: 1.15rem; font-weight: 700; line-height: 1.5; color: var(--text-main); margin: 0; }
.reveal-sub { font-size: 0.9rem; color: var(--text-muted, #aaa); margin: 0.5rem 0 0; }

/* Spectator Info */
.spectator-info {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted, #aaa);
}

/* Ready Button Area */
.ready-area { text-align: center; margin-top: 1.5rem; }
.ready-count { font-size: 0.85rem; color: var(--text-muted,#aaa); margin-bottom: 0.75rem; }
.continue-btn {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.9rem 2.5rem;
    border-radius: 12px;
    font-size: 1.05rem; font-weight: 800;
    background: linear-gradient(135deg, var(--primary,#6366f1), #a855f7);
    color: #fff;
    border: none; cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 24px rgba(99,102,241,0.35);
}
.continue-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(99,102,241,0.5); }
.continue-btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.continue-btn .btn-counter {
    font-size: 0.78rem; opacity: 0.8;
    background: rgba(255,255,255,0.2);
    padding: 0.1rem 0.45rem;
    border-radius: 8px;
}

/* Waiting State */
.waiting-state {
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
    padding: 2rem;
    color: var(--text-muted, #aaa);
}
.waiting-spinner { font-size: 2.5rem; animation: spin 2s linear infinite; }

/* Round Progress */
.round-progress-bar {
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.round-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary,#6366f1), #a855f7);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Finished / Results */
.results-container { max-width: 640px;   }
.results-header { text-align: center; margin-bottom: 2rem; }
.results-history { display: flex; flex-direction: column; gap: 0.75rem; max-height: 60vh; overflow-y: auto; padding-right: 0.25rem; }
.history-item {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    transition: background 0.2s;
    font-size: 0.88rem;
}
.history-item:hover { background: rgba(255,255,255,0.07); }
.history-round {
    min-width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb,99,102,241), 0.18);
    color: var(--primary,#6366f1);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.82rem;
    flex-shrink: 0;
}
.history-truth .history-round { background: rgba(59,130,246,0.2); color: #93c5fd; }
.history-dare .history-round { background: rgba(239,68,68,0.2); color: #fca5a5; }
.history-content { flex: 1; }
.history-player { font-weight: 700; color: var(--text-main); margin-bottom: 0.2rem; }
.history-detail { color: var(--text-muted,#aaa); line-height: 1.4; }
.history-badge {
    font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
    padding: 0.1rem 0.5rem; border-radius: 999px;
    margin-left: 0.4rem;
}
.history-badge.truth { background: rgba(59,130,246,0.2); color: #93c5fd; }
.history-badge.dare { background: rgba(239,68,68,0.2); color: #fca5a5; }

/* Fade animations */
/* Emoji Bar styles moved to global style.css */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp 0.4s ease; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 24px rgba(99,102,241,0.4); }
    50% { box-shadow: 0 0 48px rgba(99,102,241,0.7); }
}

/* 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;
    transition: opacity 0.3s, transform 0.3s;
    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(99,102,241,0.85); border: 1px solid rgba(99,102,241,0.4); }
.toast-success { background: rgba(16,185,129,0.85); border: 1px solid rgba(16,185,129,0.4); }

/* Mobile tweaks */
@media (max-width: 480px) {
    .choice-buttons { gap: 0.75rem; }
    .choice-btn { padding: 1.2rem 0.75rem; }
    .hot-seat-name { font-size: 1.5rem; }
    .reveal-message { font-size: 1rem; }
    .lobby-container, .room-container, .game-container, .results-container {  }
}

/* Allow scrolling */
@media (pointer: coarse) {
    html, body { overscroll-behavior: auto; }
}

/* Ensure space for bottom emoji bar and system icons */
.game-container-inner {
    padding-bottom: 140px; /* Increased for mobile safety */
}

