/* ========================================
   梯子游戏AI预测网 - 全站样式表
   配色：深黑底 + 金色主调 + 暗金线条
   Logo: 金色渐变 | 按钮: 黄金渐变 | 文字: 白色
   ======================================== */

/* CSS变量 */
:root {
    --primary: #1A1A2E;
    --primary-light: #2A2A3E;
    --primary-dark: #0D0D1A;
    --accent: #D4AF37;
    --accent-light: #E8C547;
    --accent-dark: #B8941F;
    --gold: #FFD700;
    --gold-light: #FFE55C;
    --gold-dark: #C9A227;
    --gold-gradient: linear-gradient(135deg, #FFD700 0%, #D4AF37 50%, #B8941F 100%);
    --gold-gradient-light: linear-gradient(135deg, #FFE55C 0%, #FFD700 50%, #D4AF37 100%);
    --warm-white: #F5F5F0;
    --gray: #8A8A9A;
    --gray-light: #2A2A3E;
    --gray-dark: #5A5A6A;
    --text: #FFFFFF;
    --text-light: #C0C0CC;
    --white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 4px 20px rgba(212, 175, 55, 0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--primary-dark);
    color: var(--text);
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--gold);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === 头部 === */
.site-header {
    background: linear-gradient(135deg, #0D0D1A 0%, #1A1A2E 100%);
    border-bottom: 1px solid var(--accent-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.1);
    border-bottom: 2px solid var(--accent);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    height: 80px;
}

.logo img {
    height: 56px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.35));
    transition: var(--transition);
}

.logo:hover img {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5));
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
}

.main-nav li a {
    color: rgba(255, 255, 255, 0.85);
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    display: block;
    text-decoration: none;
    border: 1px solid transparent;
}

.main-nav li a:hover {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--accent-dark);
}

.main-nav li.active a {
    color: var(--primary-dark);
    background: var(--gold-gradient);
    font-weight: 600;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* === 主体内容 === */
.main-content {
    flex: 1;
    padding: 30px 0;
}

/* === Hero区域 === */
.hero {
    background: linear-gradient(135deg, #0D0D1A 0%, #1A1A2E 40%, #2A2A3E 100%);
    color: var(--white);
    padding: 60px 0 50px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--accent-dark);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.08) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 2px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.85;
    max-width: 700px;
    margin: 0 auto 30px;
    color: var(--text-light);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.hero-tags span {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--accent-dark);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--gold-light);
}

/* === 栏目卡片 === */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 24px;
    padding-left: 14px;
    border-left: 4px solid var(--accent);
    line-height: 1.2;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.category-card {
    background: var(--primary);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--accent-dark);
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gold-gradient);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.15);
    border-color: var(--accent);
}

.category-card:hover::after {
    transform: scaleX(1);
}

.category-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.category-card:nth-child(2n) .icon {
    background: linear-gradient(135deg, #FFE55C, #FFD700, #D4AF37);
}

.category-card:nth-child(3n) .icon {
    background: linear-gradient(135deg, #D4AF37, #B8941F, #8B7500);
}

.category-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 10px;
}

.category-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 14px;
    line-height: 1.6;
}

.category-card .more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.category-card .more::after {
    content: '→';
    transition: var(--transition);
}

.category-card:hover .more::after {
    margin-left: 4px;
}

/* === 文章列表 === */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gray-light);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.12);
    border-color: var(--accent);
}

.article-card .card-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card .card-tag {
    display: inline-block;
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-light);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
    align-self: flex-start;
    border: 1px solid var(--accent-dark);
}

.article-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.5;
}

.article-card h3 a {
    color: var(--white);
    text-decoration: none;
}

.article-card h3 a:hover {
    color: var(--gold);
}

.article-card .summary {
    font-size: 0.88rem;
    color: var(--text-light);
    flex: 1;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray);
    border-top: 1px solid var(--gray-light);
    padding-top: 12px;
}

.article-card .card-meta .date {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* === 文章详情 === */
.article-detail {
    background: var(--primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid var(--accent-dark);
}

.article-detail h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
    flex-wrap: wrap;
}

.article-meta .meta-tag {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-light);
    padding: 3px 12px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid var(--accent-dark);
}

.article-summary {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(255, 215, 0, 0.04));
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 30px;
    font-style: italic;
}

.article-body {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--text);
}

.article-body h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gold-light);
    margin: 30px 0 14px;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
    line-height: 1.3;
}

.article-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold);
    margin: 22px 0 10px;
}

.article-body p {
    margin-bottom: 16px;
    color: var(--text);
}

.article-body ul, .article-body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 6px;
    color: var(--text);
}

.article-body strong {
    color: var(--gold-light);
    font-weight: 600;
}

.article-body blockquote {
    border-left: 4px solid var(--gold);
    background: rgba(255, 215, 0, 0.06);
    padding: 12px 20px;
    margin: 16px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-light);
    font-style: italic;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.9rem;
}

.article-body th, .article-body td {
    border: 1px solid var(--accent-dark);
    padding: 10px 14px;
    text-align: left;
    color: var(--text);
}

