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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #7a0000;
    color: #ffffda;
    min-height: 100vh;
}

.hidden { display: none !important; }

.screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.error {
    color: #ffcaca;
    margin-top: 0.5rem;
}

/* --- Sinterklaas star/dot pattern background --- */

#login-screen,
#done-screen {
    background-color: #7a0000;
    background-image:
        radial-gradient(circle at 15% 25%, #e8a800 1.5px, transparent 1.5px),
        radial-gradient(circle at 72% 12%, #e8a800 1px, transparent 1px),
        radial-gradient(circle at 45% 60%, #e8a800 1px, transparent 1px),
        radial-gradient(circle at 88% 45%, #e8a800 1.5px, transparent 1.5px),
        radial-gradient(circle at 25% 85%, #e8a800 1px, transparent 1px),
        radial-gradient(circle at 60% 90%, #e8a800 1.5px, transparent 1.5px);
}

/* --- Login --- */

.login-box {
    margin: auto;
    text-align: center;
    padding: 2.5rem;
    background: rgba(60, 0, 0, 0.85);
    border: 2px solid #e8a800;
    border-radius: 16px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
    position: relative;
}

.login-box h1 {
    margin-bottom: 0.4rem;
    color: #e8a800;
    font-weight: 700;
    font-size: 1.7rem;
}

.login-box .subtitle {
    color: #e8a800;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.75;
}

.login-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #c08000;
    border-radius: 10px;
    font-size: 1.1rem;
    background: #5a0000;
    color: #ffffda;
    margin-bottom: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.login-box input::placeholder {
    color: #d4a060;
}

.login-box input:focus {
    outline: none;
    border-color: #e8a800;
}

.login-box button, #submit-btn {
    width: 100%;
    padding: 0.75rem;
    background: #e8a800;
    color: #7a0000;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}

.login-box button:hover, #submit-btn:hover:not(:disabled) {
    opacity: 0.85;
}

/* --- Play (team phone) --- */

#question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #5a0000;
    border-bottom: 2px solid #e8a800;
    font-weight: 600;
}

#question-label {
    font-size: 1.2rem;
    color: #e8a800;
}

#team-name-display {
    font-size: 0.9rem;
    color: #d4a060;
}

#question-progress {
    font-size: 0.85rem;
    color: #d4a060;
}

#play-map {
    flex: 1;
    min-height: 0;
}

#question-screen {
    height: 100vh;
}

.practice-feedback {
    padding: 0.6rem 1rem;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
}

.practice-feedback.correct {
    background: #064e3b;
    color: #6ee7b7;
}

.practice-feedback.incorrect {
    background: #5a0000;
    color: #ffcaca;
}

#submit-bar {
    padding: 0.75rem 1rem;
    background: #5a0000;
    border-top: 2px solid #e8a800;
}

#submit-btn {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
}

#submit-btn:disabled {
    background: #5a0000;
    color: #d4a060;
    cursor: not-allowed;
    opacity: 1;
    border: 1px solid #c08000;
}

/* --- Admin --- */

.tabs {
    display: flex;
    background: #5a0000;
    padding: 0 1rem;
    border-bottom: 2px solid #e8a800;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: #d4a060;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s;
}

.tab:hover {
    color: #e8a800;
}

.tab.active {
    color: #e8a800;
    border-bottom-color: #e8a800;
}

.tab-content {
    padding: 1.5rem;
}

.card {
    background: #5a0000;
    border: 1px solid #c08000;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.card h3 {
    color: #e8a800;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.card-btn {
    width: 100%;
    padding: 0.65rem;
    margin-top: 1rem;
    background: #e8a800;
    color: #7a0000;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s;
}

.card-btn:hover {
    opacity: 0.85;
}

.form-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.form-row input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #c08000;
    border-radius: 8px;
    background: #5a0000;
    color: #ffffda;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-row input:focus {
    outline: none;
    border-color: #e8a800;
}

.form-row input.wide {
    flex: 1;
    min-width: 200px;
}

.form-row button, .question-item button, td button {
    padding: 0.5rem 1rem;
    background: #e8a800;
    color: #7a0000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 700;
    transition: opacity 0.2s;
}

.form-row button:hover, .question-item button:hover, td button:hover {
    opacity: 0.8;
}

.hint {
    color: #d4a060;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #5a0000;
}

th {
    color: #e8a800;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

#questions-list {
    margin-top: 0.5rem;
}

.question-item {
    padding: 0.75rem 1rem;
    background: #5a0000;
    border: 1px solid #c08000;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.question-item strong {
    color: #e8a800;
}

.question-item button {
    margin-left: auto;
}

.question-item button + button {
    margin-left: 0.25rem;
}

/* --- Projector --- */

body.projector {
    background: #5a0000;
}

.projector-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    background: #7a0000;
    border-bottom: 2px solid #e8a800;
}

.nav-btn {
    background: #e8a800;
    color: #7a0000;
    border: none;
    padding: 0.5rem 1.5rem;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    transition: opacity 0.2s;
}

.nav-btn:hover {
    opacity: 0.8;
}

#view-label {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e8a800;
}

.projector-view {
    padding: 1rem 2rem;
}

.projector-subtitle {
    text-align: center;
    color: #e8a800;
    font-size: 1.3rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.75;
}

#scoreboard-table {
    max-width: 600px;
    margin: 1rem auto 0;
    font-size: 1.8rem;
}

#scoreboard-table th {
    font-size: 1.2rem;
}

#scoreboard-table td, #scoreboard-table th {
    padding: 0.75rem 1.5rem;
    border-bottom-color: #7a0000;
}

#result-question-text {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #e8a800;
}

.team-label {
    background: rgba(90, 0, 0, 0.9) !important;
    border: 1px solid #e8a800 !important;
    color: #ffffda !important;
    font-size: 0.85rem !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
}

.projector h1 {
    text-align: center;
    color: #e8a800;
    font-size: 2.5rem;
    font-weight: 700;
}
