/* ============================================
   AI象棋对决 - 公共样式表
   ============================================ */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #1a3a2f 0%, #0d1f1a 100%);
    min-height: 100vh;
    color: #f5f0e6;
    line-height: 1.6;
}

/* ============================================
   导航栏
   ============================================ */
.nav-bar {
    background: rgba(0, 0, 0, 0.35);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212, 168, 83, 0.15);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.nav-logo {
    color: #d4a853;
    font-size: 1.4rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.nav-logo:hover {
    color: #e8c45a;
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
    flex-wrap: wrap;
}

.nav-links a {
    color: #c0b8a8;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover {
    color: #f5f0e6;
    background: rgba(212, 168, 83, 0.15);
}

.nav-links a.active {
    color: #d4a853;
    background: rgba(212, 168, 83, 0.2);
}

.start-btn {
    background: linear-gradient(145deg, #d4a853, #b8923d);
    color: #2d1810;
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(212, 168, 83, 0.35);
    display: flex;
    align-items: center;
    gap: 6px;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(212, 168, 83, 0.5);
    color: #2d1810;
}

/* ============================================
   主容器
   ============================================ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

/* ============================================
   页面标题区
   ============================================ */
.page-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(45, 24, 16, 0.7) 0%, rgba(74, 44, 26, 0.5) 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4a853' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #d4a853;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    margin-bottom: 12px;
    position: relative;
    letter-spacing: 4px;
}

.page-header .subtitle {
    font-size: 1.15rem;
    color: #c9a55a;
    position: relative;
    letter-spacing: 1px;
}

.page-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    display: block;
    position: relative;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

/* ============================================
   卡片组件
   ============================================ */
.card {
    background: rgba(45, 35, 25, 0.88);
    backdrop-filter: blur(3px);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    padding: 28px 32px;
    margin-bottom: 28px;
    border: 1px solid rgba(212, 168, 83, 0.18);
    transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-size: 1.5rem;
    color: #d4a853;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title i {
    font-size: 1.3rem;
}

.card p {
    font-size: 1.08rem;
    color: #e0d8c8;
    margin-bottom: 14px;
    text-indent: 2em;
}

.card p:last-child {
    margin-bottom: 0;
}

/* ============================================
   标签徽章
   ============================================ */
.badge {
    background: rgba(212, 168, 83, 0.18);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 10px;
    color: #e2bc7c;
    border: 1px solid rgba(212, 168, 83, 0.25);
}

.badge i {
    margin-right: 4px;
}

/* ============================================
   网格布局
   ============================================ */
.grid-2cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.grid-3cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

/* ============================================
   引用块
   ============================================ */
.quote {
    font-style: italic;
    border-left: 4px solid #d4a853;
    background: rgba(0, 0, 0, 0.3);
    padding: 14px 20px;
    border-radius: 10px;
    color: #d8c8a8;
    margin: 20px 0;
}

.quote i {
    color: #d4a853;
    margin-right: 8px;
}

/* ============================================
   时间轴
   ============================================ */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, #d4b48c, #c27e42, #d4b48c);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    order: 1;
    text-align: right;
    margin-right: 28px;
}

.timeline-item:nth-child(odd) .timeline-date {
    order: 2;
    text-align: left;
    margin-left: 28px;
}

.timeline-item:nth-child(even) .timeline-content {
    order: 2;
    text-align: left;
    margin-left: 28px;
}

.timeline-item:nth-child(even) .timeline-date {
    order: 1;
    text-align: right;
    margin-right: 28px;
}

.timeline-content {
    width: 42%;
    background: rgba(50, 38, 26, 0.92);
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid rgba(212, 168, 83, 0.2);
}

.timeline-content h4 {
    font-size: 1.15rem;
    color: #d4a853;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-content p {
    font-size: 0.95rem;
    color: #c8b898;
    text-indent: 0;
    margin-bottom: 0;
}

.timeline-date {
    width: 22%;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.45);
    padding: 8px 14px;
    border-radius: 20px;
    text-align: center;
    color: #e2bc7c;
    font-size: 0.9rem;
}

.timeline-icon-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: linear-gradient(145deg, #d4a853, #b8923d);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 3px #1a3a2f;
}

