:root {
    --bg-dark: #08111d;
    --bg-mid: #13273f;
    --panel: rgba(8, 17, 29, 0.76);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text: #f6f8fd;
    --muted: #d0daea;
    --saffron: #ff9736;
    --green: #1fca71;
    --glow: rgba(255, 151, 54, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 151, 54, 0.95) rgba(255, 255, 255, 0.08);
}

::-webkit-scrollbar {
    width: 14px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--saffron), var(--green));
    border-radius: 999px;
    border: 3px solid rgba(3, 8, 15, 0.9);
}

body {
    min-height: 100vh;
    color: var(--text);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(255, 151, 54, 0.18), transparent 28%),
        radial-gradient(circle at left center, rgba(31, 202, 113, 0.14), transparent 24%),
        linear-gradient(135deg, #03070d, var(--bg-dark), var(--bg-mid));
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(3, 8, 15, 0.84);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.logo {
    width: 54px;
    height: 54px;
    border-radius: 16px;
}

.brand-text strong {
    display: block;
    letter-spacing: 0.08em;
}

.brand-text span {
    color: var(--muted);
    font-size: 0.84rem;
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

.menu-toggle.active {
    transform: rotate(90deg) scale(1.08);
    color: var(--saffron);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
    background: linear-gradient(90deg, var(--saffron), #ffffff, var(--green));
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.page-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
}

.hero {
    padding: 62px 0 34px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
    align-items: center;
}

.hero-copy,
.hero-media,
.panel,
.gallery-card,
.shop-card,
.code-card,
.diagram-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.hero-copy {
    border-radius: 30px;
    padding: 34px;
}

.eyebrow {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #ffe7d0;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(2.25rem, 5vw, 4rem);
    line-height: 1.08;
    margin-bottom: 14px;
}

.hero h1 span,
.section-title span {
    color: var(--saffron);
}

.hero p,
.panel p,
.panel li,
.shop-card li,
.code-card p {
    color: var(--muted);
    line-height: 1.72;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 24px;
}

.btn,
.btn-secondary,
.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 13px 21px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.btn,
.copy-btn {
    color: #07111f;
    background: linear-gradient(135deg, var(--saffron), #ffd166);
    box-shadow: 0 12px 28px var(--glow);
}

.btn-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn:hover,
.btn-secondary:hover,
.copy-btn:hover {
    transform: translateY(-2px);
}

.hero-media {
    border-radius: 30px;
    overflow: hidden;
}

.hero-media img {
    width: 100%;
    min-height: 420px;
    object-fit: cover;
}

.section {
    padding: 18px 0 52px;
}

.section-head {
    margin-bottom: 22px;
}

.section-title {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    margin-bottom: 10px;
}

.highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.panel {
    border-radius: 28px;
    padding: 26px;
}

.panel h3,
.gallery-card h3,
.shop-card h3,
.diagram-card h3,
.code-card h3 {
    font-size: 1.26rem;
    margin-bottom: 12px;
}

.two-column {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
}

.slider-wrap,
.stack {
    display: grid;
    gap: 20px;
}

.gallery-card,
.shop-card,
.diagram-card,
.code-card {
    border-radius: 28px;
    padding: 24px;
}

.slider {
    overflow: hidden;
    position: relative;
    border-radius: 24px;
}

.slides {
    display: flex;
    transition: transform 0.45s ease;
}

.slides img {
    width: 100%;
    flex: 0 0 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    cursor: pointer;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.48);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
}

.slider-btn.prev {
    left: 12px;
}

.slider-btn.next {
    right: 12px;
}

.gallery-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.gallery-strip img {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 16px;
    cursor: pointer;
    opacity: 0.88;
}

.diagram-card img {
    border-radius: 20px;
    margin-bottom: 18px;
    background: white;
}

.list,
.shop-list,
.steps {
    padding-left: 18px;
}

.list li + li,
.shop-list li + li,
.steps li + li {
    margin-top: 10px;
}

.shop-list a {
    color: #9ad8ff;
    text-decoration: none;
}

.shop-list a:hover {
    text-decoration: underline;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: #f2f6fd;
    overflow: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 16px 0;
}

.popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 100;
}

.popup.visible {
    display: flex;
}

.popup img {
    max-width: min(1100px, 100%);
    max-height: 90vh;
    border-radius: 18px;
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
}

.footer {
    padding: 30px 16px 36px;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 28px;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

.reveal-up {
    opacity: 0;
    transform: translateY(32px) scale(0.98);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-up.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.notify-banner {
    position: fixed;
    right: 24px;
    bottom: 26px;
    z-index: 60;
    width: min(380px, calc(100% - 24px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 18px 18px 20px;
    border-radius: 24px;
    background: rgba(6, 14, 24, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 45px rgba(0, 0, 0, 0.34);
    animation: fireToastIn 0.45s ease;
}

.notify-banner.is-disabled {
    border-color: rgba(255, 151, 54, 0.36);
}

.notify-copy strong {
    display: block;
    margin-bottom: 4px;
}

.notify-copy p {
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.92rem;
}

.notify-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notify-btn {
    border: 0;
    cursor: pointer;
}

.notify-allow {
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 700;
    color: #0a1320;
    background: linear-gradient(135deg, var(--saffron), #ffd166);
}

.notify-allow:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}

.notify-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 1.3rem;
}

.scroll-orb {
    position: fixed;
    right: 28px;
    bottom: 126px;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 151, 54, 0.95), rgba(31, 202, 113, 0.95));
    color: #08111d;
    font-size: 1.7rem;
    cursor: pointer;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.28);
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(0.92);
    transition: opacity 0.28s ease, transform 0.28s ease;
    z-index: 45;
}

.scroll-orb.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.scroll-orb.to-top {
    background: linear-gradient(135deg, rgba(110, 210, 255, 0.96), rgba(255, 255, 255, 0.95));
}

.notify-fab {
    position: fixed;
    left: 24px;
    bottom: 28px;
    z-index: 58;
    padding: 14px 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 151, 54, 0.96), rgba(110, 210, 255, 0.96));
    color: #08111d;
    font-weight: 800;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.notify-fab:hover {
    transform: translateY(-2px);
}

.notify-fab.is-enabled {
    background: linear-gradient(135deg, rgba(31, 202, 113, 0.96), rgba(255, 255, 255, 0.96));
}

.notify-fab.is-disabled {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.notify-fab.is-hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes fireToastIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 980px) {
    .hero-grid,
    .highlights,
    .two-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .menu-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(3, 8, 15, 0.97);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-16px) scale(0.98);
        transform-origin: top;
        transition: max-height 0.32s ease, opacity 0.32s ease, transform 0.32s ease;
    }

    .nav-links.active {
        max-height: 320px;
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    .nav-links a {
        padding: 16px;
        text-align: center;
    }

    .nav-links a::after {
        display: none;
    }

    .hero,
    .section {
        padding-top: 28px;
    }

    .hero-copy,
    .gallery-card,
    .shop-card,
    .diagram-card,
    .code-card,
    .panel {
        padding: 20px;
    }

    .hero-media img {
        min-height: 270px;
    }

    .gallery-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .notify-banner {
        right: 10px;
        left: 10px;
        bottom: 16px;
        width: auto;
        gap: 14px;
        padding: 16px;
    }

    .scroll-orb {
        right: 18px;
        bottom: 116px;
        width: 52px;
        height: 52px;
        font-size: 1.45rem;
    }

    .notify-fab {
        left: 14px;
        bottom: 18px;
        padding: 13px 18px;
        font-size: 0.92rem;
    }
}
