@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700;900&family=Russo+One&family=Teko:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #39ff14; /* 荧光绿 */
    --secondary-color: #00f3ff; /* 电光蓝 */
    --accent-color: #ff0055; /* 激进红 */
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --text-light: #ffffff;
    --text-gray: #b3b3b3;
    --skew-angle: -10deg;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
}

/* 导航栏 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: rgba(10, 10, 10, 0.9);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 9999; /* 显著提升导航栏层级，防止被底部内容遮挡 */
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(to right, var(--primary-color), var(--secondary-color)) 1;
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    height: 40px; /* 控制Logo高度，按需调整 */
    transform: skew(var(--skew-angle));
    position: relative;
    z-index: 1002; /* 确保在最上层 */
}

.logo img {
    height: 100%;
    width: auto;
    display: block;
    pointer-events: none; /* 防止图片拦截点击 */
}

.site-title {
    font-family: 'Russo One', sans-serif;
    font-size: 1.4rem;
    color: var(--text-light);
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

header nav {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1002; /* 确保在最上层 */
}

header nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

header nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: var(--transition);
    display: inline-block;
    transform: skew(var(--skew-angle));
}

header nav a:hover, header nav a.active {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

/* 语言切换下拉菜单 */
.lang-dropdown {
    position: relative;
    margin-left: 30px;
    transform: skew(var(--skew-angle));
    z-index: 1001;
}

.lang-drop-btn {
    background: transparent;
    border: 1px solid var(--text-gray);
    color: var(--text-light);
    padding: 5px 15px;
    cursor: pointer;
    font-family: 'Russo One', sans-serif;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.lang-drop-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.lang-drop-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    min-width: 100%;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    border: 1px solid var(--text-gray);
    border-top: none;
    backdrop-filter: blur(10px);
}

.lang-dropdown.active .lang-drop-content {
    display: block;
}

.lang-drop-content a {
    color: var(--text-gray);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    text-align: center;
    font-family: 'Russo One', sans-serif;
    transform: none; /* 下拉项不需要再次倾斜 */
    transition: var(--transition);
    font-size: 0.9rem;
}

.lang-drop-content a:hover {
    background-color: var(--primary-color);
    color: var(--bg-dark);
}

.arrow {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.lang-dropdown.active .arrow {
    transform: rotate(180deg);
}

/* 隐藏旧的切换按钮样式，保留以防万一或作为回退 */
.lang-switch {
    display: none; 
}

/* --- 首页 Welcome Hero 布局 --- */
.welcome-hero {
    height: 85vh; /* 占据大部分屏幕 */
    width: 100%;
    max-width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* 使用飞盘集体照或大场面 */
    background: linear-gradient(to bottom, rgba(10,10,10,0.4), rgba(10,10,10,1)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    padding-top: 80px;
}

.welcome-hero h1 {
    font-family: 'Russo One', sans-serif;
    font-size: 6rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-style: italic;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(57, 255, 20, 0.3);
    transform: skew(var(--skew-angle));
    line-height: 1;
}

.welcome-hero p {
    font-size: 2rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 5px;
    font-weight: 700;
    transform: skew(var(--skew-angle));
    margin-bottom: 50px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    color: var(--text-gray);
    font-size: 1rem;
    animation: bounce 2s infinite;
    transform: skew(var(--skew-angle));
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0) skew(var(--skew-angle));}
    40% {transform: translateY(-10px) skew(var(--skew-angle));}
    60% {transform: translateY(-5px) skew(var(--skew-angle));}
}

/* --- 首页 Hub 布局 (调整后) --- */
.hub-container {
    /* PC：缩短“开始学习技巧”区域高度（避免占屏过多） */
    height: 38vh;
    min-height: 280px;
    max-height: 420px;
    display: flex;
    width: 100%;
    border-top: 2px solid var(--primary-color);
    position: relative;
    z-index: 1; /* 显式设置较低的层级 */
}

.hub-section {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: all 0.5s ease; /* 统一过渡效果 */
    border-right: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    text-decoration: none;
    background: #000;
}

/* 使用 CSS 渐变代替图片 */
.beginner-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d3a0d 100%); /* 深绿色调 */
}

.advanced-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d2b3a 100%); /* 深蓝色调 */
}

.hub-section:hover {
    flex: 1.3; /* 减小展开幅度: 1.8 -> 1.3 */
}

