/* ========================================
   街头霸王6 维基 - 全局通用样式
   （含 :root 变量，子页面请引用本文件变量，勿重复定义颜色体系）
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* ========================================
   导航栏
   ======================================== */
.main-header {
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 92%, #000);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 22%, transparent);
}

.header-left {
    display: flex;
    align-items: center;
}

.back-link {
    color: var(--text-dim);
    font-size: 12px;
}

.back-link:hover {
    color: var(--text);
    text-decoration: none;
}

.logo {
    height: 22px;
}

.site-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: 0.5px;
}

.main-nav {
    display: flex;
    gap: 14px;
}

.nav-link {
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    color: var(--text);
    text-decoration: none;
}

.nav-link.active {
    color: var(--accent);
}

/* ========================================
   手机端汉堡菜单按钮
   ======================================== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-icon {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: var(--text);
    left: 0;
}

.menu-icon::before {
    top: -5px;
}

.menu-icon::after {
    bottom: -5px;
}

.mobile-menu-btn.active .menu-icon {
    background: transparent;
}

.mobile-menu-btn.active .menu-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-btn.active .menu-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* ========================================
   底部导航
   ======================================== */
.bottom-nav-section {
    padding: 20px 0;
    margin-top: 24px;
    border-top: 1px solid var(--border);
}

.bottom-nav-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 12px;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.bottom-nav-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.bottom-nav-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.bottom-nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-bright);
    text-decoration: none;
    border-color: var(--text-dim);
}

.bottom-nav-btn.highlight {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
    font-weight: 700;
}

.bottom-nav-btn.highlight:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--text-on-accent);
}

/* ========================================
   页脚
   ======================================== */
.main-footer {
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 32px;
}

.main-footer a {
    color: var(--text-dim) !important;
}

/* ========================================
   响应式基础
   ======================================== */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        display: none;
    }

    .main-header {
        position: sticky;
        top: 0;
        height: auto;
        min-height: 40px;
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 6px;
    }

    .header-left {
        flex: 1;
    }

    .back-link {
        font-size: 13px;
    }

    .mobile-menu-btn {
        padding: 6px;
    }

    .menu-icon,
    .menu-icon::before,
    .menu-icon::after {
        width: 20px;
        height: 2px;
    }

    .menu-icon::before {
        top: -6px;
    }

    .menu-icon::after {
        bottom: -6px;
    }
}

/* =============================================
  界面介绍页通用样式
  （变量定义、基础样式、布局、组件）
  ============================================= */

/* ================== 变量定义 ================== */
:root {
    /* 背景色 */
    --bg: #0d0d0f;
    --bg-secondary: #141418;
    --bg-card: #16161a;
    --bg-hover: #222228;
    --bg-table-head: #1c1c1c;
    --bg-table-alt: #121214;
    /* 边框色 */
    --border: #2e2e34;
    --border-light: #25252a;
    /* 文字色 */
    --text: #c4c4c8;
    --text-secondary: #7a7a82;
    --text-dim: #6e6e78;
    --text-bright: #f0f0f3;
    /* 强调色 */
    --accent: #d04545;
    --accent-dim: color-mix(in srgb, var(--accent) 35%, transparent);
    --link: #7eb8e8;
    /* 排版与布局 */
    --font-sans: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
    --font-mono: "Cascadia Mono", "Cascadia Code", Consolas, "Courier New", "Microsoft YaHei", monospace;
    --radius-sm: 4px;
    --radius-md: 8px;
    --section-gap: 2.75rem;
    --content-pad: clamp(16px, 2.5vw, 24px);
    --header-sticky-offset: 52px;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);
    --shadow-inset: inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent);
    /* 表格 */
    --bg-table-body: #141414;
    --bg-table-row-alt: #191919;
    --bg-table-gradient-from: #2a2a2e;
    --bg-table-gradient-to: #222226;
    --border-table: #303030;
    --border-table-cell: #2a2a2a;
    --border-table-row: #2f2f2f;
    --text-table: #f0f0f0;
    --text-table-key: #f2f2f2;
    /* 交互 */
    --link-hover: #a8d4ff;
    --text-on-accent: #fff;
    --accent-hover: #d55;
    /* 图片阴影 */
    --shadow-img: 0 6px 24px rgba(0, 0, 0, 0.35);
}

/* ================== 基础样式 ================== */
body {
    font-family: var(--font-sans);
    background: var(--bg);
    background-image: radial-gradient(ellipse 120% 80% at 50% -20%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%);
    color: var(--text);
    font-size: 14px;
    line-height: 1.65;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: color-mix(in srgb, var(--accent) 35%, #000);
    color: var(--text-bright);
}

a {
    color: var(--link);
    text-decoration: none;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus-visible {
    outline-offset: 3px;
}

/* ================== 布局结构 ================== */
/* 页面容器 */
.page-container {
    max-width: 1040px;
    margin: 0 auto;
    padding: var(--content-pad);
}

/* 左右两栏布局 */
.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
    gap: clamp(20px, 3vw, 36px);
    align-items: start;
}

.content-main {
    min-width: 0;
}

.sidebar {
    position: relative;
}

/* ================== 页面标题区 ================== */
.page-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    margin-bottom: clamp(20px, 3vw, 28px);
    box-shadow: 0 12px 24px -24px color-mix(in srgb, var(--accent) 40%, transparent);
}

