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

body {
    font-family: 'Arial Black', Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

:root {
    --accent-blue: #1a6ba8;
    --accent-blue-hover: #145586;
}

.top-banner {
    width: 100%;
    text-align: center;
    padding: 20px 0 10px;
}

.top-banner-image-wrap {
    position: relative;
    display: inline-block;
    width: 90%;
    max-width: 420px;
}

.top-banner-image {
    width: 100%;
    height: auto;
    cursor: pointer;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.top-banner-image:hover,
.top-banner-image:focus-visible {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    outline: none;
}

.top-banner-image.playing {
    box-shadow: 0 0 0 4px rgba(39, 174, 96, 0.7);
}

.theme-play-pause-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 0.9em;
    font-weight: bold;
    color: white;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(2px);
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

.theme-play-pause-btn:hover,
.theme-play-pause-btn:focus-visible {
    background: rgba(0, 0, 0, 0.8);
    transform: translateX(-50%) translateY(-1px);
    outline: none;
}

.theme-play-pause-btn.is-playing {
    background: rgba(24, 140, 84, 0.88);
}

.theme-play-pause-icon {
    font-size: 0.95em;
    width: 1.1em;
    display: inline-flex;
    justify-content: center;
}

.facilitator-help {
    margin-top: 12px;
}

@media (max-width: 520px) {
    .theme-play-pause-btn {
        bottom: 10px;
        padding: 7px 10px;
        font-size: 0.8em;
    }
}

.instructions-toggle-btn {
    padding: 10px 18px;
    font-size: 1em;
    font-weight: bold;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.instructions-toggle-btn:hover {
    background: var(--accent-blue-hover);
}

.instructions-panel {
    display: none;
    max-width: 700px;
    margin: 12px auto 0;
    padding: 14px 18px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.28);
    text-align: left;
}

.instructions-panel.visible {
    display: block;
}

.instructions-panel p {
    color: #2c3e50;
    font-family: Arial, sans-serif;
    font-size: 1em;
    margin: 6px 0;
}

.screen {
    width: 100%;
}

/* Setup Screen */
.setup-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.setup-container h1 {
    color: #e74c3c;
    font-size: 3em;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.setup-container h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
}

.team-input {
    margin-bottom: 20px;
}

.team-input label {
    display: block;
    color: #2c3e50;
    font-size: 1.2em;
    margin-bottom: 8px;
}

.team-input input {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    border: 2px solid var(--accent-blue);
    border-radius: 8px;
    outline: none;
}

.team-input input:focus {
    border-color: #e74c3c;
}

.question-set-panel {
    margin-top: 30px;
    padding: 20px;
    background: #f4f8fc;
    border: 2px solid #d6e4f0;
    border-radius: 12px;
}

.question-set-panel h3 {
    color: #2c3e50;
    margin-bottom: 8px;
}

.question-set-help {
    color: #456;
    font-family: Arial, sans-serif;
    line-height: 1.5;
    margin-bottom: 14px;
}

.question-set-btn-row {
    display: flex;
    gap: 10px;
}

.import-btn,
.download-btn {
    flex: 1;
    padding: 13px;
    font-size: 1.05em;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.import-btn {
    background: var(--accent-blue);
}

.import-btn:hover {
    background: var(--accent-blue-hover);
}

.download-btn {
    background: var(--accent-blue);
}

.download-btn:hover {
    background: var(--accent-blue-hover);
}

.question-set-status {
    margin-top: 12px;
    color: #2c3e50;
    font-family: Arial, sans-serif;
    line-height: 1.5;
}

.question-set-status.error {
    color: #c0392b;
}

.start-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.3em;
    font-weight: bold;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.start-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.start-btn:disabled,
.import-btn:disabled,
.download-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
}

.start-btn:disabled:hover,
.import-btn:disabled:hover,
.download-btn:disabled:hover {
    transform: none;
}

/* Game Screen */
.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.team-score {
    text-align: center;
    flex: 1;
    position: relative;
}

.team-score.celebrating {
    animation: winner-pulse 0.7s ease-in-out infinite;
}

.team-score.celebrating::after {
    content: '🎆 🎉 🎆';
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.6em;
    animation: fireworks-burst 0.8s ease-in-out infinite;
}

@keyframes winner-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.07); }
}

