@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,200;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-repeat: no-repeat;
    background: linear-gradient(180deg, rgba(1,46,64,1) 10%, rgba(1,28,38,1) 50%, rgba(0,8,13,1) 100%);
    height: 100%;
}

.background-layers {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}
    
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 164px 164px;
    width: 100%;
    height: 100%;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

header {
    padding: 20px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 24px;
}

.logo h1 {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.desktop-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
    position: relative;
    flex-wrap: wrap;
}

.desktop-menu li {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-menu li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 0.5rem 0.8rem;
    display: block;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.desktop-menu li a:hover {
    opacity: 0.5;
}

.desktop-menu li .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(20, 20, 40, 0.9);
    padding: 0.5rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    min-width: 160px;
    z-index: 100;
}

.desktop-menu li.has-submenu:hover .submenu {
    display: block;
}

.desktop-menu li .submenu li {
    display: block;
    width: 100%;
}

.desktop-menu li .submenu li a {
    padding: 0.5rem 1rem;
    color: white;
    white-space: nowrap;
}

desktop-menu li .submenu li a:hover {
    opacity: 0.5;
}

.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.burger-line {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #011c26;
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 80px 20px 20px;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-overlay .logo {
    position: absolute;
    top: 24px;
    left: 20px;
    z-index: 1001;
}

.mobile-menu-overlay.active .logo {
    opacity: 1;
}

.mobile-menu-overlay.active .logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.mobile-menu-overlay .logo i {
    font-size: 24px;
}

.mobile-menu-overlay .logo h1 {
    font-size: 24px;
}

.mobile-menu-content {
    margin: 0 auto;
}

.mobile-menu-section,
.mobile-menu-single {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay.active .mobile-menu-section,
.mobile-menu-overlay.active .mobile-menu-single {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-menu-section:nth-child(1),
.mobile-menu-overlay.active .mobile-menu-single:nth-child(1) {
    transition-delay: 0.05s;
}
.mobile-menu-overlay.active .mobile-menu-section:nth-child(2),
.mobile-menu-overlay.active .mobile-menu-single:nth-child(2) {
    transition-delay: 0.06s;
}
.mobile-menu-overlay.active .mobile-menu-section:nth-child(3),
.mobile-menu-overlay.active .mobile-menu-single:nth-child(3) {
    transition-delay: 0.07s;
}
.mobile-menu-overlay.active .mobile-menu-section:nth-child(4),
.mobile-menu-overlay.active .mobile-menu-single:nth-child(4) {
    transition-delay: 0.08s;
}

.mobile-menu-section h3 {
    color: white;
    font-size: 18px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: normal;
}

.mobile-menu-section h3 i {
    transition: transform 0.3s ease;
    padding: 10px;
}

.mobile-menu-section.expanded h3 i {
    transform: rotate(180deg);
}

.mobile-menu-items {
    display: none;
    padding-top: 10px;
    list-style: none;
}

.mobile-menu-section.expanded .mobile-menu-items {
    display: block;
}

.mobile-menu-items a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 12px 0;
    font-size: 16px;
    transition: all 0.3s ease;
}

.mobile-menu-items a:hover,
.mobile-menu-section h3:hover {
    color: white;
    padding-left: 5px;
    opacity: 0.5;
}

.mobile-menu-single a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mobile-menu-single a:hover {
    padding-left: 5px;
    opacity: 0.5;
}

.profile {
    width: 160px;
    height: auto;
    display: block;
    background: transparent;
    color: #fff;
    border: 1px solid #ffffff61;
    border-radius: 15px;
    box-shadow: 0px 0px 7px #a5a8b496;
    padding: 10px 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    text-align: center;
}

.profile::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: 0.6s;
}

.profile:hover {
    border: 1px solid #ffffff;
    box-shadow: 0px 0px 10px #a5a8b4cc;
}

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

.profile:active {
    transform: translateY(1px);
    box-shadow: 0px 0px 5px #a5a8b496;
}

.mobile-profile {
    margin-top: 40px;
    text-align: center;
}

.mobile-profile .profile {
    width: 100%;
    max-width: 300px;
}

.hero {
    text-align: center;
    padding: 4rem 1rem;
    height: 100%;
    color: #fff;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: #8892b0;
    margin-bottom: 3rem;
}

.level-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

.level-card {
    background-color: #011C26;
    border-radius: 30px;
    padding: 1.5rem;
    width: 100%;
    text-align: center;
    border: 1px solid #1e3a61;
    max-height: 350px;
    font-size: 1.1em;
    cursor: pointer;
    transition: 0.15s;
}

.level-card:hover {
    border: 1px solid #dddddd;
    box-shadow: 0px 0px 10px #a5a8b4b4;
}

.code-sample {
    font-family: 'Consolas', 'Monaco', monospace;
    text-align: left;
    margin-bottom: 1rem;
    display: inline-block;
    color: #fff;
    white-space: pre-line;
}

.keyword {
    color: #ff79c6;
}

.function {
    color: #bd93f9;
}

.method {
    color: #8be9fd;
}

.string {
    color: #f1fa8c;
}

.variable {
    color: #ff5555;
}

.level-title {
    font-weight: bold;
    margin-top: 1rem;
    color: #fff;
}

.level-description {
    color: #8892b0;
    font-size: 0.9rem;
}

.dropdown-icon {
    font-size: 0.8rem;
    margin-left: 5px;
}

footer {
    text-align: center;
    color: #B5B7BA;
    font-size: 14px;
    padding: 20px;
}

@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    .profile {
        display: none;
    }

    .mobile-profile > .profile {
        display: block;
        margin: auto;
    }

    nav {
        justify-content: space-between;
    }
  
    nav ul {
        justify-content: center;
        padding: 10px 0;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .level-title {
        font-size: 1.1rem;
    }

    p.level-description {
        font-size: 1rem;
    }
}
  
@media (max-width: 576px) {
    nav ul {
        gap: 10px;
    }
      
    nav ul li a {
        font-size: 16px;
        padding: 0.5rem;
        text-align: center;
    }
      
    .profile {
        width: 120px;
        padding: 8px 15px;
        font-size: 14px;
    }
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #011C26 0%, #00080D 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: #012E40;
    border-radius: 10px;
    border: 2px solid #00080D;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #01475F;
}

* {
    scrollbar-color: #012E40 #00080D;
}
