:root {
    --navy: #07152f;
    --blue: #2563eb;
    --cyan: #19d3ff;
    --purple: #7c3aed;
    --ink: #0b1733;
    --muted: #64748b;
    --white: #fff;
}


/* =========================================
   SITE HEADER
========================================= */

.site-header {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    padding: 18px 0;
    transition: 0.35s ease;
}

.site-header.scrolled {
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}


/* =========================================
   NAV CONTAINER
========================================= */

.nav-container {
    width: min(1180px, calc(100% - 40px));
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* =========================================
   BRAND
========================================= */

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    display: block;
    width: 150px;
    height: auto;
    max-height: 45px;
    object-fit: contain;
}


/* =========================================
   NAV MENU
========================================= */

.nav-menu {
    display: flex;
    align-items: center;
    gap: 7px;
}

.nav-menu > a,
.mega-toggle {
    border: 0;
    background: none;

    color: rgba(255, 255, 255, 0.84);

    padding: 11px 14px;

    border-radius: 10px;

    font: 600 13px "Inter", sans-serif;

    text-decoration: none;

    cursor: pointer;

    transition: 0.25s;
}

.site-header.scrolled .nav-menu > a,
.site-header.scrolled .mega-toggle {
    color: var(--ink);
}

.nav-menu > a:hover,
.mega-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.site-header.scrolled .nav-menu > a:hover,
.site-header.scrolled .mega-toggle:hover {
    background: #eff6ff;
    color: var(--blue);
}


/* =========================================
   DROPDOWN MENU (MARKETPLACE AKUN)
========================================= */

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-toggle {
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.88);
    padding: 11px 14px;
    border-radius: 10px;
    font: 600 13px "Inter", sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: 0.25s ease;
}

