* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Segoe UI, Arial
}

:root {
    --bg: #07090f;
    /* hitam gelap */
    --panel: #0f1420;
    /* biru gelap */
    --panel2: #0b0e17;
    /* lebih hitam */

    --accent: #3b5cff;
    /* biru arcane */
    --accent2: #8b5a2b;
    /* coklat gold */

    --textSoft: #9aa4d6;
    --border: #1a2238;
    /* biru gelap border */
}


body {
    color: white;
    background:
        radial-gradient(circle at 20% 10%, rgba(59, 92, 255, 0.08), transparent 40%),
        radial-gradient(circle at 80% 30%, rgba(139, 90, 43, 0.10), transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(59, 92, 255, 0.06), transparent 50%),
        #07090f;
    color: white;
}

.menu li.active a::before {
    background: linear-gradient(#5b7cff, #3b5cff);
    box-shadow: 0 0 10px rgba(59, 92, 255, 0.7);
}

.buybtn,
.checkout-btn {
    background: linear-gradient(180deg, #8b5a2b, #5a3a1c);
    box-shadow: 0 0 12px rgba(139, 90, 43, 0.35);
}

.buybtn:hover,
.checkout-btn:hover {
    background: linear-gradient(180deg, #a06b35, #6b4522);
}

.sidebar,
.list-head,
.row,
.buy-card,
.checkout-box {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
        linear-gradient(180deg, #0f1420, #0b0e17);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 1px rgba(59, 92, 255, 0.08);
}


/* HEADER */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: #0c1122;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 10;
}

.logo {
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent)
}

.search {
    width: 420px;
    padding: 10px;
    border-radius: 8px;
    background: #0f1426;
    border: 1px solid var(--border);
    color: white
}

/* HERO */
.hero {
    margin-top: 70px;
    height: 260pxpx;
    background: url("../images/demon.jpg") center/cover;
    display: flex;
    align-items: end;
    padding: 40px;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, #0b0f1c 80%)
}

.hero h1 {
    position: relative;
    font-size: 48px
}

/* LAYOUT */
.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    padding: 40px
}

/* SIDEBAR */
.sidebar {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;

    position: sticky;
    top: 100px;

    /* INI YANG PENTING */
    max-height: calc(100vh - 120px);
    /* tinggi layar - header & padding */
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar h3 {
    margin-bottom: 14px;
    color: var(--accent)
}

/* Scrollbar sidebar */
.sidebar::-webkit-scrollbar {
    width: 7px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #1b2340;
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #2c3a78;
}


.sidebar a {
    display: block;
    padding: 10px 8px;
    color: var(--textSoft);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 6px
}

.sidebar a:hover,
.sidebar a.active {
    background: #1b2340;
    color: white
}

/* LIST */
.list {
    display: flex;
    flex-direction: column;
    gap: 14px
}

.row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 200px;
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 22px;
    cursor: pointer;
    transition: .2s;
}

.row:hover {
    border-color: var(--accent);
    transform: translateY(-2px)
}

.r-meta {
    font-size: 13px;
    color: var(--textSoft)
}

.r-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px
}

.r-right {
    text-align: right
}

.buybtn {
    background: var(--accent2);
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    color: white;
    cursor: pointer
}

.buybtn:hover {
    background: var(--accent)
}

/* MODAL */
.checkout {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999
}

.checkout.active {
    display: flex
}

