* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #050608;
    --panel: rgba(255, 255, 255, 0.075);
    --panel-strong: rgba(255, 255, 255, 0.12);
    --line: rgba(255, 255, 255, 0.16);
    --text: #f7f8fa;
    --muted: rgba(247, 248, 250, 0.68);
    --blue: #16c8ff;
    --teal: #14b8a6;
    --green: #55ffb2;
    --yellow: #f5c400;
    --red: #ff4d4d;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

html {
    scroll-behavior: smooth;
    background:
        radial-gradient(circle at 12% 18%, rgba(22, 200, 255, 0.18), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(85, 255, 178, 0.13), transparent 28%),
        radial-gradient(circle at 50% 92%, rgba(245, 196, 0, 0.10), transparent 30%),
        linear-gradient(135deg, #050608 0%, #0b1018 48%, #050608 100%);
    background-color: #050608;
    background-attachment: fixed;
}

body {
    min-height: 100vh;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at 12% 18%, rgba(22, 200, 255, 0.18), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(85, 255, 178, 0.13), transparent 28%),
        radial-gradient(circle at 50% 92%, rgba(245, 196, 0, 0.10), transparent 30%),
        linear-gradient(135deg, #050608 0%, #0b1018 48%, #050608 100%);
    background-color: #050608;
    background-attachment: fixed;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 70px 70px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 78%);
    z-index: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-wrap {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.glass {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.topbar {
    position: sticky;
    top: 18px;
    z-index: 50;
    margin: 18px auto 0;
    padding: 14px 16px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--blue), var(--green));
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 0 34px rgba(22, 200, 255, 0.25);
}

.brand-mark img {
    width: 80%;
    height: 80%;
    object-fit: cover;
    display: block;
}

.mobile-page-label {
    display: none;
}

.brand-text h1 {
    font-size: 17px;
    line-height: 1.05;
    letter-spacing: 0.5px;
}

.brand-text p {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 2px;
    margin-top: 3px;
}

.mobile-menu-btn {
    display: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 40px;
    transition: 0.28s;
}

.nav-links a:hover,
body:not(.home-page) .nav-links a.active {
    color: #00131a;
    background: var(--green);
}

.nav-links a i {
    display: none;
}

.nav-cta {
    border: 1px solid rgba(85, 255, 178, 0.38);
    background: rgba(85, 255, 178, 0.08);
    color: var(--green) !important;
}

.nav-cta:hover {
    color: #00131a !important;
    background: var(--green) !important;
}

.mobile-nav-divider,
.mobile-email-btn,
.mobile-changelog-btn,
.mobile-admin-btn {
    display: none;
}

.page-hero {
    padding: 88px 0 36px;
    text-align: center;
}

.section-tag {
    color: var(--green);
    font-size: 12px;
    letter-spacing: 3px;
    font-weight: 700;
    margin-bottom: 14px;
}

.page-hero h2 {
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: -3px;
    margin-bottom: 18px;
}

.page-hero h2 span {
    color: transparent;
    background: linear-gradient(90deg, var(--blue), var(--green), var(--yellow));
    -webkit-background-clip: text;
    background-clip: text;
}

.page-hero p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    transition: 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--green));
    color: #00131a;
    box-shadow: 0 12px 36px rgba(22, 200, 255, 0.25);
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-4px);
}

footer {
    padding: 32px 0 42px;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
}

footer a {
    color: var(--green);
    font-weight: 600;
}

footer a:hover {
    color: var(--blue);
}

footer a:last-child {
    opacity: 0.7;
}

footer a:last-child:hover {
    opacity: 1;
}

.footer-hide {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(12px) !important;
}

.go-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    color: #00131a;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(22, 200, 255, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: 0.28s;
    z-index: 99;
}

.go-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.visitor-badge {
    position: fixed;
    left: 22px;
    bottom: 22px;
    height: auto;
    min-height: 46px;
    width: auto;
    min-width: 78px;
    padding: 9px 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    border-radius: 16px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    z-index: 99;
    overflow: hidden;
    cursor: pointer;
    transition: 0.28s ease;
}

.visitor-badge i {
    color: var(--green);
    font-size: 14px;
    flex: 0 0 auto;
}

.visitor-label {
    opacity: 0;
    max-width: 0;
    white-space: nowrap;
    overflow: hidden;
    transition: 0.28s ease;
}

