.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 0 5px 2px #37bef8d1;
    z-index: 1000;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.nav__list {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav__link {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.nav__link:hover,
.nav__link:focus {
    color: #37BDF8;
    text-decoration: none;
}

.nav__link.active {
    color: #37BDF8;
    text-decoration: underline;
}

.theme-toggle__button {
    background-color: transparent;
    font-size: 1rem;
    padding: 0.1rem 1.2rem;
    border: 2px solid #37BDF8;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    gap: 1rem;
}

.theme-toggle__button:hover {
    background-color: #37BDF8;
}

.theme-toggle__button:focus {
    outline: none;
    box-shadow: 0 0 5px 2px #37bef8d1;
}

.theme-toggle__button #theme-icon {
    font-size: 1rem;
}

@media (min-width: 1024px) {
    .nav__link {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .nav__list {
        gap: 1.5rem;
    }

    .nav__link {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .nav__list {
        gap: 0.5rem;
    }

    .nav__link {
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .nav {
        padding: 0.5rem 0;
    }

    .nav__theme-toggle {
        font-size: 0.9rem;
        padding: 0.3rem 0.8rem;
        border-radius: 15px;
        margin-top: 0.5rem;
    }

    .nav__list {
        gap: 1rem;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.25rem;
        padding: 0;
        margin: 0;
        text-align: center;
    }

    .nav__link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        text-align: center;
    }

    .nav__link.active {
        font-size: 1rem;
    }
}
