:root {
    --han-ink: #0f172a;
    --han-muted: #64748b;
    --han-brand: #6d28d9;
    --han-brand-dark: #4c1d95;
    --han-accent: #14b8a6;
    --han-surface: #ffffff;
    --han-line: #e2e8f0;
    --han-bg: #f8fafc;
}

body {
    color: var(--han-ink);
    background: var(--han-bg);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.header {
    padding: 12px 0;
    border-bottom: 1px solid rgba(226, 232, 240, .9);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 14px rgba(15, 23, 42, .04);
}

.kk-navbar { min-height: 48px; }

.navbar-brand,
.kk-brand {
    color: var(--han-ink) !important;
    font-weight: 800;
    letter-spacing: -.03em;
}

.kk-brand { display: inline-flex; gap: 10px; align-items: center; font-size: 20px; }
.kk-brand img { width: 35px; height: 35px; border-radius: 10px; }
.kk-search .form-control { min-width: 190px; border-color: var(--han-line); }
.kk-search .btn { border: 0; background: var(--han-brand); }
.kk-search .btn:hover { background: var(--han-brand-dark); }

.navbar .nav-link {
    color: #475569 !important;
    font-weight: 600;
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
    color: var(--han-brand) !important;
}

.han-hero {
    position: relative;
    overflow: hidden;
    padding: 76px 0 64px;
    color: #fff;
    background:
        radial-gradient(circle at 77% 14%, rgba(129, 140, 248, .48), transparent 30%),
        radial-gradient(circle at 16% 88%, rgba(45, 212, 191, .22), transparent 30%),
        linear-gradient(125deg, #111827 0%, #312e81 48%, #6d28d9 130%);
}

.han-hero:after {
    position: absolute;
    right: -58px;
    bottom: -96px;
    width: 310px;
    height: 310px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    content: "";
}

.han-eyebrow {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 7px 12px;
    color: #dbeafe;
    border: 1px solid rgba(191, 219, 254, .28);
    border-radius: 999px;
    background: rgba(15, 23, 42, .25);
    font-size: 13px;
    font-weight: 700;
}

.han-hero h1 {
    max-width: 720px;
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 850;
    letter-spacing: -.055em;
    line-height: 1.12;
}

.han-hero p {
    max-width: 600px;
    margin-bottom: 26px;
    color: #dbeafe;
    font-size: 17px;
    line-height: 1.8;
}

.han-button-primary,
.han-button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 10px;
    font-weight: 750;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.han-button-primary {
    color: #0f172a;
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .22);
}

.han-button-ghost {
    margin-left: 10px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .36);
}

.han-button-primary:hover,
.han-button-ghost:hover {
    color: inherit;
    transform: translateY(-2px);
}

.han-trust-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 36px;
}

.han-trust-item {
    min-height: 86px;
    padding: 15px;
    border: 1px solid rgba(191, 219, 254, .23);
    border-radius: 14px;
    background: rgba(15, 23, 42, .2);
}

.han-trust-item strong,
.han-trust-item span {
    display: block;
}

.han-trust-item strong { font-size: 15px; }
.han-trust-item span { margin-top: 5px; color: #bfdbfe; font-size: 12px; }

.notice .card {
    margin-top: 28px !important;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.notice .jumbotron { margin: 0; background: transparent; }
.notice h4 { color: var(--han-brand); font-size: 15px; font-weight: 800; }
.notice .lead { margin-bottom: 0; color: #475569; font-size: 14px; }

.category { padding: 56px 0 28px; }
.category h3 { font-size: 28px; font-weight: 800; letter-spacing: -.04em; }
.category .lead { color: var(--han-muted); font-size: 15px; }
.separator { width: 44px; height: 4px; border: 0; border-radius: 999px; background: #bfdbfe; }
.separator:after { width: 100%; height: 4px; border-radius: 999px; top: 0; left: 0; background: var(--han-brand); }

.category-menus .btn {
    border: 1px solid var(--han-line);
    border-radius: 999px;
    color: #475569;
    background: #fff;
    font-size: 14px;
    font-weight: 650;
}

.category-menus .btn.active,
.category-menus .btn:hover {
    border-color: var(--han-brand);
    color: #fff;
    background: var(--han-brand);
}

.han-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 24px;
}

.han-product-grid > .col {
    width: auto;
    min-width: 0;
    padding: 0;
}

.goods-list .card {
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--han-line);
    border-radius: 15px;
    background: var(--han-surface);
    box-shadow: 0 4px 16px rgba(15, 23, 42, .035);
    transition: transform .22s ease, box-shadow .22s ease;
}

.goods-list .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, .12);
}

