:root {
    --primary-color: #77dd77;
    --secondary-color: #a8e6cf;
    --accent-color: #dcedc1;
    --light-color: #e8f5e9;
    --text-color: #2e7d32;
    --white: #ffffff;
}

* {
    font-family: "Poppins", sans-serif;
    box-sizing: border-box;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 0 10%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #fff;
    transition: all 0.3s ease;
}

.header:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

.navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.header .navigation ul li {
    float: left;
    position: relative;
}

.header .navigation ul li a {
    font-size: 16px;
    font-weight: 500;
    color: var(--white);
    text-decoration: none;
    padding: 22px 20px;
    display: block;
    transition: all 0.3s ease;
}

.header .navigation ul li a:hover {
    background-color: rgba(255, 255, 255, 0.733);
    transform: translateY(-2px);
    color: var(--text-color);
}

#toggle,
.header label {
    display: none;
    cursor: pointer;
}

.menu {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

@media (max-width: 950px) {
    .header label {
        display: initial;
    }

    .header {
        padding: 15px 10%;
    }

    .header .navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        display: none;
        border-radius: 0 0 12px 12px;
    }

    .header .navigation ul li {
        width: 100%;
    }

    .header .navigation ul li a {
        padding: 12px 20px;
    }

    #toggle:checked ~ .navigation {
        display: block;
        animation: slideDown 0.4s ease-out;
    }
}

/* Body Styles */
body {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9, #a5d6a7);
    margin: 0;
    padding: 0;
    padding-top: 80px;
    min-height: 100vh;
    color: var(--text-color);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "Poppins", sans-serif;
}

/* Game Container */
.game-container {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 90%;
    max-width: 800px;
    margin: 20px 0;
}

h1 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

.exercise-container {
    margin-bottom: 30px;
}

.exercise-title {
    font-size: 20px;
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

.question {
    margin-bottom: 15px;
    padding: 15px;
    background-color: var(--light-color);
    border-radius: 8px;
}

.fill-blank-question {
    font-size: 16px;
    margin-bottom: 10px;
}

.blank {
    display: inline-block;
    width: 100px;
    border-bottom: 2px solid var(--text-color);
    margin: 0 5px;
    text-align: center;
}

input[type="text"] {
    border: none;
    border-bottom: 2px solid var(--secondary-color);
    background: transparent;
    width: 100px;
    text-align: center;
    font-family: "Poppins", sans-serif;
    padding: 5px;
}

input[type="text"]:focus {
    outline: none;
    border-bottom: 2px solid var(--primary-color);
}

.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.option {
    background-color: var(--accent-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.option:hover {
    background-color: var(--primary-color);
    color: white;
}

.option.selected {
    background-color: var(--primary-color);
    color: white;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn:hover {
    background-color: #66bb6a;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.btn-clear {
    background-color: #ff6b6b;
}

.btn-clear:hover {
    background-color: #ff5252;
}

.results {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    background-color: var(--light-color);
    text-align: center;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background-color: #e0e0e0;
    border-radius: 15px;
    margin: 15px 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.congratulations {
    animation: pulse 1.5s infinite;
    font-size: 24px;
    color: #2e7d32;
    margin-top: 15px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Animations */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .game-container {
        padding: 20px;
        width: 95%;
    }
    
    .question {
        padding: 10px;
    }
    
    .fill-blank-question {
        font-size: 14px;
    }
    
    input[type="text"] {
        width: 80px;
    }
    
    .buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .fill-blank-question {
        font-size: 13px;
    }
    
    input[type="text"] {
        width: 70px;
        font-size: 14px;
    }
    
    .option {
        padding: 6px 12px;
        font-size: 14px;
    }
}