
/* ============================================
   Intrusul Phase Management
   ============================================ */
.game-layout-intrusul .phase-area {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

/* Show only the active phase area */
.game-layout-intrusul[data-phase="playing"] #v-playing,
.game-layout-intrusul[data-phase="voting"] #v-voting,
.game-layout-intrusul[data-phase="stiu"] #v-stiu,
.game-layout-intrusul[data-phase="spy_guessing"] #v-spy_guessing {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-stiu {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    font-size: 1.4rem;
    padding: 1rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.btn-stiu:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.4);
}

.guess-highlight {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    margin: 1.5rem 0;
    text-transform: uppercase;
    text-shadow: 0 0 20px var(--primary-glow);
}

/* Responsive Centering for Wide Screens */
.game-container {
    width: 100%;
    
    
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-layout-intrusul {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
    align-items: flex-start;
}

.game-sidebar-left {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-content-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 400px;
}

.role-reveal-container {
    width: 240px !important;
    height: 320px !important;
    margin: 0 !important;
}

/* Scoreboard */
.scoreboard-container {
    width: 100%;
    margin: 0 !important;
}

.scoreboard-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.grid-scoreboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.scoreboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255,255,255,0.03);
    border-radius: 1rem;
    border: 1px solid transparent;
}

.scoreboard-item.me {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.scoreboard-item .rank {
    width: 28px;
    height: 28px;
    background: var(--primary-gradient);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.scoreboard-item .name {
    flex: 1;
    font-weight: 600;
}

.scoreboard-item .score {
    font-weight: 900;
    color: var(--primary);
}

/* Modal centering and refinement */
#stiu-phase-overlay {
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow-y: auto;
}

#stiu-phase-overlay:not(.hidden) {
    animation: modalFadeIn 0.3s ease-out;
}

/* Stilurile globale din style.css se ocupa acum de modal-content */

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalScaleIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Instructions Grid */
.intrusul-instructions {
    padding: 2rem;
    margin-top: 1rem;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.instr-col h4 {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.instr-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instr-col li {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .game-layout-intrusul {
        flex-direction: column;
        align-items: center;
    }
    
    .game-sidebar-left {
        flex: none;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .game-content-main {
        width: 100%;
        min-width: unset;
    }
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    background: rgba(255,255,255,0.05);
    border-radius: 1rem;
    margin-bottom: 0.75rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.rank-pos {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.rank-name {
    flex: 1;
    text-align: left;
    font-weight: 500;
}

.rank-score {
    font-weight: bold;
    color: var(--primary);
}

/* Rounds Selector */
.rounds-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.round-card {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.round-card span {
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    opacity: 0.6;
    margin-top: 0.25rem;
}

.round-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-5px);
}

.round-card.active {
    background: var(--primary-gradient);
    border-color: var(--primary);
    box-shadow: 0 10px 30px var(--primary-glow);
    color: white;
}

.round-card.active span {
    color: white;
    opacity: 0.9;
}

/* Responsive button text fix */
@media (max-width: 400px) {
    #stiu-phase-overlay .btn {
        font-size: 0.85rem;
        padding: 0.8rem 0.5rem;
        white-space: normal !important;
        line-height: 1.2;
        min-height: 50px;
    }
}