@media (hover: hover) {
    .visitor-badge:hover {
        width: auto;
    }

    .visitor-badge:hover .visitor-label {
        opacity: 1;
        max-width: 120px;
    }
}

.visitor-badge.open {
    width: auto;
}

.visitor-badge.open .visitor-label {
    opacity: 1;
    max-width: 120px;
}

.visitor-line {
    display: flex;
    align-items: center;
    min-height: 16px;
    gap: 8px;
    white-space: nowrap;
}

.visitor-line i {
    color: var(--green);
    font-size: 12px;
    width: 14px;
}

.visitor-line .visitor-label {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: 0.28s ease;
}

.visitor-badge.open .visitor-label {
    opacity: 1;
    max-width: 120px;
}

@media (hover: hover) {
    .visitor-badge:hover .visitor-label {
        opacity: 1;
        max-width: 120px;
    }
}

.fade-item {
    opacity: 0;
    transform: translateY(34px);
    transition: 0.8s ease;
}

.fade-item.show {
    opacity: 1;
    transform: translateY(0);
}

.pixel-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.pixel-shard {
    position: absolute;
    bottom: -40px;
    background: linear-gradient(135deg, rgba(22, 200, 255, 0.75), rgba(85, 255, 178, 0.55));
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 18px rgba(22, 200, 255, 0.22);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: floatShard ease-out forwards;
}

@keyframes floatShard {
    from {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }

    12% {
        opacity: 1;
    }

    to {
        transform: translateY(-115vh) translateX(var(--drift)) rotate(var(--rotate));
        opacity: 0;
    }
}

img {
    -webkit-user-drag: none;
    user-select: none;
}

@media (max-width: 720px) {
    .site-wrap {
        width: min(100% - 24px, 1180px);
    }

    .topbar {
        top: 10px;
        border-radius: 24px;
        display: grid;
        grid-template-columns: auto auto;
        align-items: center;
        gap: 12px;
        position: sticky;
        z-index: 9999;
        overflow: visible;

        background: transparent;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .topbar::before {
        content: '';
        position: absolute;
        inset: 0;
        height: 100%;
        border-radius: 24px;
        background: var(--panel);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
        backdrop-filter: blur(22px);
        -webkit-backdrop-filter: blur(22px);
        z-index: -1;
        transition: height 0.28s ease;
    }

    .topbar.menu-open::before {
        height: var(--menu-height, 100%);
    }

    .mobile-page-label {
        display: block;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 0.3px;
        color: var(--text);
    }

    .brand-text {
        display: none;
    }

    .mobile-menu-btn {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        border: none;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.08);
        color: var(--text);
        font-size: 22px;
        cursor: pointer;
        justify-self: end;
    }

    .brand,
    .mobile-menu-btn {
        position: relative;
        z-index: 2;
    }

    .nav-links {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;

        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        padding-top: 12px;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-6px);
        transition: 0.25s ease;
    }

    .nav-links.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links a {
        min-height: 58px;
        padding: 8px 4px;
        border-radius: 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        font-size: 9.5px;
        text-align: center;
        white-space: normal;

        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.10);
    }

    .nav-links a i {
        display: block;
        font-size: 15px;
        margin-bottom: 5px;
    }

    .mobile-nav-divider {
        display: block;
        grid-column: 1 / -1;
        height: 1px;
        background: rgba(255, 255, 255, 0.12);
        margin: 6px 0 4px;
    }

    .mobile-changelog-btn {
        display: flex;
    }

    .mobile-admin-btn {
        display: flex;
    }

    .mobile-email-btn,
    .mobile-contact-btn {
        min-height: 58px;
        grid-column: span 1;
    }

    .mobile-email-btn {
        display: flex;
    }

    .mobile-contact-btn {
        display: flex;
    }

    .page-hero {
        padding: 54px 0 28px;
    }

    .btn {
        width: 100%;
    }

    .go-top {
        width: 40px;
        height: 40px;
        border-radius: 14px;
        right: 16px;
        bottom: 16px;
    }

    .go-top i {
        font-size: 13px;
    }

    .visitor-badge {
        left: 16px;
        bottom: 16px;
        height: auto;
        width: auto;
        min-height: 54px;
        min-width: 70px;
        padding: 0 12px;
        gap: 5px;
        border-radius: 14px;
        font-size: 12px;
    }

    .visitor-badge.open {
        width: auto;
    }
}