.article-body th {
    background: var(--primary-light);
    color: var(--gold-light);
    font-weight: 600;
}

.article-body tr:nth-child(even) {
    background: var(--primary-dark);
}

/* FAQ区 */
.faq-section {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 2px solid var(--gray-light);
}

.faq-section h2 {
    font-size: 1.3rem;
    color: var(--gold-light);
    margin-bottom: 18px;
    padding-left: 12px;
    border-left: 3px solid var(--gold);
}

.faq-item {
    background: var(--primary-dark);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--accent-dark);
}

.faq-question {
    padding: 14px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    user-select: none;
}

.faq-question:hover {
    background: rgba(212, 175, 55, 0.08);
}

.faq-question::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--gold);
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 12px;
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 20px 14px;
    color: var(--text-light);
    font-size: 0.93rem;
    line-height: 1.8;
}

/* 相关推荐 */
.related-section {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 2px solid var(--gray-light);
}

.related-section h2 {
    font-size: 1.3rem;
    color: var(--gold-light);
    margin-bottom: 18px;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
}

.related-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--primary-dark);
    border-radius: var(--radius);
    transition: var(--transition);
    text-decoration: none;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--gray-light);
}

.related-item:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: var(--accent);
    transform: translateX(4px);
}

.related-item .num {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

/* 内链推荐栏 */
.interlink-bar {
    margin-top: 30px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #0D0D1A 0%, #1A1A2E 100%);
    border-radius: var(--radius-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    border: 1px solid var(--accent-dark);
}

.interlink-bar a {
    color: var(--gold-light);
    padding: 6px 16px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid var(--accent-dark);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition);
    text-decoration: none;
}

.interlink-bar a:hover {
    background: var(--gold-gradient);
    color: var(--primary-dark);
    border-color: var(--gold);
    font-weight: 600;
}

/* === 面包屑 === */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--gold);
    text-decoration: none;
}

.breadcrumb span.separator {
    color: var(--gray-dark);
}

/* === 栏目页 === */
.category-header {
    background: linear-gradient(135deg, #0D0D1A 0%, #1A1A2E 100%);
    color: var(--white);
    padding: 40px 0;
    margin-bottom: 30px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border-bottom: 2px solid var(--accent);
}

.category-header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-header p {
    opacity: 0.8;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* === 统计卡片 === */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--primary);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    text-align: center;
    border-bottom: 3px solid var(--accent);
    border: 1px solid var(--gray-light);
}

.stat-card:nth-child(2) { border-bottom-color: var(--gold); }
.stat-card:nth-child(3) { border-bottom-color: var(--accent-dark); }
.stat-card:nth-child(4) { border-bottom-color: var(--gold-light); }

.stat-card .num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    display: block;
}

.stat-card .label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* === 页脚 === */
.site-footer {
    background: linear-gradient(135deg, #0D0D1A, #1A1A2E);
    color: rgba(255, 255, 255, 0.6);
    padding: 40px 0 20px;
    margin-top: auto;
    border-top: 1px solid var(--accent-dark);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    color: var(--gold-light);
    font-size: 1rem;
    margin-bottom: 14px;
    font-weight: 600;
}

.footer-col p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-light);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 6px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* === 回到顶部 === */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: var(--primary-dark);
    border: 1px solid var(--gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* === 搜索框 === */
.search-box {
    max-width: 500px;
    margin: 0 auto 30px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 1px solid var(--accent-dark);
    border-radius: 25px;
    background: rgba(26, 26, 46, 0.8);
    color: var(--white);
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-box input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(26, 26, 46, 0.95);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.search-box::after {
    content: '🔍';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.6;
}

/* === 响应式 === */
@media (max-width: 992px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .article-detail { padding: 28px 24px; }
    .article-detail h1 { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--primary-dark);
        border-bottom: 1px solid var(--accent-dark);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .main-nav.open { transform: translateY(0); }

    .main-nav ul {
        flex-direction: column;
        padding: 10px 0;
    }

    .main-nav li { width: 100%; }

    .main-nav li a {
        display: block;
        padding: 14px 24px;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--gray-light);
    }

    .hero { padding: 40px 0 30px; }
    .hero h1 { font-size: 1.6rem; letter-spacing: 1px; }
    .hero p { font-size: 0.95rem; }

    .category-grid,
    .article-list {
        grid-template-columns: 1fr;
    }

    .article-detail { padding: 20px 16px; border-radius: var(--radius); }
    .article-detail h1 { font-size: 1.3rem; }

    .article-body h2 { font-size: 1.1rem; }
    .article-body h3 { font-size: 1rem; }

    .footer-grid { grid-template-columns: 1fr; }

    .related-list { grid-template-columns: 1fr; }

    .stats-row { grid-template-columns: repeat(2, 1fr); }

    .back-to-top { bottom: 20px; right: 20px; }

    .section-title { font-size: 1.25rem; }

    .interlink-bar { flex-direction: column; align-items: center; }
    .interlink-bar a { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.4rem; }
    .stats-row { grid-template-columns: 1fr; }
    .category-card { padding: 20px 16px; }
    .article-detail { padding: 16px 12px; }
}