/* ============================================
   表格
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(35, 25, 18, 0.6);
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    border: 1px solid rgba(212, 168, 83, 0.25);
    padding: 12px 16px;
    vertical-align: top;
    color: #f0e0cc;
}

th {
    background: rgba(212, 168, 83, 0.18);
    font-weight: 600;
    color: #d4a853;
    text-align: left;
}

tr:hover {
    background: rgba(212, 168, 83, 0.05);
}

.red-piece {
    color: #e85a4a;
    font-weight: bold;
}

.black-piece {
    color: #b8b8b8;
    font-weight: bold;
}

/* ============================================
   小卡片（用于网格）
   ============================================ */
.mini-card {
    background: rgba(35, 25, 18, 0.75);
    border-radius: 14px;
    padding: 20px 22px;
    border: 1px solid rgba(212, 168, 83, 0.15);
    transition: transform 0.25s, box-shadow 0.25s;
}

.mini-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.mini-card h3 {
    font-size: 1.2rem;
    color: #d4a853;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-card p {
    font-size: 0.98rem;
    color: #c8b898;
    text-indent: 0;
    margin-bottom: 0;
}

/* ============================================
   SVG 棋盘展示
   ============================================ */
.board-container {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.board-svg {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
    background: #f7e9d7;
}

.illustration {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    margin-top: 12px;
}

.illustration i {
    font-size: 2.2rem;
    color: #d4a853;
}

.illustration figcaption {
    font-size: 0.75rem;
    color: #c0a070;
    margin-top: 6px;
}

/* ============================================
   按钮
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s;
    background: linear-gradient(145deg, #d4a853, #b8923d);
    color: #2d1810;
    box-shadow: 0 4px 14px rgba(212, 168, 83, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 168, 83, 0.55);
    color: #2d1810;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s;
    background: transparent;
    color: #d4a853;
    border: 2px solid #d4a853;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: rgba(212, 168, 83, 0.1);
}

/* ============================================
   CTA 区域
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, #2d1810 0%, #4a2c1a 100%);
    padding: 60px 20px;
    text-align: center;
    margin-top: 40px;
    border-radius: 16px;
}

.cta-section h2 {
    font-size: 1.8rem;
    color: #d4a853;
    margin-bottom: 12px;
}

.cta-section p {
    font-size: 1.1rem;
    color: #c9a55a;
    margin-bottom: 24px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================
   页脚
   ============================================ */
.site-footer {
    background: rgba(0, 0, 0, 0.4);
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
    border-top: 1px solid rgba(212, 168, 83, 0.1);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-logo {
    color: #d4a853;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.footer-desc {
    color: #8a7a68;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.footer-links {
    margin-bottom: 16px;
}

.footer-links a {
    color: #a09080;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #d4a853;
}

.footer-links .separator {
    color: #605040;
    margin: 0 12px;
}

.footer-links .highlight {
    color: #e8c45a;
}

.footer-icp a {
    color: #605040;
    font-size: 0.85rem;
    text-decoration: none;
}

.footer-icp a:hover {
    color: #a09080;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 900px) {
    .nav-links {
        gap: 4px;
    }

    .nav-links a {
        padding: 6px 10px;
        font-size: 0.88rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 760px) {
    .nav-bar {
        padding: 12px 15px;
    }

    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .start-btn {
        width: 100%;
        justify-content: center;
    }

    .container {
        padding: 24px 16px 40px;
    }

    .page-header {
        padding: 28px 16px;
        margin-bottom: 32px;
    }

    .page-header h1 {
        font-size: 1.7rem;
        letter-spacing: 2px;
    }

    .card {
        padding: 20px 18px;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        margin-left: 35px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-date,
    .timeline-item:nth-child(even) .timeline-date {
        width: 100%;
        text-align: left;
        margin: 0 0 8px 0;
        order: 0;
    }

    .timeline-icon-dot {
        left: 5px;
    }

    .timeline::before {
        left: 5px;
    }

    .grid-2cols,
    .grid-3cols {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.4rem;
    }

    .card-title {
        font-size: 1.25rem;
    }
}
