:root {
    --primary-color: #0ea5e9;
    /* Sky Blue */
    --secondary-color: #38bdf8;
    --accent-color: #fbbf24;
    --background-color: #e0f2fe;
    --water-color: #1e40af;
    --text-color: #0c4a6e;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    max-height: 600px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#game-header {
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: white;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-title {
    font-size: 1.5rem;
    font-weight: bold;
    font-style: italic;
}

.stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 12px;
    border-radius: 8px;
    color: white;
}

.stat-label {
    font-size: 0.7rem;
    opacity: 0.9;
}

.stat-value {
    font-weight: bold;
    font-family: monospace;
    font-size: 1.2rem;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

#game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--background-color);
    overflow: hidden;
}

/* Scenery */
.sky {
    height: 40%;
    position: relative;
}

.sun {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 4rem;
    animation: spinSun 20s linear infinite;
}

.clouds {
    position: absolute;
    left: 10px;
    top: 50px;
    font-size: 3rem;
    animation: drift 30s linear infinite;
    opacity: 0.8;
}

@keyframes spinSun {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes drift {
    from {
        transform: translateX(-20%);
    }

    to {
        transform: translateX(120%);
    }
}

.sea {
    height: 60%;
    background: linear-gradient(to bottom, #3b82f6, #1e3a8a);
    position: relative;
    overflow: hidden;
}

.wave {
    position: absolute;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg"><path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" fill="%2360a5fa" fill-opacity="0.4"/></svg>');
    background-repeat: repeat-x;
    animation: wave 10s linear infinite;
}

.wave2 {
    bottom: 0;
    opacity: 0.5;
    animation: wave 7s linear infinite reverse;
}

@keyframes wave {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.ship {
    font-size: 5rem;
    position: absolute;
    bottom: 20px;
    left: 20%;
    transition: left 1s ease-in-out;
    animation: bob 2s ease-in-out infinite alternate;
    z-index: 5;
}

.island {
    font-size: 6rem;
    position: absolute;
    bottom: 20px;
    right: -100px;
    z-index: 4;
    transition: right 1s;
}

@keyframes bob {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(10px);
    }
}

/* Question Card */
.question-card {
    position: absolute;
    bottom: 20px;
    /* Overlap sea */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.question-header {
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 5px;
}

.word-display {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
}

.option-btn {
    padding: 15px;
    font-size: 1.1rem;
    background: #f0f9ff;
    border: 2px solid #bae6fd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: #0369a1;
}

.option-btn:hover {
    background: #e0f2fe;
    border-color: var(--primary-color);
}

.option-btn:active {
    transform: translateY(2px);
}

.option-btn.correct {
    background: #dcfce7;
    border-color: #22c55e;
    color: #15803d;
}

.option-btn.wrong {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.hidden {
    display: none !important;
}

/* Modal */
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 320px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 15px;
}

.btn-secondary {
    background-color: transparent;
    color: #64748b;
    border: 2px solid #cbd5e1;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 10px;
}