/* Career Camp Quiz — Innovative Academy brand: navy + coral */
:root {
    --navy: #1b2a52;
    --navy-deep: #121d3b;
    --navy-light: #2c3f73;
    --coral: #ff6f61;
    --coral-dark: #e5584a;
    --cream: #fff7f2;
    --gold: #ffb84c;
    --teal: #2ec4b6;
    --blue: #4c7ef3;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-light) 100%);
    color: var(--white);
    min-height: 100vh;
}

.wrap {
    max-width: 520px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    text-align: center;
}
.wrap.wide { max-width: 960px; }

.logo {
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--coral);
    font-weight: 700;
    margin-bottom: 4px;
}
.logo-img {
    max-width: 210px;
    height: auto;
    margin-bottom: 10px;
    /* IA logo is coral line-art; keep it readable on navy */
    filter: drop-shadow(0 1px 4px rgba(0,0,0,.35));
}
h1 { font-size: 30px; margin-bottom: 20px; }
h2 { font-size: 22px; margin-bottom: 14px; }

.card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 18px;
}

input[type=text], input[type=password], input[type=tel] {
    width: 100%;
    padding: 14px 16px;
    font-size: 20px;
    border: none;
    border-radius: 10px;
    margin-bottom: 12px;
    text-align: center;
    background: var(--white);
    color: var(--navy);
}
input::placeholder { color: #9aa3b8; }

.btn {
    display: inline-block;
    width: 100%;
    padding: 15px 20px;
    font-size: 19px;
    font-weight: 700;
    color: var(--white);
    background: var(--coral);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform .08s, background .15s;
}
.btn:hover { background: var(--coral-dark); }
.btn:active { transform: scale(.97); }
.btn.secondary { background: var(--navy-light); border: 1px solid rgba(255,255,255,.25); }
.btn.secondary:hover { background: #3a5090; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.error {
    background: rgba(229, 88, 74, .2);
    border: 1px solid var(--coral);
    color: #ffd9d4;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    display: none;
}

.pin-display {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: 10px;
    color: var(--gold);
    margin: 8px 0 4px;
}

.muted { color: rgba(255,255,255,.65); font-size: 15px; }

.qr {
    display: block;
    width: 190px;
    height: 190px;
    background: var(--white);
    padding: 10px;
    border-radius: 14px;
    margin: 14px auto 6px;
}

/* ---- Answer grid (player + host) ---- */
.answers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}
.answer-btn {
    padding: 20px 12px;
    min-height: 92px;
    font-size: 17px;
    font-weight: 700;
    color: var(--white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform .08s, opacity .15s;
}
.answer-btn:active { transform: scale(.96); }
.answer-btn .shape { font-size: 24px; }
.answer-btn.c0 { background: var(--coral); }
.answer-btn.c1 { background: var(--blue); }
.answer-btn.c2 { background: var(--gold); color: var(--navy-deep); }
.answer-btn.c3 { background: var(--teal); }
.answer-btn.dim { opacity: .25; }
.answer-btn.correct-ring { outline: 4px solid var(--white); }

/* ---- Timer bar ---- */
.timer-bar {
    height: 10px;
    border-radius: 5px;
    background: rgba(255,255,255,.15);
    overflow: hidden;
    margin: 14px 0;
}
.timer-fill {
    height: 100%;
    background: var(--gold);
    border-radius: 5px;
    transition: width 1s linear;
}
.timer-num { font-size: 34px; font-weight: 800; color: var(--gold); }

/* ---- Leaderboard ---- */
.board { list-style: none; text-align: left; }
.board li {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 8px;
    font-size: 17px;
}
.board .rank { font-weight: 800; color: var(--gold); width: 28px; }
.board .score { margin-left: auto; font-weight: 700; color: var(--coral); }
.board li.me { border: 2px solid var(--coral); }
.board li.top1 { background: rgba(255,184,76,.25); }

.badge {
    display: inline-block;
    background: var(--navy-light);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 10px;
}

.big-points { font-size: 44px; font-weight: 800; color: var(--gold); }
.result-flag { font-size: 26px; font-weight: 800; margin: 8px 0; }
.result-flag.good { color: var(--teal); }
.result-flag.bad { color: var(--coral); }

/* ---- Host layout ---- */
.host-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; text-align: left; }
@media (max-width: 720px) { .host-grid { grid-template-columns: 1fr; } }

.player-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.chip {
    background: var(--navy-light);
    border-radius: 20px;
    padding: 7px 16px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,.2);
}
.chip.offline { opacity: .4; }

.kick-x {
    background: none;
    border: none;
    color: var(--coral);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 50%;
    vertical-align: middle;
}
.kick-x:hover { background: var(--coral-dark); color: var(--white); }
.board .kick-x { margin-left: 6px; opacity: .7; }

.count-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.count-bar { flex: 1; height: 22px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; }
.count-fill { height: 100%; border-radius: 6px; min-width: 2px; transition: width .4s; }
.count-num { width: 30px; text-align: right; font-weight: 700; }

.controls { display: flex; flex-direction: column; gap: 10px; }

.podium { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 24px 0; }
.podium .col { text-align: center; flex: 1; max-width: 150px; }
.podium .block {
    background: var(--navy-light);
    border-radius: 10px 10px 0 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; font-weight: 800; color: var(--gold);
}
.podium .p1 .block { height: 120px; background: var(--coral); color: var(--white); }
.podium .p2 .block { height: 85px; }
.podium .p3 .block { height: 60px; }
.podium .pname { font-weight: 700; margin-top: 8px; }
.podium .pscore { color: var(--gold); font-weight: 700; }
