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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #2d1b69 0%, #11998e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden;
}

.game-container {
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: 40px;
    text-align: center;
    animation: fadeIn 0.8s ease-in;
}

.screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}



/* Title Screen Styles */
.title-screen {
    background-image: url('background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.game-logo {
    max-width: 350px;
    width: 70%;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(255, 165, 0, 0.5));
}

.start-button {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    border: none;
    padding: 15px 40px;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 20px;
}

.start-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.6);
}

.ayabear-logo {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ayabear-logo:hover {
    transform: scale(1.1);
}

.ayabear-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Story Screen Styles */
.story-screen {
    background-image: url('background.webp');
    background-size: cover;
    background-position: center;
    padding: 20px;
}

.story-content {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 850px;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.story-image {
    flex: 0 0 416px;
    width: 416px;
    height: 312px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.story-text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.story-text {
    font-size: 1.2em;
    line-height: 1.4;
    color: white;
    margin: 0;
}

.continue-button {
    background: linear-gradient(45deg, #8b4513, #d2691e);
    border: none;
    padding: 12px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    align-self: center;
}

.continue-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

/* Game Screen Styles */
.game-screen {
    padding: 20px;
    background-image: url('background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.question-counter {
    font-size: 1.2em;
    color: #ff6b35;
    font-weight: bold;
}

.candy-score {
    font-size: 1.2em;
    color: #f7931e;
    font-weight: bold;
}

.question-container {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    background: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    max-width: 850px;
    width: 100%;
}

.question-image {
    flex: 0 0 364px;
    width: 364px;
    height: 273px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.question-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.question-text {
    font-size: 1.2em;
    margin: 0;
    line-height: 1.4;
    color: white;
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 0;
}

.answer-button {
    background: linear-gradient(145deg, #4a4a4a, #2c2c2c);
    border: 2px solid #666;
    padding: 15px 20px;
    font-size: 1.1em;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-align: left;
}

.answer-button:hover {
    background: linear-gradient(145deg, #5a5a5a, #3c3c3c);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.answer-button.correct {
    background: linear-gradient(145deg, #27ae60, #2ecc71);
    border-color: #2ecc71;
}

.answer-button.wrong {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    border-color: #c0392b;
}

.answer-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}



.answer-button.eliminated {
    text-decoration: line-through;
    opacity: 0.5;
    background: linear-gradient(145deg, #666, #444);
    border-color: #666;
}

.help-section {
    margin-top: 20px;
    text-align: center;
}

.help-button {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
    margin-bottom: 10px;
}

.help-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.6);
}

.help-button:disabled {
    background: linear-gradient(45deg, #7f8c8d, #95a5a6);
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: none;
}

.help-text {
    font-size: 0.9em;
    color: #bdc3c7;
    font-style: italic;
}

/* Feedback Screen Styles */
.feedback-screen {
    background-image: url('background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 20px;
}

.feedback-content {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 600px;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.feedback-image {
    flex: 0 0 200px;
    width: 200px;
    height: 160px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.feedback-text-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feedback-text {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0;
}

.feedback-text.correct {
    color: #2ecc71;
}

.feedback-text.wrong {
    color: #e74c3c;
}

#feedbackMessage {
    font-size: 1.2em;
    margin: 0;
    color: white;
}

/* Ending Screen Styles */
.ending-screen {
    background-image: url('background.webp');
    background-size: cover;
    background-position: center;
}

.final-score {
    font-size: 2.5em;
    color: #f7931e;
    margin: 20px 0;
    font-weight: bold;
}

.performance-message {
    font-size: 1.4em;
    margin: 30px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    max-width: 500px;
}

.ending-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.ending-button {
    background: linear-gradient(45deg, #8b4513, #d2691e);
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.ending-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.ending-button.primary {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-container {
        width: 100vw;
        height: 100vh;
    }

    .screen {
        padding: 20px;
    }

    .story-content, .question-container, .feedback-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .story-image, .question-image, .feedback-image {
        flex: none;
        width: 300px;
        height: 220px;
        align-self: center;
    }

    .story-text-container, .question-content, .feedback-text-container {
        flex: none;
        width: 100%;
    }

    .answers-grid {
        grid-template-columns: 1fr;
    }

    .ending-buttons {
        flex-direction: column;
    }
    
    .ending-button {
        margin-bottom: 10px;
    }

    .game-header {
        flex-direction: column;
        gap: 10px;
    }

    .answer-button {
        font-size: 1em;
        padding: 12px 15px;
    }


}

@media (max-width: 480px) {
    .story-content, .question-container, .feedback-content {
        padding: 20px;
    }

    .story-image, .question-image, .feedback-image {
        width: 240px;
        height: 180px;
    }

    .story-text, .question-text {
        font-size: 1.1em;
    }

    .final-score {
        font-size: 2em;
    }

    .performance-message {
        font-size: 1.2em;
    }


}