.goods-list .card-img-top {
    height: 150px;
    object-fit: cover;
    background: #e2e8f0;
}

.goods-list .card-body { display: flex; flex-direction: column; padding: 16px; }
.goods-list .card-title {
    display: -webkit-box;
    min-height: 40px;
    overflow: hidden;
    color: var(--han-ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: normal !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.goods-list .badge { z-index: 1; margin: 10px; border-radius: 999px; box-shadow: 0 3px 9px rgba(15, 23, 42, .12); }
.goods-list .btn-outline-success { border-color: #bbf7d0; color: #15803d; background: #f0fdf4; }
.goods-list .btn-primary { margin-top: auto; border: 0; border-radius: 8px; background: var(--han-brand); font-size: 13px; font-weight: 700; }
.goods-list .btn-primary:hover { background: var(--han-brand-dark); }

.footer { margin-top: 44px; padding: 26px !important; color: #64748b; border-top: 1px solid var(--han-line); background: #fff; font-size: 13px; }
.footer .author a { color: var(--han-brand); text-decoration: none; }

.manual-pay-card { border: 1px solid var(--han-line); border-radius: 18px; box-shadow: 0 18px 42px rgba(15, 23, 42, .10); }
.manual-pay-badge { display: inline-block; padding: 5px 12px; border-radius: 999px; color: #1d4ed8; background: #dbeafe; font-size: 12px; font-weight: 800; }
.manual-pay-amount { margin: 12px 0 20px; color: var(--han-brand); font-size: 34px; font-weight: 800; }
.manual-pay-qr { width: min(100%, 270px); padding: 10px; border: 1px solid var(--han-line); border-radius: 12px; background: #fff; }
.manual-pay-order { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; background: #f8fafc; text-align: left; }
.manual-pay-order span { color: #64748b; }
.manual-pay-order strong { color: var(--han-ink); word-break: break-all; }

@media (max-width: 767px) {
    .header {
        padding: 8px 0;
    }

    .navbar-brand {
        font-size: 18px;
    }

    .kk-brand { gap: 8px; font-size: 18px; }
    .kk-brand img { width: 32px; height: 32px; }

    .navbar-collapse {
        margin-top: 10px;
        padding: 10px 0 2px;
        border-top: 1px solid var(--han-line);
    }

    .navbar .nav-link {
        padding: 10px 0;
    }

    .navbar .d-flex {
        margin-top: 8px;
    }

    .kk-search .form-control { min-width: 0; }

    .navbar .form-control {
        min-height: 40px;
    }

    .han-hero { padding: 54px 0 48px; }
    .han-hero h1 { font-size: 36px; }
    .han-trust-row { grid-template-columns: 1fr; }
    .han-button-ghost { margin-top: 10px; margin-left: 0; }
    .notice .card-body { padding: 14px; }
    .category { padding: 38px 0 20px; }
    .category h3 { font-size: 24px; }
    .category-menus .nav { flex-wrap: nowrap; justify-content: flex-start !important; overflow-x: auto; padding-bottom: 8px; }
    .category-menus li { flex: 0 0 auto; }
    .goods-list { margin-bottom: 16px !important; }
    .han-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .goods-list .card-img-top { height: 122px; }
    .goods-list .card-body { padding: 12px; }
    .goods-list .card-title { min-height: 40px; font-size: 14px; }
    .goods-list .btn-primary { float: none !important; width: 100%; margin-top: 12px; }
    .manual-pay-card { margin-top: 20px !important; }
    .manual-pay-amount { font-size: 30px; }
    .manual-pay-order { align-items: flex-start; flex-direction: column; }
}