.nav-dropdown-icon {
    font-size: 11px;
    transition: transform 0.25s ease;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.active .nav-dropdown-toggle,
.nav-dropdown:hover .nav-dropdown-toggle {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-dropdown:hover .nav-dropdown-icon,
.nav-dropdown.active .nav-dropdown-icon,
.nav-dropdown.open .nav-dropdown-icon {
    transform: rotate(180deg);
}

.site-header.scrolled .nav-dropdown-toggle {
    color: var(--ink);
}

.site-header.scrolled .nav-dropdown-toggle:hover,
.site-header.scrolled .nav-dropdown.active .nav-dropdown-toggle,
.site-header.scrolled .nav-dropdown:hover .nav-dropdown-toggle {
    background: #eff6ff;
    color: var(--blue);
}

/* Dropdown Menu Container (Desktop) */
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 320px;
    padding: 10px;
    background: rgba(7, 21, 47, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Open on hover / active desktop */
@media (min-width: 981px) {
    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown.active .nav-dropdown-menu,
    .nav-dropdown:focus-within .nav-dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    background: transparent;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(3px);
}

.dropdown-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.dropdown-item-icon.icon-buy {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(25, 211, 255, 0.3));
    color: #67e8f9;
    border: 1px solid rgba(103, 232, 249, 0.3);
}

.dropdown-item-icon.icon-sell {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(236, 72, 153, 0.3));
    color: #f472b6;
    border: 1px solid rgba(244, 114, 182, 0.3);
}

.dropdown-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.dropdown-item-title {
    font: 700 14px "Plus Jakarta Sans", sans-serif;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-item-desc {
    font: 400 11.5px/1.4 "Inter", sans-serif;
    color: #94a3b8;
}

.dropdown-item-arrow {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease, color 0.2s ease;
}

.nav-dropdown-item:hover .dropdown-item-arrow {
    transform: translateX(3px);
    color: #fff;
}

/* Light Scrolled Mode for Dropdown */
.site-header.scrolled .nav-dropdown-menu {
    background: #ffffff;
    border-color: rgba(226, 232, 240, 0.95);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.site-header.scrolled .dropdown-item-title {
    color: #0f172a;
}

.site-header.scrolled .dropdown-item-desc {
    color: #64748b;
}

.site-header.scrolled .nav-dropdown-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.site-header.scrolled .dropdown-item-arrow {
    color: #94a3b8;
}

.site-header.scrolled .nav-dropdown-item:hover .dropdown-item-arrow {
    color: var(--blue);
}


/* =========================================
   MEGA MENU WRAPPER
========================================= */

.mega-wrap {
    position: static;
}


/* =========================================
   MEGA MENU
========================================= */

.mega-menu {
    position: absolute;

    top: calc(100% - 2px);
    left: 50%;

    transform: translate(-50%, 10px);

    width: min(1100px, calc(100% - 40px));

    max-height: calc(100vh - 100px);

    padding: 22px;

    display: grid;

    grid-template-columns: 260px minmax(0, 1fr);

    gap: 24px;

    border: 1px solid rgba(255, 255, 255, 0.22);

    border-radius: 24px;

    background: rgba(8, 21, 47, 0.96);

    backdrop-filter: blur(25px);

    box-shadow:
        0 25px 80px rgba(2, 8, 23, 0.28);

    opacity: 0;

    visibility: hidden;

    overflow: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease,
        transform 0.3s ease;
}


/* Desktop hover */

.mega-wrap:hover .mega-menu {
    opacity: 1;
    visibility: visible;

    transform: translate(-50%, 0);
}


/* =========================================
   MEGA INTRO
========================================= */

.mega-intro {
    padding: 20px;

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            rgba(37, 99, 235, 0.25),
            rgba(124, 58, 237, 0.2)
        );

    border: 1px solid rgba(255, 255, 255, 0.1);

    align-self: start;
}

.mega-badge {
    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: 1.4px;

    color: #7dd3fc;
}

.mega-intro h3 {
    font:
        800 25px/1.2
        "Plus Jakarta Sans";

    color: #fff;

    margin: 15px 0 10px;
}

.mega-intro h3 span {
    color: #67e8f9;
}

.mega-intro p {
    font-size: 12px;

    line-height: 1.7;

    color: #b8c7df;

    margin: 0 0 20px;
}

.mega-intro > a {
    color: #fff;

    text-decoration: none;

    font-size: 12px;

    font-weight: 700;
}


/* =========================================
   MEGA COLUMNS AREA
========================================= */

.mega-columns {
    min-width: 0;

    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 10px;

    max-height: calc(100vh - 144px);

    overflow-y: auto;

    padding-right: 8px;

    scrollbar-width: thin;

    scrollbar-color:
        rgba(103, 232, 249, 0.45)
        transparent;
}


/* Chrome / Edge / Safari */

.mega-columns::-webkit-scrollbar {
    width: 6px;
}

.mega-columns::-webkit-scrollbar-track {
    background: transparent;
}

.mega-columns::-webkit-scrollbar-thumb {
    background: rgba(103, 232, 249, 0.45);

    border-radius: 20px;
}

.mega-columns::-webkit-scrollbar-thumb:hover {
    background: rgba(103, 232, 249, 0.7);
}


/* =========================================
   MEGA COLUMN
========================================= */

.mega-column {
    padding: 10px;

    min-width: 0;
}

.mega-column h4 {
    font-size: 11px;

    letter-spacing: 0.8px;

    text-transform: uppercase;

    color: #67e8f9;

    margin:
        8px
        10px
        12px;

    display: flex;

    align-items: center;

    gap: 8px;
}

.mega-column h4 i {
    font-size: 14px;
}

.mega-column > a {
    display: block;

    color: #dbe7f7;

    text-decoration: none;

    font-size: 12px;

    line-height: 1.4;

    padding: 9px 10px;

    border-radius: 9px;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.mega-column > a:hover {
    background: rgba(255, 255, 255, 0.08);

    color: #fff;

    transform: translateX(4px);
}


/* =========================================
   NAV CTA
========================================= */

.nav-cta {
    background:
        linear-gradient(
            135deg,
            #2563eb,
            #7c3aed
        ) !important;

    color: #fff !important;

    padding: 12px 17px !important;

    box-shadow:
        0 8px 25px
        rgba(37, 99, 235, 0.22);
}

.nav-cta:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 30px
        rgba(37, 99, 235, 0.32) !important;
}


/* =========================================
   MOBILE TOGGLE
========================================= */

.nav-toggle {
    display: none;

    border: 0;

    background: none;

    width: 42px;
    height: 42px;

    cursor: pointer;
}

.nav-toggle span {
    display: block;

    height: 2px;
    width: 23px;

    background: #fff;

    margin: 5px auto;

    border-radius: 4px;

    transition: 0.25s;
}

.scrolled .nav-toggle span,
.site-header.scrolled .nav-toggle span {
    background: var(--ink);
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 980px) {

    .nav-toggle {
        display: block;
    }


    /* Mobile / Tablet Main Menu */

    .nav-menu {
        position: absolute;

        top: 75px;

        left: 20px;
        right: 20px;

        display: none;

        padding: 16px;

        border-radius: 20px;

        background: rgba(7, 21, 47, 0.97);

        box-shadow:
            0 25px 60px
            rgba(2, 8, 23, 0.25);

        align-items: stretch;

        flex-direction: column;

        max-height: calc(100vh - 90px);

        overflow-y: auto;
    }

    .nav-menu.open {
        display: flex;
    }

    /* Keep mobile drawer dark & high contrast regardless of scrolled state */
    .site-header.scrolled .nav-menu {
        background: rgba(7, 21, 47, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    }

    .nav-menu > a,
    .site-header.scrolled .nav-menu > a,
    .mega-toggle,
    .site-header.scrolled .mega-toggle {
        width: 100%;
        text-align: left;
        color: rgba(255, 255, 255, 0.88) !important;
        padding: 12px 14px;
        border-radius: 10px;
        font: 600 14px "Inter", sans-serif;
    }

    .nav-menu > a:hover,
    .site-header.scrolled .nav-menu > a:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
    }

    /* Mobile Dropdown Menu */
    .nav-dropdown {
        width: 100%;
        display: block;
    }

    .nav-dropdown-toggle,
    .site-header.scrolled .nav-dropdown-toggle {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 14px;
        color: rgba(255, 255, 255, 0.92) !important;
        border-radius: 10px;
        font: 600 14px "Inter", sans-serif;
        background: none;
        border: 0;
        cursor: pointer;
    }

    .nav-dropdown-toggle:hover,
    .nav-dropdown.open .nav-dropdown-toggle,
    .site-header.scrolled .nav-dropdown-toggle:hover,
    .site-header.scrolled .nav-dropdown.open .nav-dropdown-toggle {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
    }

    .nav-dropdown.open .nav-dropdown-icon {
        transform: rotate(180deg);
    }

    .nav-dropdown-menu,
    .site-header.scrolled .nav-dropdown-menu {
        position: static !important;
        width: 100% !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        box-shadow: none !important;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.08) !important;
        margin: 4px 0 8px !important;
        padding: 6px !important;
        display: none;
        flex-direction: column;
        gap: 4px;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: flex !important;
    }

    .nav-dropdown-item,
    .site-header.scrolled .nav-dropdown-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        border-radius: 10px;
        text-decoration: none;
        background: transparent !important;
        border: 1px solid transparent !important;
    }

    .nav-dropdown-item:hover,
    .site-header.scrolled .nav-dropdown-item:hover {
        background: rgba(255, 255, 255, 0.08) !important;
        border-color: rgba(255, 255, 255, 0.12) !important;
    }

    .dropdown-item-title,
    .site-header.scrolled .dropdown-item-title {
        color: #fff !important;
        font: 700 13.5px "Plus Jakarta Sans", sans-serif;
    }

    .dropdown-item-desc,
    .site-header.scrolled .dropdown-item-desc {
        color: #94a3b8 !important;
        font: 400 11.5px "Inter", sans-serif;
    }

    /* Mega Wrapper */
    .mega-wrap {
        width: 100%;
    }


    /* Mobile Mega Menu */

    .mega-menu {
        position: static;

        width: 100%;

        transform: none !important;

        margin-top: 5px;

        padding: 12px;

        display: none;

        grid-template-columns: 1fr;

        max-height: none;

        overflow: visible;

        opacity: 1;

        visibility: visible;

        border-radius: 16px;

        box-shadow: none;
    }

    .mega-wrap.open .mega-menu {
        display: grid;
    }


    /* Hide Intro */

    .mega-intro {
        display: none;
    }


    /* Mobile Columns */

    .mega-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        max-height: 55vh;

        overflow-y: auto;

        padding-right: 5px;
    }


    .nav-cta {
        text-align: center !important;

        margin-top: 5px;
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .nav-container {
        width: calc(100% - 28px);
    }


    .site-header {
        padding: 12px 0;
    }


    .nav-menu {
        top: 65px;

        left: 14px;
        right: 14px;

        max-height: calc(100vh - 78px);

        padding: 12px;
    }


    .mega-columns {
        grid-template-columns: 1fr;

        max-height: 60vh;

        overflow-y: auto;
    }


    .mega-menu {
        padding: 8px;
    }


    .mega-column {
        padding: 6px;
    }


    .mega-column h4 {
        margin:
            8px
            8px
            10px;
    }


    .mega-column > a {
        padding: 8px;
    }
}