/* =============================================================
   xxs 布局：头部 / 导航 / 抽屉 / 底部
   ============================================================= */

/* ---------- 头部 ---------- */
.xs-header {
    position: sticky;
    top: 0;
    z-index: 800;
    background: rgba(10, 12, 17, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--xs-line);
    transition: background .2s ease, box-shadow .2s ease;
}
.xs-header.scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }

.xs-topbar {
    display: flex;
    align-items: center;
    gap: 22px;
    height: var(--xs-header-h);
}

.xs-logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.xs-logo-mark { width: 30px; height: 30px; color: var(--xs-gold); display: inline-flex; }
.xs-logo-mark svg { width: 100%; height: 100%; fill: currentColor; }
.xs-logo-text { font-size: 19px; font-weight: 700; letter-spacing: .5px; white-space: nowrap; }

/* 搜索 */
.xs-search {
    flex: 1;
    display: flex;
    align-items: center;
    max-width: 520px;
    margin: 0 auto;
    height: 40px;
    border-radius: 999px;
    background: var(--xs-bg-3);
    border: 1px solid var(--xs-line-2);
    padding: 0 6px 0 16px;
    gap: 8px;
}
.xs-search > svg { width: 18px; height: 18px; color: var(--xs-muted); flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; }
.xs-search-input { flex: 1; background: none; border: 0; outline: none; font-size: 14px; min-width: 0; }
.xs-search-btn {
    height: 30px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #1a140a;
    background: linear-gradient(135deg, var(--xs-gold-2), var(--xs-gold));
}

/* 操作区 */
.xs-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.xs-account { position: relative; }
.xs-account .login { display: flex; gap: 10px; align-items: center; }
.xs-login-btn { padding: 8px 18px; }
.xs-register-btn { padding: 8px 18px; }
.xs-account .isLogged img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1px solid var(--xs-line-2); }
.xs-account .suspend {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 130px;
    background: var(--xs-panel-2);
    border: 1px solid var(--xs-line-2);
    border-radius: var(--xs-r-sm);
    padding: 8px;
    box-shadow: var(--xs-shadow);
}
.xs-account .suspend a { display: block; padding: 8px 12px; border-radius: var(--xs-r-xs); font-size: 13.5px; }
.xs-account .suspend a:hover { background: var(--xs-panel-3); color: var(--xs-gold); }

/* 汉堡 */
.xs-burger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 9px; }
.xs-burger span { height: 2px; width: 100%; border-radius: 2px; background: var(--xs-text); transition: transform .25s ease, opacity .25s ease; }

/* 导航条 */
.xs-navbar { border-top: 1px solid var(--xs-line); }
.xs-navbar-inner { display: flex; align-items: center; }
.xs-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.xs-nav::-webkit-scrollbar { display: none; }
.xs-nav-link {
    padding: 11px 16px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--xs-text-2);
    white-space: nowrap;
    position: relative;
}
.xs-nav-link:hover { color: var(--xs-gold); }
.xs-nav-link.current { color: var(--xs-gold-2); }
.xs-nav-link.current::after {
    content: "";
    position: absolute;
    right: 16px;
    bottom: 0;
    left: 16px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--xs-gold-2), var(--xs-gold));
}

/* ---------- 抽屉遮罩 ---------- */
.xs-drawer-mask {
    position: fixed;
    inset: 0;
    z-index: 850;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
}
.xs-drawer-mask.open { opacity: 1; visibility: visible; }

