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

body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    text-align: center;
    background: transparent;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    max-width: 90vw;
    min-height: 400px;
}

.menu {
    padding: 2rem;
    background-color: #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    margin: 0;
    display: block;
    position: relative;
    z-index: 1;
}

h1 {
    margin-bottom: 1.5rem;
    color: #4CAF50;
}

h2 {
    margin-bottom: 1rem;
}

.table-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto 2rem auto;
    text-align: left;
}

.table-buttons label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    cursor: pointer;
}

.table-buttons input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.start-button {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.start-button:hover {
    background-color: #45a049;
}

.start-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: transparent;
}

.game-layout {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    min-height: 600px;
    background: transparent;
}

.game-main {
    flex: 1;
    background: transparent;
}

.game-info {
    padding: 0.2rem;
    margin-bottom: 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-items: center;
    position: relative;
    background: none !important;
    min-height: 4rem;
}

.question-container {
    display: flex;
    align-items: center;
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: none !important;
    margin: 0;
    padding: 0;
}

.question {
    font-size: 2.85rem;
    color: white;
    font-family: 'Righteous', cursive;
    opacity: 0;
    transform: scale(0.8);
    animation: questionAppear 0.5s ease-out forwards;
    white-space: pre;
    background: none !important;
    letter-spacing: 0.05em;
    margin: 0;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease-out;
}

.question.correct {
    color: #4CAF50;
}

.question.incorrect {
    color: #ff3232;
}

@keyframes questionAppear {
    0% {
        opacity: 0;
        transform: scale(0.8);
        background: none;
    }
    50% {
        transform: scale(1.1);
        background: none;
    }
    100% {
        opacity: 1;
        transform: scale(1);
        background: none;
    }
}

#answer {
    font-size: 2.85rem;
    font-family: 'Righteous', cursive;
    background: transparent !important;
    border: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    color: rgba(255, 255, 255, 0.5);
    width: 5em;
    padding: 0;
    margin: 0;
    caret-color: transparent;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: none !important;
    box-shadow: none !important;
    outline: 0 !important;
    opacity: 1;
    text-decoration: none;
    letter-spacing: 0.05em;
    user-select: text;
    pointer-events: auto;
    transition: color 0.3s ease-out;
}

#answer:focus,
#answer:hover,
#answer:active,
#answer:focus-visible,
#answer:focus-within {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: none !important;
}

#answer::selection {
    background: transparent !important;
}

#answer::-moz-selection {
    background: transparent !important;
}

/* Remove spinner buttons */
#answer::-webkit-outer-spin-button,
#answer::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0;
    display: none;
}

/* Remove focus ring in Firefox */
#answer::-moz-focus-inner {
    border: 0 !important;
    outline: none !important;
}

/* Remove focus outline in IE */
#answer::-ms-clear,
#answer::-ms-reveal {
    display: none !important;
}

#answer.correct {
    color: rgba(76, 175, 80, 0.7) !important;
}

#answer.incorrect {
    color: rgba(255, 50, 50, 0.7) !important;
}

.canvas-container {
    position: relative;
    width: 300px;
    height: 600px;
    margin: 0 auto;
    overflow: hidden; /* Prevent any overflow from causing shifts */
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    border: 2px solid #4CAF50;
    background-color: #000;
    width: 300px;
    height: 600px;
}

#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

#smokeCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10000;
}

.character-container {
    width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}

#character-container {
    position: relative;
    display: inline-block;
}

#score-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 20px);
    text-align: center;
    z-index: 1000;
    pointer-events: none;
}

#score-label {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 5px;
}

#score {
    color: #FFD700;
    font-size: 48px;
    font-weight: bold;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.5),
        -2px -2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Arial', sans-serif;
}

.character-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease-out;
}

.character-container img.jump {
    animation: jumpAnimation 0.6s ease-out;
}

@keyframes jumpAnimation {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-30px);
    }
    100% {
        transform: translateY(0);
    }
}

#game {
    position: relative;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px;
    padding-left: 30px;
    border-radius: 10px;
    margin: 20px auto;
    display: none;
}

#menu {
    margin: 0;
    display: block;
    position: relative;
    z-index: 1;
}

#spaceship {
    position: fixed;
    width: 700px;
    height: auto;
    top: 10%;
    right: -950px;
    z-index: 1001;
    display: none;
}

@keyframes flyAcross {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-200vw);
    }
}



/* Responsive: stack on small screens */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    #menu {
        margin: 0 auto;
    }
}

#menu {
    flex: 0 1 auto;
} 