* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #1a1a1a;

    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    line-height: 1.6;
    color: #fff;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(0, 188, 212, 0.15) 1px, transparent 1px),
        linear-gradient(rgba(0, 188, 212, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px, 50px 50px, 25px 25px, 25px 25px;
    animation: gridMove 20s linear infinite;
    z-index: -1;
    pointer-events: none;
} */

@keyframes gridMove {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(50px);
    }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(26, 26, 26, 0.9) 100%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1400px;
    width: 100%;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 188, 212, 0.15);
    text-align: center;
    border: 1px solid rgba(0, 188, 212, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(45deg, rgba(0, 188, 212, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0, 188, 212, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0, 188, 212, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0, 188, 212, 0.05) 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
    z-index: -1;
    animation: containerGridMove 20s linear infinite;
}

@keyframes containerGridMove {
    0% {
        background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
    }

    100% {
        background-position: 40px 40px, 40px 60px, 60px 20px, 20px 40px;
    }
}

h1.level-title {
    color: #00bcd4;
    font-size: 3rem;
    margin-bottom: 2rem;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 188, 212, 0.3);
}

.level-title {
    color: #00bcd4;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 188, 212, 0.3);
}

.levels {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    position: relative;
}

.level-card {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 10px;
    padding: 1.5rem;
    width: 300px;
    box-shadow: 0 4px 6px rgba(0, 188, 212, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(0, 188, 212, 0.1);
}

.level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 188, 212, 0.2);
    border-color: rgba(0, 188, 212, 0.3);
}

/* Add arrows between level cards */
.level-card:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #00bcd4;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 188, 212, 0.3);
}

/* Level container styles - Adjusted for main page layout */
.level-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

/* Navigation styles for the three main dropdowns */
.navigation {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1000;
    width: 100%;
}

.dropdown {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.btn {
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(0, 188, 212, 0.1);
    border: 1px solid rgba(0, 188, 212, 0.2);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn .arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: #00bcd4;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgb(26, 26, 26);
    min-width: 100%;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 8px;
    border: 1px solid rgba(0, 188, 212, 0.2);
    backdrop-filter: blur(10px);
    margin-top: 0.5rem;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.dropdown-content.show {
    display: block;
    transform: scaleY(1);
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scaleY(0);
    }
    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

.dropdown-content a {
    color: #fff;
    padding: 1rem;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 187, 212, 0);
}

.dropdown-content a:hover {
    background: rgba(0, 188, 212, 0.1);
    color: #00bcd4;
}

/* Media Queries */
@media (min-width: 768px) {
    .navigation {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .dropdown {
        width: auto;
        min-width: 160px;
        flex-grow: 1;
        max-width: 220px;
    }

    .dropdown:not(:last-child)::after {
        content: "→";
        position: absolute;
        right: -1.5rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.5rem;
        color: #00bcd4;
        font-weight: bold;
        text-shadow: 0 0 10px rgba(0, 188, 212, 0.3);
    }
}

@media (max-width: 767px) {
    .navigation {
        padding: 0 1rem;
    }

    .dropdown {
        margin-bottom: 0.5rem;
    }

    .dropdown:not(:last-child)::after {
        content: "↓";
        position: absolute;
        left: 50%;
        bottom: -1rem;
        transform: translateX(-50%);
        font-size: 1.5rem;
        color: #00bcd4;
        font-weight: bold;
        text-shadow: 0 0 10px rgba(0, 187, 212, 0.437);
    }

    .dropdown-content {
        position: absolute;
        width: 100%;
        max-height: 300px;
        overflow-y: auto;
        transform-origin: top;
    }

    .dropdown-content.show {
        animation: fadeIn 0.3s ease forwards;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
    }

    .navigation {
        gap: 1rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .dropdown-content {
        max-height: 250px;
    }
}

/* Floating Back Button */
.back-button {
    position: fixed;
    bottom: 10px;
    right: 1rem;
    background: rgba(26, 26, 26, 0.9);
    color: #00bcd4;
    padding: 12px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.2);
    border: 1px solid rgba(0, 188, 212, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
    gap: 8px;
}

.back-button:hover {
    transform: translateX(-10px);
    background: #00bcd4;
    border-color: 2px solid #fff;
    box-shadow: 0 12px 25px rgba(0, 188, 212, 0.3);
    color: #fff;
}

.back-button::before {
    content: "←";
    font-weight: bold;
}

@media (max-width:600px) {
    .back-button {
        right: 40%;
    }
}

/* Learning Area Styles */
.learning-area {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.instruction-box,
.practice-box {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(0, 188, 212, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    text-align: left;
    margin: 0;
}

.instruction-box h2,
.practice-box h3 {
    color: #00bcd4;
    margin-bottom: 1rem;
}

.instruction-box ul {
    list-style-position: inside;
    margin: 1rem 0;
}

.instruction-box li {
    margin: 0.5rem 0;
    color: #fff;
}

.target-key {
    font-size: 1.5rem;
    margin: 0;
    color: #00bcd4;
}

#current-key {
    text-transform: uppercase;
    color: #d40000;
    font-size: 1.8rem;
}

.stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    color: #fff;
}