/* ====================================================
   Actori de Ocazie - Game Styles
   ==================================================== */

:root {
    --primary: #8b5cf6;
    --primary-rgb: 139, 92, 246;
    --accent: #f59e0b;
    --accent-rgb: 245, 158, 11;
}

.game-theme-actori {
    --primary: #8b5cf6;
    --primary-rgb: 139, 92, 246;
    --accent: #f59e0b;
    --accent-rgb: 245, 158, 11;
}

/* ---- 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), 0.15);
    color: var(--primary);
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.phase-badge { background: rgba(255,255,255,0.07); color: var(--text-muted, #aaa); }

/* ---- Tabs Header ---- */
.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(var(--primary-rgb), 0.15);
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 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(var(--primary-rgb), 0.25);
    border-top-color: var(--primary);
    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: var(--primary); box-shadow: 0 8px 32px rgba(var(--primary-rgb), 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(var(--primary-rgb), 0.2); color: #a78bfa; }
.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 ---- */
.actor-icon {
    font-size: 4rem; display: block; text-align: center; margin-bottom: 0.5rem; color: var(--accent);
    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(var(--primary-rgb), 0.12); border: 1px solid rgba(var(--primary-rgb), 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, var(--primary), var(--accent)); 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(var(--primary-rgb), 0.15); color: #a78bfa; border: 1px solid rgba(var(--primary-rgb), 0.3); }
.phase-banner.voting { background: rgba(var(--accent-rgb), 0.15); color: var(--accent); border: 1px solid rgba(var(--accent-rgb), 0.3); }

/* Pitching UI */
.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: var(--primary);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(124, 58, 237, 0.05));
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.2);
}
.product-cards {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.word-card {
    background: #1e293b;
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 1.25rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
    flex: 1;
    max-width: 280px;
    line-height: 1.3;
    position: relative;
}
.word-card::before {
    content: attr(data-label);
    position: absolute;
    top: -10px; left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.word-card-back {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px dashed rgba(var(--primary-rgb), 0.4);
    border-radius: 16px;
    padding: 1.5rem;
    font-size: 2rem;
    color: rgba(var(--primary-rgb), 0.3);
    display: flex; align-items: center; justify-content: center;
    min-width: 140px;
    min-height: 120px;
    flex: 1;
}

.product-cards-placeholder {
    margin-bottom: 2rem; 
    background: rgba(255,255,255,0.03); 
    border: 2px dashed rgba(255,255,255,0.1); 
    border-radius: 20px; 
    padding: 1.5rem; 
    display: flex; 
    gap: 1rem; 
    justify-content: center;
}

/* Modal specific overrides */
#pitch-modal .modal-content {
    max-width: 900px !important;
}

.modal-pitch-title {
    margin-bottom: 1.5rem;
    color: var(--accent);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.8rem;
}

.btn-finish-scene, .btn-start-scene {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 16px;
    margin-top: 1rem;
}

.actor-icon-large {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: floatIcon 3s infinite;
}

@media (max-width: 600px) {
    .product-cards, .product-cards-placeholder {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    .word-card, .word-card-back {
        width: 100%;
        max-width: 100%;
        min-height: 60px;
        padding: 0 1rem 0.5rem;
        font-size: 1rem;
        flex: none;
    }
    .word-card::before {
        top: -8px;
        font-size: 0.55rem;
    }
    .modal-pitch-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    .timer-circle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    #pitch-modal .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

.timer-circle {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
    border: 4px solid var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 800; color: #fff;
    margin: 0 auto 1.5rem;
}
.timer-circle.urgent { border-color: #ef4444; color: #ef4444; animation: pulseUrgent 1s infinite; }
@keyframes pulseUrgent { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* Voting Grid */
.vote-instruction { text-align: center; font-size: 0.9rem; color: var(--text-muted, #aaa); margin: 0 0 1rem; }
.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: var(--accent); background: rgba(var(--accent-rgb), 0.12); box-shadow: 0 8px 24px rgba(var(--accent-rgb),0.2);
}
.vote-player-btn.voted { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.18); box-shadow: 0 4px 20px rgba(var(--accent-rgb),0.3); }
.vote-player-btn:disabled:not(.voted) { opacity: 0.4; cursor: default; }

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

/* Results Reveal */
.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;}
.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; }

.fade-in { animation: fadeInUp 0.4s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.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(var(--primary-rgb), 0.85); border: 1px solid rgba(var(--primary-rgb), 0.4); }
