* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f8ff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-container {
    width: 90%;
    max-width: 800px;
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header {
    margin-bottom: 20px;
}

.header h1 {
    color: #4682B4;
    font-size: 24px;
}

.instruction-text {
    margin-bottom: 30px;
    font-size: 20px;
    color: #333;
}

.images-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin: 0 auto 30px;
    max-width: 1000px; /* Provides more space for larger images */
}

.option-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 48%;
    margin-bottom: 20px;
}

.image-label {
    margin-top: 15px;
    font-size: 20px;
    font-weight: bold;
    color: #4682B4;
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #f0f8ff;
}

.image-option {
    width: 85%;
    margin: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    /* Set a fixed aspect ratio container */
    position: relative;
    padding-bottom: 70%; /* Increased height for better visibility */
}

.image-option:hover {
    transform: scale(1.05);
}

.image-option img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* This ensures the image covers the container while maintaining aspect ratio */
    object-position: center; /* Centers the image within the container */
    display: block;
}

.feedback {
    height: 50px;
    font-size: 22px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.5s ease;
}

.correct {
    color: #28a745;
    text-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
    animation: feedbackGrow 0.5s ease-out;
}

.incorrect {
    color: #dc3545;
}

@keyframes feedbackGrow {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Completion overlay */
.completion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.completion-overlay.visible {
    opacity: 1;
}

.completion-message {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.5s ease;
}

.completion-overlay.visible .completion-message {
    transform: scale(1);
}

.completion-message h2 {
    color: #4682B4;
    margin-bottom: 15px;
    font-size: 28px;
}

.completion-message p {
    color: #333;
    margin-bottom: 25px;
    font-size: 18px;
    line-height: 1.5;
}

.replay-button {
    padding: 12px 30px;
    margin: 15px auto 0;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    display: block;
}

.replay-button {
    background-color: #28a745;
    color: white;
}

.replay-button:hover {
    background-color: #218838;
    transform: scale(1.05);
}

/* Correct answer styling */
.correct-answer .image-label {
    color: #28a745;
    font-weight: bold;
}

/* No hover state */
.no-hover {
    pointer-events: none;
}

.no-hover:hover {
    transform: none;
}

@media (max-width: 768px) {
    .option-wrapper {
        width: 90%;
    }
    
    .image-option {
        width: 100%;
        padding-bottom: 75%; /* Adjusted aspect ratio for mobile */
    }
    
    .completion-message {
        padding: 20px;
        max-width: 90%;
    }
    
    .completion-message h2 {
        font-size: 24px;
    }
    
    .completion-message p {
        font-size: 16px;
    }
      .replay-button {
        padding: 10px 25px;
        font-size: 16px;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .option-wrapper {
        width: 90%;
    }
    
    .image-option {
        width: 100%;
        padding-bottom: 70%; /* Taller aspect ratio for very small screens */
        margin: 10px auto;
    }
    
    .image-label {
        font-size: 14px;
    }
    
    .completion-message h2 {
        font-size: 20px;
    }
    
    .completion-message p {
        font-size: 14px;
        margin-bottom: 20px;
    }
      .replay-button {
        padding: 8px 20px;
        margin: 10px auto 0;
        font-size: 14px;
    }
}
