body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #000000;
    font-family: 'Press Start 2P', cursive;
    color: white;
    overflow: hidden;
}
#app-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
}
#board-screen {
    display: flex;
    flex-direction: column;
    width: 90%;
    height: 90%;
    border: 4px solid #0022ff;
    border-radius: 5px;
    padding: 30px;
    box-sizing: border-box;
    box-shadow: 0 0 15px #0022ff, inset 0 0 15px #0022ff;
}
#question-split-layout {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    gap: 40px;
}
#question-left-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#question-right-pane {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid #0022ff;
    padding: 10px;
    box-sizing: border-box;
    background-color: #000000;
}
#question-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
#question-header {
    background-color: #002299;
    color: #ffff00;
    padding: 20px 60px;
    text-align: center;
    font-size: 1.5rem;
    line-height: 1.5;
    margin-bottom: 50px;
    text-transform: uppercase;
    border: 2px solid #0022ff;
}
#question-text {
    font-size: 1.3rem;
    color: #ff66cc;
    line-height: 2;
    text-align: center;
    text-transform: uppercase;
}
#round-title {
    color: #ff66cc;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 3px 3px 0 #000000;
}
#grid-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
}
.category-row {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 15px;
}
.category-header {
    background-color: #002299;
    border: 2px solid #0022ff;
    color: #ffff00;
    flex: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    text-align: center;
    text-transform: uppercase;
    padding: 10px;
}
.question-cell {
    background-color: #002299;
    border: 2px solid #0022ff;
    color: #ffff00;
    flex: 1;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
}
.question-cell:hover {
    background-color: #ffff00;
    color: #000000;
    border-color: #ffff00;
    transform: scale(1.05);
}
.hidden {
    display: none !important;
}
#answer-header {
    background-color: #002299;
    color: #ffff00;
    padding: 15px 60px;
    text-align: center;
    font-size: 1.5rem;
    line-height: 1.5;
    margin-bottom: 40px;
    text-transform: uppercase;
    border: 2px solid #0022ff;
}
#answer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
#answer-text {
    font-size: 2rem;
    color: #ff66cc;
    text-align: center;
    text-transform: uppercase;
}
#answer-explanation {
    font-size: 1rem;
    color: #ff66cc;
    text-align: center;
    text-transform: uppercase;
    max-width: 80%;
}
#special-text {
    font-size: 5rem;
    color: #ffff00;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.5;
}
#timer-container {
    width: 80%;
    height: 30px;
    border: 4px solid #0022ff;
    background-color: #000000;
    margin-top: 40px;
    box-sizing: border-box;
}
#timer-bar {
    height: 100%;
    background-color: #ff0000;
    width: 100%;
    transition: width 0.1s linear;
}
#question-screen, #answer-screen, #special-screen, #game-over-screen,
#intro-screen-0, #intro-screen-1, #intro-screen-2, #intro-screen-3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 85%;
    min-height: 40%;
    background-color: #000000;
    border: 4px solid #0022ff;
    padding: 40px;
    box-sizing: border-box;
    box-shadow: 0 0 15px #0022ff, inset 0 0 15px #0022ff;
    z-index: 10;
}
.title {
    font-family: 'Press Start 2P', cursive;
    color: #ff80ff;
    font-size: 5rem;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 30px;
}
.title-small {
    font-size: 3rem;
}
.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 90%;
}
.rule-box {
    border: 3px solid #0022ff;
    padding: 30px;
    color: #ffff00;
    text-align: center;
    font-size: 1.2rem;
    background: rgba(0,34,255,0.1);
}
.qr-container {
    background: #000000;
    padding: 20px;
    border: 5px solid #ffff00;
    box-shadow: 0 0 20px #ffff00;
}
.qr {
    width: 300px;
    height: 300px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
#game-over-text {
    font-size: 6rem;
    color: #ff0000;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 0 20px #ff0000;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}
.slide-in-anim {
    animation: slideInUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.fade-in-scale-anim {
    animation: fadeInScale 0.3s ease-out forwards;
}