/* 增强 Hover 时的背景亮度和色彩 */
.beginner-section:hover {
    background: linear-gradient(135deg, #222 0%, #1a5c1a 100%);
}

.advanced-section:hover {
    background: linear-gradient(135deg, #222 0%, #1a4d66 100%);
}

.hub-bg {
    display: none; 
}

.hub-bg-img {
    display: none; /* 隐藏可能残留的图片样式 */
}

/* --- 首页 SEO 文字板块 --- */
.home-intro-section {
    padding: 70px 20px 50px;
    background: #111;
    border-top: 2px solid var(--primary-color);
}

.intro-block {
    max-width: 800px;
    margin: 0 auto 40px;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    font-family: 'Russo One', sans-serif;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-transform: uppercase;
}

/* 技巧学习标题 - 桌面端 */
.skills-title {
    text-align: center;
    margin: 55px 0 28px;
}

.section-text {
    font-size: 1.1rem;
    color: #ddd;
    line-height: 1.8;
    margin-bottom: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 36px;
}

.feature-card {
    background: var(--bg-card);
    padding: 30px;
    border: 1px solid #333;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
}

.feature-card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-card p {
    color: #bbb;
    font-size: 0.95rem;
}

.hub-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 20px;
    transform: skew(var(--skew-angle));
    width: 100%;
}

.hub-number {
    font-family: 'Teko', sans-serif;
    font-size: 5rem;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--primary-color);
    display: block;
    margin-bottom: 10px;
    opacity: 0.3;
    transition: var(--transition);
}

.hub-title {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-light);
    text-transform: uppercase;
    font-style: italic;
    margin-bottom: 10px;
    white-space: nowrap;
    position: relative; /* 确保层级正确 */
    z-index: 2;
}

.hub-desc {
    font-size: 1rem;
    color: var(--text-light);
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
    max-width: 250px;
    margin: 0 auto;
    background: rgba(0,0,0,0.8);
    padding: 5px 10px;
    border-left: 3px solid var(--secondary-color);
}

.hub-section:hover .hub-desc {
    opacity: 1;
    transform: translateY(0);
}

.hub-section:hover .hub-number {
    color: var(--primary-color);
    opacity: 1;
    text-shadow: 0 0 20px var(--primary-color);
}

/* --- 二级页面通用布局 --- */
.page-header {
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    margin-bottom: 32px;
    padding-top: 60px;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10,10,10,0.5), rgba(10,10,10,1));
}

.page-title-wrapper {
    position: relative;
    z-index: 2;
    text-align: center;
    transform: skew(var(--skew-angle));
}

.page-title {
    font-family: 'Russo One', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    color: var(--text-light);
    text-shadow: 0 4px 20px rgba(57, 255, 20, 0.3), 
                 0 0 40px rgba(57, 255, 20, 0.15);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.page-subtitle {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 1.3rem;
    color: var(--text-gray);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 243, 255, 0.2);
}

.content-container {
    max-width: 1400px;
    margin: 0 auto 45px;
    padding: 0 20px;
}

.content-block {
    background: #111;
    border: 1px solid #222;
    padding: 40px;
    margin-bottom: 28px;
    position: relative;
    transition: transform 0.3s ease;
}

.content-block:hover {
    border-color: var(--primary-color);
    transform: skew(0deg) translateX(5px); /* 微动效 */
}

.content-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

