body {
    font-family: 'Roboto', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    background-size: 200% 200%;
    animation: backgroundAnimation 15s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #e0e0e0;
    overflow: hidden;
}

@keyframes backgroundAnimation {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

.container {
    text-align: center;
    padding: 40px;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    max-width: 600px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.3), transparent);
    opacity: 0.4;
    pointer-events: none;
}

h1 {
    font-size: 36px;
    color: #00ffff;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

#start-button {
    padding: 15px 30px;
    font-size: 20px;
    cursor: pointer;
    background: linear-gradient(135deg, #00bcd4, #0097a7);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    transition: background 0.3s, transform 0.2s;
    margin-top: 20px;
}

#start-button:hover {
    background: linear-gradient(135deg, #0097a7, #007c8c);
    transform: scale(1.05);
}

#game-container {
    text-align: center;
    padding: 40px;
    background: rgba(30, 30, 30, 0.8);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    max-width: 600px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

#game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.3), transparent);
    opacity: 0.4;
    pointer-events: none;
}

#countdown {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

#question-container {
    margin-bottom: 30px;
    display: none;
}

#question-text {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

#answer-input {
    padding: 12px;
    font-size: 18px;
    margin-right: 15px;
    border: 1px solid #00ffff;
    border-radius: 8px;
    background: #121212;
    color: #e0e0e0;
    width: calc(100% - 165px);
    transition: border-color 0.3s, background-color 0.3s, transform 0.2s;
}

#answer-input:focus {
    border-color: #00bcd4;
    background: #1c1c1c;
    outline: none;
    transform: scale(1.02);
}

#submit-answer {
    padding: 12px 25px;
    font-size: 18px;
    cursor: pointer;
    background: linear-gradient(135deg, #00bcd4, #0097a7);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    transition: background 0.3s, transform 0.2s;
}

#submit-answer:hover {
    background: linear-gradient(135deg, #0097a7, #007c8c);
    transform: scale(1.05);
}

#timer, #score {
    margin: 15px 0;
    font-size: 22px;
    font-weight: 500;
    color: #e0e0e0;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

#result-container {
    display: none;
    padding: 20px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

#result-container h2 {
    font-size: 30px;
    color: #ff5722;
    margin-bottom: 15px;
}

#result-container p {
    font-size: 20px;
    margin: 10px 0;
}

#result-container button {
    padding: 12px 25px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    transition: background 0.3s, transform 0.2s;
    margin: 10px;
}

#result-container .retry-button {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: #ffffff;
}

#result-container .retry-button:hover {
    background: linear-gradient(135deg, #388e3c, #2c6c29);
    transform: scale(1.05);
}

#result-container .home-button {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: #ffffff;
}

#result-container .home-button:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    transform: scale(1.05);
}


@media (max-width: 768px) {
    .container, #game-container {
        padding: 20px;
        max-width: 100%;
    }

    #question-text {
        font-size: 20px;
    }

    #answer-input, #submit-answer {
        width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 28px;
    }

    #countdown {
        font-size: 30px;
    }

    #question-text {
        font-size: 18px;
    }
}
