body {
    background-color: #071018;
    background-image: url("../images/bg-new.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--light-text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 2.5rem 0 3rem;
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.header {
    position: sticky;
    top: 16px;
    z-index: 1000;
    isolation: isolate;
    width: min(1180px, calc(100% - 1.5rem));
    margin: 16px auto 0;
    padding: 0.65rem 0.75rem 0.65rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.header::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--glass);
    backdrop-filter: blur(18px);
    z-index: -1;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-image,
.logo img {
    height: 44px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.logo span {
    color: var(--light-text-primary);
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.03em;
}

.hamburger {
    display: none;
    position: relative;
    z-index: 1002;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--light-text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 560;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #041018;
    background: linear-gradient(135deg, #67e8f9, #a5b4fc);
}

.alert {
    background: var(--glass-strong);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    margin: 1rem auto;
    max-width: 800px;
    color: var(--light-text-primary);
    backdrop-filter: blur(16px);
}

.alert-success {
    border-left: 3px solid #34d399;
}

.alert-danger {
    border-left: 3px solid #fb7185;
}

footer {
    width: min(1180px, calc(100% - 1.5rem));
    margin: 0 auto 18px;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: 999px;
    backdrop-filter: blur(18px);
    color: var(--light-text-secondary);
}

footer p {
    margin: 0;
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--light-text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--accent-purple);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container--narrow {
    max-width: 800px;
}

@media (min-width: 769px) {
    .nav {
        display: flex;
    }
}

@media (max-width: 768px) {
    .header {
        border-radius: 22px;
        top: 10px;
    }

    .logo span {
        font-size: 0.95rem;
    }

    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        inset: 0;
        z-index: 1001;
        background: rgba(4, 10, 18, 0.9);
        display: none;
        align-items: center;
        justify-content: center;
    }

    .nav.active {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .nav-links a {
        font-size: 1.15rem;
        padding: 0.8rem 1.4rem;
    }

    footer {
        flex-direction: column;
        border-radius: 22px;
        text-align: center;
    }
}