/* ---------- 抽屉 ---------- */
.xs-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 860;
    width: min(82vw, 340px);
    background: var(--xs-bg-2);
    border-left: 1px solid var(--xs-line-2);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
}
.xs-drawer.open { transform: translateX(0); }
.xs-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--xs-line); font-weight: 700; }
.xs-drawer-head button { font-size: 26px; line-height: 1; color: var(--xs-muted); }
.xs-drawer-search { display: flex; gap: 8px; padding: 16px 20px; }
.xs-drawer-search input { flex: 1; padding: 9px 13px; border-radius: 999px; background: var(--xs-bg-3); border: 1px solid var(--xs-line-2); outline: none; min-width: 0; }
.xs-drawer-search button { padding: 9px 16px; border-radius: 999px; color: #1a140a; font-weight: 600; background: linear-gradient(135deg, var(--xs-gold-2), var(--xs-gold)); }
.xs-drawer-nav { padding: 6px 12px; flex: 1; }
.xs-drawer-nav a { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px; font-size: 15px; border-bottom: 1px solid var(--xs-line); }
.xs-drawer-nav a i { color: var(--xs-dim); font-style: normal; }
.xs-drawer-foot { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--xs-line); }
.xs-drawer-foot a { flex: 1; text-align: center; padding: 10px; border-radius: 999px; border: 1px solid var(--xs-line-2); font-size: 14px; }
.xs-drawer-foot a.gold { color: #1a140a; background: linear-gradient(135deg, var(--xs-gold-2), var(--xs-gold)); border-color: transparent; }

/* ---------- 底部 ---------- */
.xs-footer { margin-top: 50px; background: var(--xs-bg-2); border-top: 1px solid var(--xs-line); padding: 46px 0 26px; }
.xs-footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.3fr 1fr;
    gap: 32px;
    padding-bottom: 34px;
}
.xs-footer-brand .xs-logo { margin-bottom: 14px; }
.xs-footer-brand p { color: var(--xs-muted); font-size: 13.5px; line-height: 1.8; }
.xs-footer h3 { font-size: 15px; margin-bottom: 16px; color: var(--xs-text); }
.xs-footer-nav, .xs-footer-cats { display: flex; flex-direction: column; gap: 4px; }
.xs-footer-nav a, .xs-footer-cats a { color: var(--xs-muted); font-size: 13.5px; padding: 4px 0; }
.xs-footer-nav a:hover, .xs-footer-cats a:hover { color: var(--xs-gold); }
.xs-footer-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
.xs-footer-qr img { width: 120px; height: 120px; border-radius: var(--xs-r-sm); margin-bottom: 10px; }
.xs-footer-qr span { color: var(--xs-muted); font-size: 12.5px; }
.xs-footer-dim { color: var(--xs-dim); font-size: 12px; }

.xs-friendlink { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 22px 0; border-top: 1px solid var(--xs-line); align-items: center; }
.xs-friendlink > span { color: var(--xs-text-2); font-weight: 600; font-size: 13.5px; }
.xs-friendlink a { color: var(--xs-muted); font-size: 13px; }
.xs-friendlink a:hover { color: var(--xs-gold); }

.xs-footer-bottom { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; padding-top: 22px; border-top: 1px solid var(--xs-line); }
.xs-footer-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--xs-muted); font-size: 13px; align-items: center; }
.xs-footer-service { display: flex; flex-direction: column; gap: 6px; color: var(--xs-muted); font-size: 12.5px; text-align: right; }
.xs-footer-service a { color: var(--xs-gold-2); }

/* =============================================================
   响应式
   ============================================================= */
@media (max-width: 1024px) {
    .xs-footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 768px) {
    .xs-burger { display: flex; }
    .xs-navbar { display: none; }
    .xs-topbar { gap: 14px; }
    .xs-search { max-width: none; }
    .xs-account .login .xs-login-btn { display: none; }
    .xs-account .isLogged img { width: 34px; height: 34px; }
}

@media (max-width: 600px) {
    .xs-account .login .xs-register-btn { padding: 7px 14px; font-size: 13px; }
    .xs-logo-text { font-size: 17px; }
    .xs-footer-top { grid-template-columns: 1fr; gap: 26px; }
    .xs-footer-cats { grid-template-columns: repeat(3, 1fr); }
    .xs-footer-service { text-align: left; }
    .xs-footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
    .xs-search-btn { padding: 0 13px; }
    .xs-search > svg { display: none; }
}
