/* Main styles for IRE097 Game */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f7ff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f0f7ff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(74, 103, 216, 0.3);
    border-top-color: #4a67d8;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

.loading-text {
    margin-top: 20px;
    font-size: 18px;
    color: #4a67d8;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
    max-width: 80%;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.game-container {
    width: 90%;
    max-width: 900px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.audio-intro {
    text-align: center;
    padding: 20px;
}

.audio-intro h1 {
    color: #4a67d8;
    margin-bottom: 30px;
    font-size: 2.5em;
}

button {
    background-color: #4a67d8;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background-color: #3951b0;
    transform: scale(1.05);
}

.question-container {
    text-align: center;
}

#question-text {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #4a67d8;
}

#progress-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.progress-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #ddd;
    margin: 0 5px;
    transition: background-color 0.3s ease;
}

.progress-dot.active {
    background-color: #4a67d8;
}

.progress-dot.completed {
    background-color: #4acf66;
}

.images-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.image-pair {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.image-choice {
    width: 45%;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    border: 4px solid transparent;
}

.image-choice:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.image-choice.correct {
    border-color: #4acf66;
}

.image-choice img {
    width: 100%;
    height: auto;
    display: block;
}

.feedback-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 100;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

#feedback-text {
    font-size: 24px;
    font-weight: bold;
    color: #4a67d8;
    text-align: center;
}

.completion-container {
    text-align: center;
    padding: 40px 20px;
}

.completion-container h2 {
    color: #4a67d8;
    margin-bottom: 15px;
    font-size: 2em;
}

.completion-container p {
    margin-bottom: 20px;
    font-size: 18px;
}

.completion-message {
    background-color: #f0f7ff;
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto 30px;
    max-width: 80%;
}

.completion-message ul {
    text-align: left;
    display: inline-block;
    margin: 10px auto;
}

.completion-message li {
    margin-bottom: 10px;
    list-style-type: none;
    position: relative;
    padding-left: 25px;
}

.completion-message li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4acf66;
    font-weight: bold;
}

.completion-animation {
    font-size: 60px;
    margin-bottom: 20px;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0px);
    }
    to {
        transform: translateY(-15px);
    }
}

@media (max-width: 768px) {
    .image-pair {
        flex-direction: column;
        align-items: center;
    }

    .image-choice {
        width: 80%;
    }
}
