:root {
    --bg-dark: #000222;
    --blue-neon: #0051ff;
    --gold: #f6a821;
    --gold-hover: #ffca4a;
    --correct: #10b981;
    --wrong: #ef4444;
    --text-main: #ffffff;
    --box-bg: rgba(0, 10, 50, 0.8);
    
    /* Player Colors */
    --color-a: #e21b3c; /* Red */
    --color-b: #1368ce; /* Blue */
    --color-c: #d89e00; /* Yellow */
    --color-d: #26890c; /* Green */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at center, #001555 0%, #000222 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ============================
   HOST STYLES (PROJECTOR)
   ============================ */

.host-container {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.view {
    display: none;
    width: 100%;
    max-width: 1200px;
    flex-direction: column;
    align-items: center;
}

.view.active {
    display: flex;
}

/* Lobby */
.lobby-box {
    background: var(--box-bg);
    border: 3px solid var(--blue-neon);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 81, 255, 0.4);
    margin-top: 2rem;
    width: 100%;
}

.room-code-display {
    font-size: 5rem;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 5px;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(246, 168, 33, 0.5);
}

.qr-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: inline-block;
    margin: 20px 0;
}

.players-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.player-badge { background: rgba(255, 255, 255, 0.1); border: 1px solid var(--blue-neon); padding: 5px 12px; border-radius: 20px; font-size: 0.9rem; font-weight: bold; animation: popIn 0.3s ease; }

@keyframes popIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* Game Board */
.game-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--box-bg);
    border: 2px solid var(--blue-neon);
    border-radius: 10px;
    padding: 15px 30px;
    margin-bottom: 30px;
}

.question-box {
    background: linear-gradient(180deg, #001244 0%, #000511 100%);
    border: 2px solid var(--blue-neon);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
    box-shadow: inset 0 0 20px rgba(0, 81, 255, 0.2);
}

.question-box p {
    font-size: 2rem;
    font-weight: bold;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.host-option {
    border: 2px solid #555;
    padding: 20px;
    border-radius: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.6);
}

.host-option .shape {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin-right: 15px;
    border-radius: 5px;
}

.host-option.opt-0 { border-color: var(--color-a); }
.host-option.opt-0 .shape { background: var(--color-a); }

.host-option.opt-1 { border-color: var(--color-b); }
.host-option.opt-1 .shape { background: var(--color-b); clip-path: polygon(50% 0%, 100% 100%, 0% 100%); border-radius: 0; }

.host-option.opt-2 { border-color: var(--color-c); }
.host-option.opt-2 .shape { background: var(--color-c); border-radius: 50%; }

.host-option.opt-3 { border-color: var(--color-d); }
.host-option.opt-3 .shape { background: var(--color-d); clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); border-radius: 0; }

.host-option.correct-reveal {
    background: var(--correct);
    border-color: #fff;
    animation: flash 1s infinite alternate;
}

/* ============================
   PLAYER STYLES (MOBILE)
   ============================ */

.player-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.mobile-view {
    display: none;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.mobile-view.active {
    display: flex;
}

.join-box {
    background: var(--box-bg);
    padding: 30px;
    border-radius: 15px;
    width: 100%;
    max-width: 400px;
    border: 2px solid var(--gold);
}

.join-box input {
    width: 100%;
    padding: 15px;
    margin: 10px 0 20px;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
}

/* Mobile Buttons Grid */
.mobile-buttons { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; width: 100%; height: 100%; min-height: 60vh; max-height: 80vh; padding: 10px; }

.color-btn {
    border: none;
    border-radius: 15px;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.color-btn:active {
    transform: scale(0.95);
}

.color-btn[data-index="0"] { background: var(--color-a); }
.color-btn[data-index="1"] { background: var(--color-b); }
.color-btn[data-index="2"] { background: var(--color-c); }
.color-btn[data-index="3"] { background: var(--color-d); }

.feedback-screen {
    font-size: 2rem;
    font-weight: bold;
}

.feedback-screen.correct { background: var(--correct); color: white; }
.feedback-screen.wrong { background: var(--wrong); color: white; }

/* Generics */
.btn-primary {
    background: var(--gold);
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--gold-hover);
    transform: scale(1.05);
}

.timer-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--box-bg);
    border: 4px solid var(--gold);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
}