.checkout-box {
    width: 1000px;
    max-width: 95%;
    background: linear-gradient(180deg, #12182b, #0f1424);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 30px;
    position: relative;
    animation: pop .25s ease;
}

@keyframes pop {
    from {
        transform: scale(.9);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

/* LEFT */
.co-left {
    max-height: 70vh;
    overflow-y: auto
}

.pd-title {
    font-size: 28px;
    margin-bottom: 10px
}

.pd-badges span {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-right: 6px;
    font-size: 12px;
    color: var(--accent)
}

.pd-desc {
    margin-top: 18px;
    color: var(--textSoft)
}

.review {
    border-top: 1px solid var(--border);
    padding: 12px 0;
    font-size: 14px;
    color: var(--textSoft)
}

/* RIGHT CARD */
.buy-card {
    background: #0c1122;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    position: sticky;
    top: 10px
}

.buy-card input {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    background: #0f1426;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: white
}

.quick {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap
}

.quick button {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--textSoft);
    cursor: pointer
}

.quick button:hover {
    border-color: var(--accent);
    color: white
}

/* DELIVERY */
.delivery {
    margin-top: 18px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.delivery-row {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent
}

.delivery-row:hover {
    background: #141c33;
    border-color: var(--border)
}

.delivery-row input {
    accent-color: var(--accent)
}

.d-main {
    font-size: 14px
}

.d-side {
    font-size: 12px;
    color: var(--textSoft)
}

.delivery-row.active {
    background: #1b2340;
    border-color: var(--accent)
}

.total {
    font-size: 20px;
    color: var(--accent);
    font-weight: 700;
    margin-top: 10px
}

.checkout-btn {
    margin-top: 18px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--accent2), var(--accent));
    color: white;
    font-weight: 700;
    cursor: pointer
}

.checkout-btn:hover {
    filter: brightness(1.1)
}

.co-close {
    position: absolute;
    top: 14px;
    right: 18px;
    cursor: pointer;
    font-size: 20px
}

@media(max-width:900px) {
    .layout {
        grid-template-columns: 1fr
    }

    .checkout-box {
        grid-template-columns: 1fr
    }

    .row {
        grid-template-columns: 1fr;
        text-align: left
    }

    .r-right {
        text-align: left
    }
}

/* ===== SIDEBAR DASHBOARD STYLE ===== */

.menu-group {
    margin-bottom: 22px;
}

.menu-title {
    font-size: 13px;
    letter-spacing: 1px;
    color: #6f7bc4;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.menu {
    list-style: none;
    padding: 0;
}

.menu li {
    border-radius: 10px;
    overflow: hidden;
}

.menu li a {
    display: block;
    padding: 11px 12px;
    color: var(--textSoft);
    text-decoration: none;
    transition: .18s;
    position: relative;
}

/* hover */
.menu li a:hover {
    background: #141c33;
    color: white;
    padding-left: 16px;
}

/* active item */
.menu li.active a {
    background: linear-gradient(90deg, #1b2340, #141c33);
    color: white;
    font-weight: 600;
}

/* left indicator bar */
.menu li.active a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 0 4px 4px 0;
}

/* ===== LIST HEADER (TOP FILTER PANEL) ===== */

.list-head {
    background: linear-gradient(180deg, #12182b, #0f1424);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 18px;
}

/* title */
.lh-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.lh-title h2 {
    font-size: 32px;
    font-weight: 700;
}

.lh-rating {
    color: var(--textSoft);
    font-size: 14px;
}

/* tags */
.lh-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.lh-tags span {
    padding: 6px 10px;
    background: #1b2340;
    border-radius: 20px;
    font-size: 12px;
    color: #b8c1ff;
}

/* controls row */
.lh-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* region buttons */
.region button,
.faction button {
    background: #141c33;
    border: 1px solid var(--border);
    color: var(--textSoft);
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
}

.region button.active {
    background: var(--accent);
    color: white;
}

/* server select */
.server {
    background: #0f1426;
    border: 1px solid var(--border);
    color: white;
    padding: 9px 12px;
    border-radius: 10px;
    min-width: 180px;
}

/* seller online */
.seller-online {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--textSoft);
    font-size: 14px;
}

.seller-online input {
    accent-color: var(--accent);
}

/* ================= MOBILE SIDEBAR ================= */

.menu-toggle {
    display: none;
    background: #141c33;
    border: 1px solid var(--border);
    color: white;
    font-size: 22px;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 14px;
}

/* overlay gelap */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    opacity: 0;
    pointer-events: none;
    transition: .25s;
    z-index: 19;
}

/* MOBILE MODE */
@media(max-width:900px) {

    .menu-toggle {
        display: block;
    }

    /* layout full */
    .layout {
        grid-template-columns: 1fr;
    }

    /* sidebar jadi drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 270px;
        max-height: none;
        border-radius: 0;
        z-index: 20;
        transform: translateX(-105%);
        transition: .28s cubic-bezier(.4, 0, .2, 1);
        box-shadow: 0 0 40px rgba(0, 0, 0, .6);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
}

/* ================= MOBILE UI SCALE ================= */
@media(max-width:900px) {

    body {
        font-size: 14px;
    }

    h1 {
        font-size: 28px !important;
    }

    h2 {
        font-size: 22px !important;
    }

    h3 {
        font-size: 16px !important;
    }

    .layout {
        padding: 18px;
        gap: 18px;
    }

    .list {
        gap: 10px;
    }
}

@media(max-width:900px) {

    .header {
        height: 60px;
        padding: 0 14px;
    }

    .logo {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .search {
        width: 100%;
        max-width: 180px;
        padding: 7px 10px;
        font-size: 13px;
    }

}

@media(max-width:900px) {

    .hero {
        height: 140px;
        padding: 18px;
    }

    .hero h1 {
        font-size: 26px;
    }

}

@media(max-width:900px) {

    .list-head {
        padding: 14px;
        border-radius: 14px;
    }

    .lh-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .lh-tags span {
        font-size: 11px;
        padding: 4px 8px;
    }

    .lh-controls {
        gap: 8px;
    }

    .server {
        min-width: unset;
        width: 100%;
    }

}

@media(max-width:900px) {

    .row {
        grid-template-columns: 1fr;
        padding: 14px;
        border-radius: 12px;
        gap: 8px;
    }

    .r-title {
        font-size: 15px;
        font-weight: 600;
    }

    .r-meta {
        font-size: 12px;
    }

    .r-seller {
        font-size: 13px;
    }

    .r-price {
        font-size: 18px;
    }

    .r-right {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 4px;
    }

    .buybtn {
        padding: 6px 12px;
        font-size: 13px;
    }

}

@media(max-width:900px) {

    .sidebar {
        padding: 16px;
    }

    .menu li a {
        padding: 12px 10px;
        font-size: 14px;
    }

    .menu-title {
        font-size: 11px;
    }

}