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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0077be 0%, #00a8cc 50%, #0066cc 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-attachment: fixed;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    max-width: 1000px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #004d7a;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    color: #0077be;
    font-size: 1.1em;
    font-weight: 500;
}

.score-board {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(90deg, #0077be, #004d7a);
    border-radius: 15px;
    color: white;
    font-weight: bold;
}

.gallery-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-card {
    background: linear-gradient(135deg, #20bf6b 0%, #0fb9b1 100%);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    border: none;
    font-size: 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.gallery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.gallery-card:hover::before {
    left: 100%;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.gallery-card.marine {
    background: linear-gradient(135deg, #3742fa 0%, #2f3542 100%);
}

.gallery-card.craft {
    background: linear-gradient(135deg, #f0932b 0%, #eb4d4b 100%);
}

.gallery-card.tech {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

.gallery-card.nature {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
}

.gallery-card h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.gallery-card p {
    font-size: 0.9em;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.quiz-section {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.space-header {
    display: flex;
    align-items: center;
    gap: 1em;
    padding: 0.5em 1em;
    border-radius: 12px;
    background: rgba(32, 191, 107, 0.08);
    margin-bottom: 1.5em;
    min-height: 64px;
}

.space-header .gallery-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    flex-shrink: 0;
}

.space-header-title {
    font-size: 2em;
    font-weight: 700;
    color: #0077be;
    margin: 0;
    line-height: 1.1;
    word-break: break-word;
}

.artifact {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-left: 5px solid #0077be;
    transition: transform 0.3s ease;
}

.artifact:hover {
    transform: translateY(-2px);
}

.artifact h3 {
    color: #004d7a;
    font-size: 1.4em;
    margin-bottom: 15px;
}

.artifact-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    margin-bottom: 15px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.artifact-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.question {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
}

.question h4 {
    color: #004d7a;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.option {
    background: linear-gradient(135deg, #0077be 0%, #004d7a 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.option:hover::before {
    left: 100%;
}

.option:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.option.correct {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    animation: pulse 0.5s ease-in-out;
}

.option.incorrect {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    animation: shake 0.5s ease-in-out;
}

.back-button {
    background: linear-gradient(135deg, #636e72 0%, #2d3436 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.feedback {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    display: none;
    animation: slideIn 0.3s ease;
}

.feedback.correct {
    background: linear-gradient(135deg, #d5f4e6 0%, #c8e6c9 100%);
    color: #00695c;
    border: 1px solid #00b894;
}

.feedback.incorrect {
    background: linear-gradient(135deg, #ffe0b2 0%, #ffcc80 100%);
    color: #e65100;
    border: 1px solid #ff9800;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.achievements {
    background: linear-gradient(135deg, #0077be 0%, #004d7a 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    text-align: center;
}

.achievement-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    margin: 5px;
    border-radius: 20px;
    font-size: 0.9em;
    backdrop-filter: blur(5px);
}

.dieppe-info {
    background: linear-gradient(135deg, #00cec9 0%, #00b894 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.gallery-card.visited {
    filter: brightness(0.7);
    opacity: 0.8;
    pointer-events: none;
}

@media (max-width: 768px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }

    .header h1 {
        font-size: 2em;
    }

    .gallery-selection {
        grid-template-columns: 1fr;
    }

    .score-board {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .space-header .gallery-icon {
        width: 32px;
        height: 32px;
    }

    .space-header-title {
        font-size: 1.2em;
    }
}