/* ========================================
   文玩核桃鉴赏网站 - 全局样式
   故宫红主题 + 水墨古朴风
   ======================================== */

/* CSS Variables */
:root {
    --primary: #b71c1c;
    --primary-dark: #8b1515;
    --primary-light: #d32f2f;
    --gold: #c9a96e;
    --gold-light: #e0c992;
    --ink-black: #2c2c2c;
    --paper-white: #faf8f5;
    --paper-light: #f5f2ed;
    --gray-light: #e8e4dd;
    --gray-mid: #9e9e9e;
    --gray-dark: #666;
    --success: #2e7d32;
    --warning: #f57f17;
    --danger: #c62828;
    --font-title: 'SimSun', 'Songti SC', 'STSong', serif;
    --font-body: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', sans-serif;
    --radius: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

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

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

body {
    font-family: var(--font-body);
    color: var(--ink-black);
    background: linear-gradient(135deg, #f5f2ed 0%, #faf8f5 50%, #f5f2ed 100%);
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.8;
}

/* SVG噪点纹理 */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* Content wrapper */
.page-wrapper {
    position: relative;
    z-index: 1;
}

/* ========== Top Navigation ========== */
.top-nav {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 60px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.nav-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-family: var(--font-title);
    color: var(--primary-dark);
    font-weight: bold;
}

.nav-brand-text {
    font-family: var(--font-title);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 0;
    list-style: none;
    height: 60px;
}

.nav-links a {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 24px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-family: var(--font-title);
    font-size: 0.95rem;
    letter-spacing: 1px;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-bottom-color: var(--gold);
}

.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}

/* Mobile nav */
@media (max-width: 768px) {
    .nav-mobile-toggle {
        display: block;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        height: auto;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    .nav-links.open {
        display: flex;
    }
    .nav-links a {
        height: 48px;
        padding: 0 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        border-left: 3px solid transparent;
    }
    .nav-links a:hover,
    .nav-links a.active {
        border-bottom-color: transparent;
        border-left-color: var(--gold);
    }
}

/* ========== Breadcrumb ========== */
.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    font-size: 0.85rem;
    color: var(--gray-dark);
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 6px;
    color: var(--gray-mid);
}

/* ========== Page Header ========== */
.page-header {
    text-align: center;
    padding: 40px 20px 30px;
    border-bottom: 3px solid var(--primary);
    margin: 0 20px 30px;
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gold);
}

.page-header h1 {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--primary);
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.page-header .subtitle {
    font-size: 0.95rem;
    color: var(--gray-dark);
    letter-spacing: 1px;
}

@media (min-width: 768px) {
    .page-header h1 { font-size: 2.4rem; }
    .page-header .subtitle { font-size: 1.05rem; }
}

/* ========== Container ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* ========== Section ========== */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: var(--primary);
    padding-left: 16px;
    border-left: 4px solid var(--primary);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.section-title .gold-dot {
    color: var(--gold);
    margin-left: 4px;
}

/* ========== Card ========== */
.card {
    background: rgba(255,255,255,0.85);
    border: 1px solid var(--gold-light);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
    .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
    .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ========== Button ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-title);
    font-size: 0.95rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(183,28,28,0.3);
}

.btn-gold {
    background: var(--gold);
    color: var(--primary-dark);
}

.btn-gold:hover {
    background: var(--gold-light);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1.1rem;
}

/* ========== Table ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 16px 0;
    background: rgba(255,255,255,0.85);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table thead {
    background: var(--primary);
    color: #fff;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-family: var(--font-title);
    font-weight: normal;
    letter-spacing: 1px;
}

.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-light);
}

.data-table tbody tr:hover {
    background: rgba(183,28,28,0.04);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========== Tags ========== */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.tag-primary { background: rgba(183,28,28,0.1); color: var(--primary); }
.tag-gold { background: rgba(201,169,110,0.2); color: #8b6914; }
.tag-success { background: rgba(46,125,50,0.1); color: var(--success); }
.tag-warning { background: rgba(245,127,23,0.1); color: var(--warning); }
.tag-danger { background: rgba(198,40,40,0.1); color: var(--danger); }
.tag-gray { background: rgba(0,0,0,0.06); color: var(--gray-dark); }

/* ========== Disclaimer ========== */
.disclaimer {
    background: rgba(183,28,28,0.05);
    border: 1px solid rgba(183,28,28,0.15);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 30px 0;
    font-size: 0.85rem;
    color: var(--gray-dark);
    line-height: 1.8;
}

.disclaimer-title {
    font-family: var(--font-title);
    color: var(--primary);
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.disclaimer-bar {
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 8px 20px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    position: sticky;
    top: 60px;
    z-index: 999;
}

/* ========== Footer ========== */
.site-footer {
    background: var(--ink-black);
    color: rgba(255,255,255,0.7);
    padding: 30px 20px;
    text-align: center;
    margin-top: 60px;
    font-size: 0.85rem;
}

.site-footer .brand {
    font-family: var(--font-title);
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.site-footer .copyright {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* ========== Back to top ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ========== Alert ========== */
.alert {
    padding: 12px 20px;
    border-radius: var(--radius);
    margin: 12px 0;
    font-size: 0.9rem;
}

.alert-success { background: rgba(46,125,50,0.1); border: 1px solid rgba(46,125,50,0.2); color: #1b5e20; }
.alert-warning { background: rgba(245,127,23,0.1); border: 1px solid rgba(245,127,23,0.2); color: #e65100; }
.alert-danger { background: rgba(198,40,40,0.1); border: 1px solid rgba(198,40,40,0.2); color: #b71c1c; }
.alert-info { background: rgba(33,150,243,0.08); border: 1px solid rgba(33,150,243,0.15); color: #0d47a1; }

/* ========== Feature List ========== */
.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

.feature-list li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: var(--primary);
    font-weight: bold;
}

/* ========== Loading ========== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-mid);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Responsive helpers ========== */
.hidden-mobile { display: none; }
@media (min-width: 768px) {
    .hidden-mobile { display: block; }
    .hidden-desktop { display: none; }
}