.block-title {
    font-size: 1.8rem;
    font-weight: 700;
    font-style: italic;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.block-text {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.8;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border: 2px solid #333;
    margin-top: 20px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.btn-back {
    display: inline-block;
    margin-top: 40px;
    padding: 15px 40px;
    border: 2px solid var(--text-light);
    color: var(--text-light);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    transform: skew(var(--skew-angle));
    transition: var(--transition);
    background: transparent;
}

.btn-back:hover {
    background: var(--text-light);
    color: var(--bg-dark);
}

/* 比赛规则板块样式增强 */
.home-rules-section .content-block ul {
    list-style: none;
    position: relative;
}

.home-rules-section .content-block ul li::before {
    content: "▸";
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.home-rules-section h4 {
    font-family: 'Russo One', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.field-layout {
    background: rgba(0, 0, 0, 0.3);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #222;
}

.field-diagram img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.field-diagram img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(57, 255, 20, 0.4);
}

footer {
    background: #050505;
    border-top: 1px solid #1a1a1a;
    padding: 40px 40px 24px;
    color: #666;
    min-height: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 0;
}

.footer-layout {
    display: flex;
    align-items: flex-start;
    gap: 80px;
    min-height: 0;
}

/* 左侧 Logo 区域 */
.footer-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    flex: 0 0 260px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    height: 40px;
}

.footer-logo img {
    height: 100%;
    width: auto;
}

.footer-site-name {
    font-family: 'Russo One', sans-serif;
    font-size: 1.3rem;
    color: var(--text-light);
    text-transform: uppercase;
    line-height: 1;
}

.footer-copyright {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    white-space: nowrap; /* PC端：防止版权内容换行 */
}

.footer-contact {
    font-size: 0.85rem;
    color: #777;
    margin: 0;
    white-space: nowrap; /* PC端：防止邮箱链接换行 */
}

.footer-contact a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap; /* 确保邮箱地址不换行 */
}

.footer-contact a:hover {
    color: var(--primary-color);
}

/* 右侧导航区域 */
.footer-nav {
    width: 100%;
    flex: 1 1 auto;
    display: block;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 30px 50px;
    max-width: 900px;
    margin-left: auto;
}

.footer-column {
    text-align: left;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-column-title {
    font-family: 'Russo One', sans-serif;
    font-size: 1rem;
    color: var(--primary-color);
    margin: 0 0 18px 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
    display: block;
    width: 100%;
}

.footer-column-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    display: block;
}

.footer-column-title a:hover {
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.footer-sub-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.footer-sub-links li {
    margin: 0 0 10px 0;
    padding: 0;
    width: 100%;
}

.footer-sub-links a {
    color: #ccc; /* 使用更亮的颜色以确保可见性 */
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
    line-height: 1.8;
    display: block;
}

.footer-sub-links a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #222;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    z-index: 9998;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(57, 255, 20, 0.3);
    opacity: 0;
    transform: scale(0.8);
}

.back-to-top.show {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.back-to-top:hover {
    background: var(--secondary-color);
    box-shadow: 0 6px 20px rgba(0, 243, 255, 0.5);
    transform: scale(1.1);
}

.back-to-top:active {
    transform: scale(0.95);
}

.back-to-top span {
    line-height: 1;
    display: block;
}

/* ========================================
   移动端导航汉堡菜单
   ======================================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 10001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================================
   悬浮侧边目录导航
   ======================================== */
.toc-sidebar {
    position: fixed;
    top: 120px;
    left: 20px;
    width: 200px;
    max-height: calc(100vh - 200px);
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(57, 255, 20, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toc-sidebar.collapsed {
    width: 40px;
    max-height: 100px;
    min-height: 80px;
}

.toc-sidebar:hover {
    border-color: rgba(57, 255, 20, 0.4);
    box-shadow: 0 6px 30px rgba(57, 255, 20, 0.2);
}

/* 收起/展开按钮 */
.toc-toggle {
    position: absolute;
    top: 10px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(57, 255, 20, 0.3);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

.toc-sidebar.collapsed .toc-toggle {
    top: 8px;
    right: 50%;
    transform: translateX(50%);
}

.toc-toggle:hover {
    background: rgba(57, 255, 20, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.toggle-icon {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: bold;
    transition: transform 0.3s ease;
    display: block;
    line-height: 1;
}

.toc-sidebar.collapsed .toggle-icon {
    transform: rotate(180deg);
}

/* 目录内容区 */
.toc-content {
    padding: 20px 15px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.toc-sidebar.collapsed .toc-content {
    opacity: 0;
    pointer-events: none;
}

/* 收起状态下的图标提示 */
.toc-sidebar::before {
    content: '☰';
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-size: 1.1rem;
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.toc-sidebar.collapsed::before {
    display: block;
}

.toc-sidebar.collapsed:hover::before {
    opacity: 0.7;
}

.toc-header {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(57, 255, 20, 0.3);
}

.toc-section {
    margin-bottom: 20px;
}

.toc-section:last-child {
    margin-bottom: 0;
}

.toc-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-left: 8px;
    opacity: 0.8;
}

.toc-link {
    display: block;
    font-size: 0.85rem;
    color: var(--text-gray);
    text-decoration: none;
    padding: 6px 8px 6px 12px;
    margin: 2px 0;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.toc-link:hover {
    color: var(--primary-color);
    background: rgba(57, 255, 20, 0.05);
    border-left-color: var(--primary-color);
    padding-left: 16px;
}

.toc-link.active {
    color: var(--primary-color);
    background: rgba(57, 255, 20, 0.1);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.toc-link.active::before {
    content: '▶';
    position: absolute;
    left: -2px;
    font-size: 0.6rem;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 滚动条样式 */
.toc-content::-webkit-scrollbar {
    width: 4px;
}

.toc-content::-webkit-scrollbar-track {
    background: transparent;
}

.toc-content::-webkit-scrollbar-thumb {
    background: rgba(57, 255, 20, 0.3);
    border-radius: 2px;
}

.toc-content::-webkit-scrollbar-thumb:hover {
    background: rgba(57, 255, 20, 0.5);
}

/* 有侧边栏时，主内容区域左侧留出空间（固定不动），同时保持居中 */
body:has(.toc-sidebar) .content-container {
    max-width: calc(100% - 240px);
    margin: 0 auto 45px;
    margin-left: 240px;
    padding: 0 40px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 导航栏收起时，正文扩大并在整个页面居中 */
body:has(.toc-sidebar.collapsed) .content-container {
    max-width: 1400px;
    margin: 0 auto 45px;
    padding: 0 60px;
}

/* ========================================
   响应式设计 - 平板
   ======================================== */
@media (max-width: 1024px) {
    /* 平板端缩小侧边栏 */
    .toc-sidebar {
        width: 180px;
        left: 15px;
    }
    
    .toc-sidebar.collapsed {
        width: 38px;
        max-height: 90px;
        min-height: 70px;
    }
    
    .toc-sidebar.collapsed .toc-toggle {
        width: 22px;
        height: 22px;
        top: 6px;
    }
    
    .toc-sidebar.collapsed .toggle-icon {
        font-size: 0.7rem;
    }
    
    body:has(.toc-sidebar) .content-container {
        max-width: calc(100% - 210px);
        margin: 0 auto;
        margin-left: 210px;
        padding: 40px 30px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* 平板端：导航栏收起时，正文扩大并居中 */
    body:has(.toc-sidebar.collapsed) .content-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 40px 50px;
    }
    
    header {
        padding: 15px 30px;
    }
    
    .content-container {
        padding: 40px 30px;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .hub-container {
        gap: 0;
    }
    
    .hub-section {
        height: auto; /* 继承 hub-container 的整体高度，避免按钮过高 */
    }
    
    .hub-title {
        font-size: 2.5rem;
    }
}

/* ========================================
   响应式设计 - 手机
   ======================================== */
@media (max-width: 768px) {
    /* 移动端隐藏侧边导航 */
    .toc-sidebar {
        display: none;
    }
    
    /* 移动端取消内容区域的左侧padding */
    body:has(.toc-sidebar) .content-container {
        max-width: 100%;
        margin: 0 auto;
        margin-left: 0;
        padding: 40px 20px;
    }
    
    /* 导航栏移动端 */
    header {
        padding: 15px 20px;
        max-width: 100%;
    }
    
    /* 确保所有主要容器不超出视口 */
    section,
    .home-intro-section,
    .home-rules-section,
    .footer-content {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .logo {
        transform: none;
        height: 35px;
    }
    
    .site-title {
        font-size: 1.1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    header nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px;
        gap: 0;
        transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        border-left: 2px solid var(--primary-color);
        backdrop-filter: blur(10px);
        z-index: 10000;
    }
    
    header nav ul.active {
        right: 0;
    }
    
    header nav ul li {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    header nav ul li a {
        display: block;
        padding: 18px 25px;
        font-size: 1.1rem;
        width: 100%;
        transition: all 0.3s ease;
    }
    
    header nav ul li a:hover,
    header nav ul li a.active {
        background: rgba(57, 255, 20, 0.1);
        border-left: 3px solid var(--primary-color);
        padding-left: 28px;
    }
    
    /* 语言下拉菜单移动端 */
    .lang-dropdown {
        margin-left: auto;
        margin-right: 10px;
    }
    
    .lang-drop-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* 欢迎屏移动端 - 减少高度，提高空间利用率 */
    .welcome-hero {
        height: 45vh;
        min-height: 320px;
        padding-top: 70px;
        padding-bottom: 20px;
    }
    
    .welcome-hero h1 {
        font-size: 2.3rem;
        letter-spacing: 2px;
        margin-bottom: 8px;
    }
    
    .welcome-hero p {
        font-size: 0.85rem;
        letter-spacing: 1px;
        margin-bottom: 20px;
    }
    
    .scroll-indicator {
        font-size: 0.8rem;
        bottom: 15px;
    }
    
    /* Intro 区域移动端 */
    .home-intro-section {
        padding: 44px 0 14px;
    }
    
    .intro-block {
        margin-bottom: 25px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .section-text {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 25px;
    }
    
    .feature-card h3 {
        font-size: 1.3rem;
    }
    
    /* ========================================
       “开始学习技巧 / Skills Hub”移动端重排
       - 去掉桌面端残留的 min-height / flex 拉伸 / skew
       - 单列稳定布局：不漂移、不撑高、不留大空白
       ======================================== */
    .skills-title {
        text-align: center;
        margin: 22px 0 12px !important;
        font-size: 1.6rem !important;
    }
    
    .hub-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 0; /* 覆盖桌面端 min-height: 600px，避免底部大空白 */
        border-top: none;
        gap: 12px;
        padding: 0 20px;
        margin: 0 auto 18px;
        box-sizing: border-box;
    }
    
    .hub-section {
        flex: none; /* 覆盖桌面端 flex: 1，避免按钮被拉伸 */
        width: 100%;
        height: auto;
        min-height: 74px;
        border-right: none;
        border-radius: 12px;
        border: 1px solid rgba(57, 255, 20, 0.35);
        text-decoration: none;
        position: relative;
        overflow: hidden;
        box-sizing: border-box;
        transition: transform 0.15s ease, border-color 0.15s ease;
    }
    
    /* 右侧箭头，避免依赖标题伪元素造成换行错位 */
    .hub-section::after {
        content: '→';
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--primary-color);
        font-size: 1.2rem;
        line-height: 1;
        opacity: 0.95;
        pointer-events: none;
    }
    
    .hub-content {
        transform: none; /* 覆盖桌面端 skew */
        text-align: left;
        width: 100%;
        padding: 14px 44px 14px 16px; /* 右侧预留箭头空间 */
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .hub-number {
        display: none !important;
    }
    
    .hub-title {
        margin: 0;
        font-size: 1.05rem;
        line-height: 1.25;
        font-weight: 900;
        color: var(--text-light);
        font-family: 'Russo One', sans-serif;
        letter-spacing: 0.5px;
        text-transform: none; /* 移动端避免强制大写导致溢出 */
        white-space: normal;  /* 覆盖桌面端 nowrap，避免窄屏挤压 */
    }
    
    /* 禁用旧的标题箭头，避免重复显示 */
    .hub-title::after {
        content: none !important;
    }
    
    .hub-desc {
        margin: 0;
        opacity: 1 !important;         /* 覆盖桌面端 hover 才显示 */
        transform: none !important;
        transition: none;
        background: transparent;
        border-left: none;
        padding: 0;
        max-width: none;
        color: var(--text-gray);
        font-size: 0.86rem;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        line-clamp: 2;
        -webkit-line-clamp: 2; /* 最多两行，避免高度跳动 */
        overflow: hidden;
    }
    
    /* 移动端不使用 hover 拉伸效果，避免“按钮漂移/错位” */
    .hub-section:hover {
        flex: none;
        transform: none;
        box-shadow: none;
    }
    
    .hub-section:active {
        border-color: rgba(57, 255, 20, 0.7);
        transform: scale(0.99);
    }
    
    /* 页面头部移动端 */
    .page-header {
        height: 250px;
        margin-bottom: 22px;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    /* 内容容器移动端 */
    .content-container {
        padding: 30px 20px;
        margin: 0 auto 28px;
    }
    
    /* 规则板块移动端 - 大幅减少上下间距 */
    .home-rules-section {
        padding: 8px 0 8px !important; /* 进一步减少底部padding */
    }
    
    .field-layout {
        flex-direction: column;
        padding: 15px;
        gap: 20px;
    }
    
    .field-specs, .field-diagram {
        min-width: 100%;
    }
    
    .field-diagram img {
        max-width: 100%;
        border-radius: 6px;
    }
    
    .home-rules-section .block-title {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    .home-rules-section h4 {
        font-size: 1.05rem;
        margin-top: 18px;
        margin-bottom: 10px;
    }
    
    .content-block {
        padding: 20px 15px;
        margin-bottom: 18px;
    }
    
    .block-title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .block-text {
        font-size: 0.95rem;
        line-height: 1.8;
    }
    
    .block-text ul {
        padding-left: 15px !important;
        line-height: 1.8 !important;
    }
    
    .block-text li {
        margin-bottom: 8px;
    }
    
    /* 视频容器移动端 */
    .video-wrapper {
        margin: 20px 0;
        padding-bottom: 56.25%;
    }
    
    .video-wrapper iframe {
        border-radius: 6px;
    }
    
    /* Footer移动端 - 简洁标准版 */
    footer {
        padding: 18px 20px 12px;
        background: #040404;
        border-top: 1px solid rgba(57, 255, 20, 0.25);
        box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.55);
        min-height: auto; /* 覆盖桌面端 min-height: 400px，避免大空白 */
    }
    .footer-nav {
        display: block; /* 避免继承 header nav 的 flex 语义 */
    }
    
    .footer-content {
        max-width: 100%;
        min-height: 0; /* 覆盖桌面端 min-height: 320px */
    }
    
    .footer-layout {
        flex-direction: column;
        gap: 14px;
        display: flex;
        min-height: 0; /* 覆盖桌面端 min-height: 280px */
    }
    
    /* 导航区域放在前面 */
    .footer-nav {
        width: 100%;
        order: 1;
        margin: 0;
    }
    
    /* 版权信息放在导航下方（并减少分割线/内边距带来的大间隙） */
    .footer-left {
        width: 100%;
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 0;
        border: none;
    }
    
    .footer-logo {
        order: 3;
        height: 30px;
        margin: 0;
    }
    
    .footer-site-name {
        font-size: 1rem;
    }
    
    .footer-copyright {
        order: 1;
        font-size: 0.75rem;
        color: #666;
        text-align: left;
        margin: 0;
        padding: 0;
        border: none;
        white-space: normal; /* 移动端：允许换行 */
    }

    .footer-contact {
        order: 2;
        font-size: 0.75rem;
        color: #777;
        margin: 0;
        white-space: normal; /* 移动端：允许换行 */
    }
    
    .footer-contact a {
        white-space: normal; /* 移动端：允许邮箱链接换行 */
    }
    
    /* 导航列 */
    .footer-columns {
        display: flex;
        flex-direction: column;
        gap: 16px; /* 减少列间距，避免“组件之间很大间隙” */
        max-width: 100%;
        margin: 0;
    }
    
    .footer-column {
        width: 100%;
        min-height: 0; /* 覆盖桌面端 min-height: 240px */
    }
    
    /* 主标题左对齐 */
    .footer-column-title {
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--primary-color);
        margin-bottom: 8px;
        display: block;
        text-align: left;
    }
    
    .footer-column-title a {
        color: var(--primary-color);
        text-decoration: none;
        display: block;
        text-align: left;
    }
    
    /* 子链接 - 确保显示 */
    .footer-sub-links {
        list-style: none;
        padding: 0;
        margin: 0;
        display: block !important;
    }
    
    .footer-sub-links li {
        margin-bottom: 6px;
        display: block !important;
    }
    
    .footer-sub-links a {
        display: block !important;
        color: #bbb !important;
        font-size: 0.85rem;
        text-decoration: none;
        line-height: 1.6;
        padding: 2px 0;
    }
    
    .footer-sub-links a:hover {
        color: var(--primary-color) !important;
    }
    
    /* 回到顶部按钮移动端 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    /* 按钮返回移动端 */
    .btn-back {
        padding: 12px 30px;
        font-size: 0.95rem;
    }
}

/* ========================================
   响应式设计 - 小屏手机
   ======================================== */
@media (max-width: 480px) {
    .welcome-hero {
        height: 40vh;
        min-height: 300px;
        padding-top: 65px;
        padding-bottom: 15px;
    }
    
    .welcome-hero h1 {
        font-size: 1.9rem;
        letter-spacing: 1px;
    }
    
    .welcome-hero p {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
        margin-bottom: 15px;
    }
    
    .scroll-indicator {
        font-size: 0.75rem;
        bottom: 12px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .hub-container {
        margin: 0 auto 20px;
        padding: 0 18px;
        gap: 10px;
        max-width: 100%;
    }
    
    /* 小屏手机：技巧学习标题 */
    .skills-title {
        margin: 18px 0 10px !important;
        font-size: 1.5rem !important;
    }
    
    .home-intro-section {
        padding: 32px 0 0;
    }
    
    .hub-section {
        min-height: 70px;
    }
    
    .hub-title {
        font-size: 1rem;
    }
    
    .hub-content {
        padding: 12px 42px 12px 14px;
    }
    
    .hub-section::after {
        right: 14px;
        font-size: 1.15rem;
    }
    
    /* 小屏：减少规则板块顶部间距 */
    .home-rules-section {
        padding: 6px 0 6px !important; /* 进一步减少底部padding */
    }
    
    .page-title {
        font-size: 1.8rem;
    }

    .page-header {
        margin-bottom: 18px;
    }
    
    .block-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .home-rules-section .block-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    .content-block {
        padding: 18px 14px;
        margin-bottom: 15px;
    }
    
    .intro-block {
        margin-bottom: 25px;
    }
    
    .home-intro-section {
        padding: 34px 0 20px;
    }
    
    .home-rules-section {
        padding: 16px 0 18px !important;
    }
    
    header nav ul {
        width: 85%;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
    
    /* 小屏footer微调 */
    footer {
        padding: 16px 18px 12px;
    }

    .footer-contact {
        font-size: 0.7rem;
    }
    
    .footer-nav {
        margin: 0;
    }
    
    .footer-left {
        padding: 0;
    }
    
    .footer-logo {
        height: 28px;
    }
    
    .footer-site-name {
        font-size: 0.95rem;
    }
    
    .footer-columns {
        gap: 14px;
    }
    
    .footer-column-title {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .footer-sub-links li {
        margin-bottom: 6px;
    }
    
    .footer-sub-links a {
        font-size: 0.8rem !important;
        display: block !important;
    }
    
    .footer-copyright {
        font-size: 0.7rem;
        margin-top: 0;
    }
}

/* ========================================
   触摸设备优化
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    /* 增大可点击区域 */
    header nav ul li a {
        padding: 20px 25px;
        min-height: 48px;
    }
    
    .lang-drop-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .back-to-top {
        min-width: 48px;
        min-height: 48px;
    }
    
    .footer-column-title {
        min-height: 44px;
        padding: 10px 0;
    }
    
    .footer-sub-links a {
        min-height: 44px;
        padding: 10px 0;
    }
    
    /* Hub：仅保证可点击高度，不覆盖布局宽度/边距 */
    .hub-section {
        min-height: 74px;
    }
    
    /* 移除hover效果，使用active */
    .hub-section:hover {
        transform: none;
    }
    
    .hub-section:active {
        transform: scale(0.98);
        background: rgba(57, 255, 20, 0.15);
        border-color: var(--primary-color);
    }
    
    .feature-card:hover {
        transform: none;
    }
    
    .feature-card:active {
        transform: scale(0.98);
    }
}

/* ========================================
   横屏模式优化
   ======================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .welcome-hero {
        height: 85vh;
        min-height: 300px;
    }
    
    .welcome-hero h1 {
        font-size: 2.2rem;
    }
    
    .welcome-hero p {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
    
    .page-header {
        height: 200px;
        margin-bottom: 18px;
    }
    
    .hub-container {
        margin: 0 auto 20px; /* 居中，统一margin值 */
        padding: 0 20px; /* 使用padding控制左右间距 */
        gap: 10px;
        max-width: 100%;
    }
    
    .hub-section {
        /* 横屏下保持与移动端同一套布局，只微调高度 */
        min-height: 68px;
    }
    
    .hub-title {
        font-size: 1rem;
    }
    
    .hub-content {
        padding: 12px 42px 12px 14px;
    }
    
    /* 横屏模式：技巧学习标题 */
    .skills-title {
        margin: 20px 0 15px !important;
    }
    
    .home-intro-section {
        padding: 40px 0 0;
    }
    
    /* 横屏：减少规则板块顶部间距 */
    .home-rules-section {
        padding: 8px 0 8px !important; /* 统一底部padding */
    }
}