/* ===== 全局变量与基础样式 ===== */
:root {
    --primary: #2C3E50;
    --accent: #E67E22;
    --bg-dark: #1A1A1A;
    --card-bg: #2A2A2A;
    --text-main: #D3D3D3;
    --text-light: #FFFFFF;
    --text-muted: #999999;
    --border-color: #3A3A3A;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --radius: 8px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.8;
    font-size: 16px;
}

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

a:hover {
    color: #F39C12;
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--text-light);
    font-weight: 700;
    line-height: 1.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 网格纹理背景 ===== */
.card-texture {
    background-color: var(--card-bg);
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 1.2rem;
    font-weight: 700;
}

.navbar-brand img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 24px;
    align-items: center;
}

.navbar-nav a {
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 6px 0;
    position: relative;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--accent);
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-light);
    transition: var(--transition);
}

/* ===== Hero Banner ===== */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 60px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.8);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===== 按钮样式 ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: #D35400;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

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

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

/* ===== 区块标题 ===== */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

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

.section-header p {
    color: var(--text-muted);
    margin-top: 16px;
    font-size: 1rem;
}

/* ===== 卡片网格 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    background-image: 
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 20px 20px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-img-wrapper {
    overflow: hidden;
    position: relative;
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.card-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.card-tag {
    display: inline-block;
    background: rgba(230, 126, 34, 0.15);
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 10px;
}

/* ===== Before/After 对比滑块 ===== */
.ba-slider {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: ew-resize;
    user-select: none;
}

.ba-slider img {
    width: 100%;
    display: block;
}

.ba-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.ba-before img {
    width: 200%;
    max-width: none;
}

.ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: var(--accent);
    transform: translateX(-50%);
    z-index: 3;
}

.ba-handle::before {
    content: '◀ ▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent);
    color: #fff;
    padding: 8px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    white-space: nowrap;
}

.ba-label {
    position: absolute;
    top: 10px;
    padding: 4px 12px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.8rem;
    border-radius: 4px;
    z-index: 4;
}

.ba-label-before {
    left: 10px;
}

.ba-label-after {
    right: 10px;
}

/* ===== 放大镜效果 ===== */
.magnifier-container {
    position: relative;
    display: inline-block;
    cursor: crosshair;
}

.magnifier-glass {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    background-repeat: no-repeat;
    pointer-events: none;
    display: none;
    z-index: 10;
    box-shadow: 0 0 20px rgba(230, 126, 34, 0.5);
}

.magnifier-container:hover .magnifier-glass {
    display: block;
}

/* ===== 360度展台 ===== */
.turntable-viewer {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: grab;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.turntable-viewer:active {
    cursor: grabbing;
}

.turntable-viewer img {
    width: 100%;
    transition: transform 0.1s linear;
}

.turntable-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== 涂料色卡 ===== */
.paint-palette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.paint-swatch {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.paint-swatch:hover {
    transform: scale(1.3);
    border-color: var(--accent);
}

.paint-swatch::after {
    content: attr(data-color);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg);
    color: var(--text-main);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.paint-swatch:hover::after {
    opacity: 1;
}

/* ===== 排行榜 ===== */
.leaderboard {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 60px 1fr 120px 100px;
    padding: 12px 20px;
    background: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-light);
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 60px 1fr 120px 100px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    transition: var(--transition);
}

.leaderboard-row:hover {
    background: rgba(230, 126, 34, 0.05);
}

.leaderboard-rank {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
}

.leaderboard-name {
    font-weight: 500;
}

.leaderboard-technique {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.leaderboard-score {
    color: var(--accent);
    font-weight: 700;
}

/* ===== 评委点评 ===== */
.judge-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent);
}

.judge-card blockquote {
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 16px;
    line-height: 1.8;
    position: relative;
    padding-left: 20px;
}

.judge-card blockquote::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 2rem;
    color: var(--accent);
}

.judge-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.judge-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 700;
}

.judge-name {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
}

.judge-title {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== 页脚 ===== */
.footer {
    background: #111;
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

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

.footer-col h4 {
    color: var(--text-light);
    margin-bottom: 16px;
    font-size: 1rem;
}

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

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

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== 面包屑导航 ===== */
.breadcrumb {
    padding: 80px 0 20px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb span {
    color: var(--text-muted);
    margin: 0 8px;
}

.breadcrumb .current {
    color: var(--accent);
}

/* ===== 页面头部 ===== */
.page-hero {
    position: relative;
    height: 40vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 60px;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.3);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
}

.page-hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.page-hero-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ===== 内容区域 ===== */
.content-section {
    padding: 60px 0;
}

.content-block {
    margin-bottom: 40px;
}

.content-block h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.content-block p {
    margin-bottom: 16px;
    line-height: 1.9;
}

.content-block ul, .content-block ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.content-block li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* ===== 搜索页面 ===== */
.search-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-light);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--accent);
}

.search-result {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.search-result h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.search-result p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== 错误页面 ===== */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    padding: 40px;
}

.error-code {
    font-size: 8rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 0 40px rgba(44, 62, 80, 0.5);
}

.error-page h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* ===== 下载页面 ===== */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.download-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.download-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.download-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.download-card h3 {
    margin-bottom: 10px;
}

.download-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ===== 合规页面 ===== */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.legal-content h1 {
    font-size: 2rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent);
}

.legal-content h2 {
    font-size: 1.3rem;
    margin-top: 30px;
    margin-bottom: 12px;
}

.legal-content p {
    margin-bottom: 16px;
    line-height: 1.9;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .navbar-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(26, 26, 26, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    .navbar-nav.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero {
        height: 60vh;
    }

    .section {
        padding: 50px 0;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .leaderboard-header,
    .leaderboard-row {
        grid-template-columns: 40px 1fr 80px;
    }

    .leaderboard-technique {
        display: none;
    }

    .page-hero-content h1 {
        font-size: 1.8rem;
    }

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

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

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

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

    .ba-slider {
        max-width: 100%;
    }
}

/* ===== 动画效果 ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }

/* ===== 景深切换效果 ===== */
.depth-focus {
    transition: filter 0.5s ease;
}

.depth-focus:hover {
    filter: none;
}

.depth-blur {
    filter: blur(2px);
    transition: filter 0.5s ease;
}

.depth-blur:hover {
    filter: none;
}

/* ===== 笔刷显影效果 ===== */
@keyframes brushReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

.brush-reveal {
    animation: brushReveal 1.2s ease forwards;
}

/* ===== 滚动触发动画 ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