@keyframes fireworks-burst {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(-8px); }
}

.game-over-banner {
    display: none;
    background: white;
    color: #e74c3c;
    text-align: center;
    font-size: 2.2em;
    font-weight: bold;
    letter-spacing: 0.08em;
    padding: 14px 20px;
    margin-bottom: 20px;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.game-over-banner.active {
    display: block;
}

.team-score h2 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 10px;
}

.score {
    font-size: 3em;
    color: #e74c3c;
    font-weight: bold;
}

.round-info {
    flex: 1;
    text-align: center;
}

.round-info h1 {
    color: #e74c3c;
    font-size: 2em;
    margin-bottom: 10px;
}

.wrong-answers {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.x-mark {
    font-size: 3em;
    color: #ccc;
    transition: all 0.3s;
}

.x-mark.active {
    color: #e74c3c;
    animation: buzz 0.5s;
}

@keyframes buzz {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Question Container */
.question-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.question-container h2 {
    color: #2c3e50;
    font-size: 2em;
}

/* Answer Entry */
.answer-entry-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.team-answer-input label {
    display: block;
    color: #2c3e50;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.answer-input-row {
    display: flex;
    gap: 10px;
}

.answer-input-row input {
    flex: 1;
    padding: 12px;
    font-size: 1em;
    border: 2px solid var(--accent-blue);
    border-radius: 8px;
    outline: none;
}

.answer-input-row input:focus {
    border-color: #e74c3c;
}

.answer-input-row button {
    padding: 12px 18px;
    font-size: 1em;
    font-weight: bold;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.answer-input-row button:hover {
    background: var(--accent-blue-hover);
}

.strike-feedback {
    display: none;
    text-align: center;
    font-size: 7em;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 20px;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    animation: strike-pop 0.45s ease;
}

.strike-feedback.active {
    display: block;
}

.steal-indicator {
    display: none;
    background: white;
    color: #e74c3c;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.steal-indicator.active {
    display: block;
}

@keyframes strike-pop {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Answer Board */
.answer-board {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

#answers-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.answer-item {
    background: var(--accent-blue);
    color: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.answer-item:hover:not(.revealed) {
    background: var(--accent-blue-hover);
    transform: scale(1.02);
}

.answer-item.revealed {
    background: #27ae60;
    cursor: default;
    animation: reveal 0.5s;
}

@keyframes reveal {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.answer-number {
    font-size: 1.5em;
    font-weight: bold;
    margin-right: 15px;
}

.answer-text {
    flex-grow: 1;
    font-size: 1.3em;
    text-align: left;
}

.answer-points {
    font-size: 1.5em;
    font-weight: bold;
}

.answer-item:not(.revealed) .answer-text,
.answer-item:not(.revealed) .answer-points {
    visibility: hidden;
}

.answer-item:not(.revealed)::before {
    content: attr(data-number);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    font-weight: bold;
}

/* Round Score */
.round-score-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.round-score-container h3 {
    color: #2c3e50;
    font-size: 1.8em;
}

.round-score-container span {
    color: #e74c3c;
}

/* Controls */
.controls {
    text-align: center;
}

.controls button {
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s;
}

.controls button:hover {
    background: #229954;
    transform: scale(1.05);
}

/* Game Over Screen */
.gameover-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.gameover-container h1 {
    color: #e74c3c;
    font-size: 3em;
    margin-bottom: 30px;
}

.final-scores {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.final-score h2 {
    color: #2c3e50;
    font-size: 2.3em;
    margin-bottom: 15px;
}

#winner-text {
    color: #27ae60;
    font-size: 2.5em;
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    .team-score h2 {
        font-size: 2.2em;
    }

    .final-score h2 {
        font-size: 2.5em;
    }

    .answer-entry-container {
        grid-template-columns: 1fr;
    }
}
