* { box-sizing: border-box; }

.splash-overlay {
    position: fixed;
    inset: 0;
    background: #2a1a5e;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    animation: splash-fade-in .2s ease-out;
}
.splash-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
@keyframes splash-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: linear-gradient(160deg, #6C63FF 0%, #FF6584 100%);
    min-height: 100vh;
    color: #222;
}

.wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
}

.center-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.logo {
    font-size: 2.4rem;
    color: #fff;
    margin: 0 0 4px;
    text-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.logo-small { color: #fff; font-weight: bold; font-size: 1.2rem; }

.tagline { color: #fff; opacity: .9; margin-top: 0; }

.lang-switch { margin: 12px 0 24px; }
.lang-switch a {
    color: #fff;
    text-decoration: none;
    margin: 0 6px;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.5);
}
.lang-switch a.active { background: #fff; color: #6C63FF; font-weight: bold; }

.button-stack { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 300px; }

.card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}
.card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.card input, .card select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.btn {
    display: inline-block;
    text-align: center;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary { background: #fff; color: #6C63FF; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.6); }
.btn-link { background: none; border: none; color: #6C63FF; text-decoration: underline; cursor: pointer; font-size: .85rem; }

.game-code {
    font-size: 2.6rem;
    font-weight: bold;
    letter-spacing: .3rem;
    color: #fff;
    background: rgba(255,255,255,.15);
    border-radius: 12px;
    padding: 8px 24px;
    margin: 8px 0;
}

.qrcode { background: #fff; padding: 12px; border-radius: 12px; margin: 12px 0; }
.join-hint { color: #fff; font-size: .85rem; word-break: break-all; }
.join-hint a { color: #fff; }

.player-list { list-style: none; padding: 0; margin: 8px 0 20px; width: 100%; max-width: 300px; }
.player-list li {
    background: rgba(255,255,255,.9);
    border-radius: 10px;
    padding: 10px 14px;
    margin: 6px 0;
    font-weight: 600;
    text-align: left;
}

h3 { color: #fff; margin-bottom: 4px; }
.min-note { font-size: .75rem; font-weight: normal; opacity: .8; }
.hint { color: #fff; opacity: .9; }
.error { color: #ffe1e1; font-weight: bold; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mini-scoreboard { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.chip {
    background: rgba(255,255,255,.85);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: .8rem;
    font-weight: 600;
}

.game-area {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    text-align: center;
}

.question { font-size: 1.3rem; font-weight: bold; margin-bottom: 16px; }
.guess-lead { margin-bottom: 12px; }

.option-grid { display: flex; flex-direction: column; gap: 10px; }
.btn-option {
    background: #f2f2fb;
    border: 2px solid #6C63FF;
    color: #333;
    padding: 12px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}
.btn-option:active { background: #6C63FF; color: #fff; }
.btn-option:disabled { opacity: .5; cursor: not-allowed; }

.or-divider { margin: 16px 0 8px; font-size: .85rem; color: #777; }

#custom-answer {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
    margin-bottom: 10px;
}

.timer { margin-top: 16px; font-weight: bold; color: #FF6584; font-size: 1.1rem; }

.results-list { list-style: none; padding: 0; text-align: left; }
.results-list li { padding: 8px 10px; border-radius: 8px; margin: 6px 0; font-weight: 600; }
.results-list li.correct { background: #e4f9e9; color: #1a7a3c; }
.results-list li.wrong { background: #fdeaea; color: #a32626; }

.final-scoreboard { text-align: left; font-size: 1.1rem; }
.winner { font-size: 1.2rem; }