.page-title {
    font-size: clamp(1.35rem, 2.8vw, 1.65rem);
    font-weight: 800;
    color: var(--text-bright);
    font-family: var(--font-sans);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-intro {
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 52em;
}

/* ================== 内容章节 ================== */
.content-section {
    margin-bottom: var(--section-gap);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: clamp(18px, 2.2vw, 26px);
    box-shadow: var(--shadow-card), var(--shadow-inset);
    border-left: 3px solid color-mix(in srgb, var(--accent) 55%, var(--border));
}

.content-section[id],
.tab-content [id] {
    scroll-margin-top: var(--header-sticky-offset);
}

/* ================== 切换面板（角色页） ================== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-bright);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 85%, var(--accent));
    padding-bottom: 10px;
    margin-bottom: 1.1rem;
    font-family: var(--font-sans);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: "";
    width: 4px;
    height: 1.05em;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #000));
    flex-shrink: 0;
}

.sub-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-bright);
    margin: 1.5rem 0 0.65rem 0;
    font-family: var(--font-sans);
    letter-spacing: 0.03em;
    padding-left: 10px;
    border-left: 2px solid var(--accent-dim);
}

.text {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 0.95rem;
    max-width: 72ch;
}

.content-section .text:last-child {
    margin-bottom: 0;
}

.text strong {
    color: var(--text-bright);
}

/* ================== 卡片组件 ================== */
.card-group {
    margin-bottom: 18px;
}

.card {
    margin-bottom: 24px;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
    font-family: var(--font-sans);
}

.card-text {
    font-size: 12px;
    color: var(--text);
    margin-top: 6px;
}

/* ================== 图文并排组件 ================== */
.text-with-image {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.text-with-image p {
    margin: 0;
}

/* ================== 列表组件 ================== */
.text-list {
    list-style: none;
    padding: 0;
    margin-bottom: 12px;
}

.text-list li {
    font-size: 13px;
    color: var(--text);
    padding-left: 14px;
    position: relative;
    margin-bottom: 10px;
}

.text-list li::before {
    content: "\203A";
    position: absolute;
    left: 0;
    color: color-mix(in srgb, var(--accent) 75%, var(--text-dim));
    font-size: 11px;
    top: 0.15em;
    font-weight: 700;
}

.text-list li strong {
    color: var(--text-bright);
}

/* ================== 表格组件 ================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.5;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    background: var(--bg-table-body);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(180deg, var(--bg-table-gradient-from), var(--bg-table-gradient-to));
    border-bottom: 2px solid color-mix(in srgb, var(--accent) 28%, var(--border-table));
}

.data-table th {
    text-align: left;
    padding: 6px 10px;
    font-weight: 700;
    color: var(--text-table);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid var(--border-table);
}

.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-table-row);
    border-right: 1px solid var(--border-table-cell);
    color: var(--text);
    vertical-align: top;
}

.data-table tbody tr:nth-child(even) {
    background: var(--bg-table-row-alt);
}

.data-table .col-key {
    font-weight: 700;
    color: var(--text-table-key);
    min-width: 110px;
    white-space: nowrap;
}

.data-table th:last-child,
.data-table td:last-child {
    border-right: none;
}

/* ================== 侧边目录 ================== */
.side-nav {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    position: sticky;
    top: var(--header-sticky-offset);
    background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
    box-shadow: var(--shadow-inset);
}

.side-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.side-list {
    list-style: none;
}

.side-list li {
    margin-bottom: 4px;
}

.side-link {
    color: var(--text-secondary);
    font-size: 12px;
    display: block;
    padding: 5px 0 5px 10px;
    border-left: 2px solid var(--border);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.side-link:hover {
    color: var(--text-bright);
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    border-left-color: var(--accent);
    text-decoration: none;
}

.side-link.active {
    color: var(--text-bright);
    font-weight: 700;
    border-left-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* =============================================
  界面介绍页响应式
  ============================================= */
@media (max-width: 768px) {
    :root {
        --header-sticky-offset: 56px;
    }

    /* 布局 */
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .page-container {
        padding: 14px 12px;
    }

    .text {
        max-width: none;
    }
    
    /* 页面标题 */
    .page-title {
        font-size: 20px;
    }
    
    /* 侧边栏 */
    .sidebar {
        display: none;
        position: fixed;
        top: 40px;
        right: 0;
        width: 240px;
        z-index: 101;
        background: var(--bg);
    }
    
    .sidebar.mobile-open {
        display: block;
    }
    
    .side-nav {
        position: static;
        border-top: none;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        padding: 16px;
    }
    
    .side-title {
        font-size: 13px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .side-list li {
        margin-bottom: 6px;
    }
    
    .side-link {
        font-size: 13px;
        padding: 4px 0 4px 10px;
    }
    
    /* 表格 */
    .data-table {
        font-size: 11px;
    }
    
    .data-table th,
    .data-table td {
        padding: 5px 8px;
    }
}

/* ================== 连段颜色标记 ================== */
.clr-blue   { color: #7dffff; }  /* LP, LK */
.clr-yellow { color: #ffff01; }  /* MP, MK */
.clr-red    { color: #ff9899; }  /* HP, HK */
.clr-purple { color: #ee44e0; }  /* PP, KK (3数字+) */
.clr-green  { color: #2ad35d; }  /* DR, DRC, PDR */
