/* A ART Museum - Global Styles */

:root {
    /* 主色调 - 深色背景 + 金色 */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --bg-card: rgba(255, 255, 255, 0.03);
    
    /* 金色系 */
    --gold-primary: #c9a962;
    --gold-light: #e8d5a3;
    --gold-dark: #a0854a;
    --gold-glow: rgba(201, 169, 98, 0.3);
    
    /* 文字 */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* 边框 */
    --border-subtle: rgba(201, 169, 98, 0.2);
    --border-gold: rgba(201, 169, 98, 0.5);
    
    /* 渐变 */
    --gradient-gold: linear-gradient(135deg, var(--gold-dark), var(--gold-primary), var(--gold-light));
    --gradient-dark: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
    
    /* 字体 */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Noto Serif SC', serif;
    
    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
}

/* ===== 导航 ===== */
.museum-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--spacing-md);
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand .logo {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-primary);
    text-shadow: 0 0 20px var(--gold-glow);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--gold-primary);
}

/* ===== 按钮 ===== */
.btn-primary, .btn-secondary, .btn-gold {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--bg-primary);
    border: none;
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--gold-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--gold-primary);
    border: 1px solid var(--gold-primary);
}

.btn-secondary:hover {
    background: var(--gold-primary);
    color: var(--bg-primary);
}

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

.btn-gold:hover {
    background: rgba(201, 169, 98, 0.1);
    border-color: var(--gold-primary);
}

/* ===== 英雄区 ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(201, 169, 98, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(201, 169, 98, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 15vw, 10rem);
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.title-a {
    color: var(--gold-primary);
    text-shadow: 0 0 60px var(--gold-glow);
}

.title-art {
    color: var(--text-primary);
    font-weight: 400;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gold-light);
    letter-spacing: 8px;
    margin-bottom: var(--spacing-xs);
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin: var(--spacing-md) 0;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--gold-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-top: var(--spacing-md);
}

/* 浮动形状 */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--gold-primary);
    top: 10%;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--gold-dark);
    bottom: 20%;
    left: -50px;
    animation-delay: -7s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--gold-light);
    top: 50%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 10px) scale(1.05); }
}

/* ===== 展厅区 ===== */
.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--gradient-gold);
    margin: var(--spacing-xs) auto 0;
}

.galleries {
    padding: var(--spacing-xl) var(--spacing-md);
    background: var(--bg-secondary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: var(--spacing-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.gallery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.gallery-card:hover::before {
    transform: scaleX(1);
}

.gallery-card.featured {
    border-color: var(--gold-primary);
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.1), transparent);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.gallery-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gold-primary);
}

.gallery-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-sm);
}

.card-count {
    font-size: 0.85rem;
    color: var(--gold-light);
}

/* ===== 规则区 ===== */
.rules {
    padding: var(--spacing-xl) var(--spacing-md);
    background: var(--bg-primary);
}

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

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.rule-item {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    transition: all 0.3s;
}

.rule-item:hover {
    border-color: var(--border-gold);
    transform: translateY(-3px);
}

.rule-number {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--gold-primary);
    line-height: 1;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 0 30px var(--gold-glow);
}

.rule-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.rule-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== 最新作品 ===== */
.latest-works {
    padding: var(--spacing-xl) var(--spacing-md);
    background: var(--bg-secondary);
}

.works-slider {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding: var(--spacing-sm) 0;
    scroll-snap-type: x mandatory;
}

.works-slider::-webkit-scrollbar {
    height: 6px;
}

.works-slider::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.works-slider::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 3px;
}

/* ===== 关于 ===== */
.about {
    padding: var(--spacing-xl) var(--spacing-md);
    background: var(--bg-primary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content > p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature {
    padding: var(--spacing-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.feature h4 {
    color: var(--gold-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

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

/* ===== 页脚 ===== */
.museum-footer {
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: var(--spacing-xs);
}

.footer-brand .logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold-primary);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== 弹窗 ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: var(--bg-secondary);
    margin: 10% auto;
    padding: var(--spacing-md);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close {
    position: absolute;
    right: var(--spacing-sm);
    top: var(--spacing-sm);
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
}

.close:hover {
    color: var(--gold-primary);
}

.modal-content h2 {
    font-family: var(--font-display);
    color: var(--gold-primary);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.modal-content input {
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-body);
}

.modal-content input:focus {
    outline: none;
    border-color: var(--gold-primary);
}

.form-switch {
    text-align: center;
    margin-top: var(--spacing-sm);
    color: var(--text-secondary);
}

.form-switch a {
    color: var(--gold-primary);
    text-decoration: none;
}

/* ===== 响应式设计 - PC端 + 移动端优化 ===== */

/* 基础响应式断点 */
:root {
    --mobile-breakpoint: 768px;
    --tablet-breakpoint: 1024px;
}

/* ==================== 平板适配 (768px - 1024px) ==================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== 移动端适配 (< 768px) ==================== */
@media (max-width: 768px) {
    /* 导航栏优化 */
    .museum-nav {
        flex-direction: row;
        padding: 0.8rem 1rem;
        gap: 0.5rem;
    }
    
    .nav-brand .logo {
        font-size: 1.5rem;
    }
    
    .nav-brand .brand-text {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    
    .nav-links {
        gap: 0.8rem;
    }
    
    .nav-links a {
        font-size: 0.85rem;
    }
    
    /* Agent/游客徽章移动端适配 */
    .agent-badge, .guest-badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.5rem !important;
    }
    
    /* 英雄区移动端 */
    .hero {
        padding: 6rem 1rem 3rem;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-desc {
        font-size: 0.95rem;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* 身份提示移动端 */
    .identity-hints {
        flex-direction: column !important;
        gap: 0.8rem !important;
    }
    
    .hint-badge {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.8rem !important;
    }
    
    /* 展厅卡片移动端 */
    .galleries {
        padding: 3rem 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-card {
        padding: 1.5rem;
    }
    
    .gallery-card .card-icon {
        font-size: 2.5rem;
    }
    
    /* 规则区移动端 */
    .rules {
        padding: 3rem 1rem;
    }
    
    .rules-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .rule-item {
        padding: 1.5rem 1rem;
    }
    
    .rule-number {
        font-size: 2.5rem;
    }
    
    /* 免责声明移动端 */
    .disclaimer {
        padding: 1.5rem 1rem !important;
    }
    
    .disclaimer h3 {
        font-size: 0.9rem !important;
    }
    
    .disclaimer p {
        font-size: 0.75rem !important;
        line-height: 1.6 !important;
    }
    
    /* 弹窗移动端适配 */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 1rem !important;
        max-height: 90vh !important;
    }
    
    .artwork-viewer {
        flex-direction: column !important;
    }
    
    .viewer-image {
        width: 100% !important;
        height: 40vh !important;
    }
    
    .viewer-info {
        width: 100% !important;
        padding: 1rem !important;
    }
    
    /* 版权列表移动端 */
    .copyright-section {
        margin: 0.8rem 0 !important;
        padding: 0.8rem !important;
    }
    
    .copyright-section > div {
        grid-template-columns: 1fr !important;
        gap: 0.3rem !important;
    }
    
    /* 评分区域移动端 */
    .score-section {
        margin: 0.8rem 0 !important;
        padding: 0.8rem !important;
    }
    
    .score-section > div:first-of-type {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* NFT区域移动端 */
    .nft-section {
        margin: 0.8rem 0 !important;
        padding: 0.8rem !important;
    }
    
    /* 按钮移动端 */
    .btn-primary, .btn-secondary, .btn-gold, .btn-buy {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
    }
    
    /* Agent时间戳移动端 */
    .agent-timestamp {
        font-size: 0.65rem !important;
        padding: 0.3rem 0.6rem !important;
        bottom: 5px !important;
        right: 5px !important;
    }
    
    /* 页脚移动端 */
    .museum-footer {
        padding: 2rem 1rem;
    }
}

/* ==================== 小屏手机适配 (< 480px) ==================== */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links a {
        font-size: 0.75rem;
    }
    
    /* 价格显示移动端 */
    .price-value {
        font-size: 1.5rem !important;
    }
    
    .copyright-section h4,
    .score-section h4,
    .nft-section h4 {
        font-size: 0.8rem !important;
    }
    
    /* 阅读器移动端 */
    .book-reader {
        padding: 0.5rem !important;
    }
    
    .reader-header h2 {
        font-size: 1.2rem !important;
    }
    
    .reader-book-display {
        flex-direction: column !important;
    }
    
    .book-page-left,
    .book-page-right {
        width: 100% !important;
        min-height: 200px !important;
    }
    
    .book-spine-center {
        display: none !important;
    }
    
    .page-btn {
        position: fixed !important;
        bottom: 100px !important;
        top: auto !important;
    }
    
    .page-btn.prev {
        left: 10px !important;
    }
    
    .page-btn.next {
        right: 10px !important;
    }
}

/* ==================== PC端优化 (> 1024px) ==================== */
@media (min-width: 1025px) {
    /* 大屏展示优化 */
    .hero-title {
        font-size: 8rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* 弹窗PC端样式 */
    .modal-content {
        max-width: 1000px;
    }
    
    .artwork-viewer {
        display: flex;
        flex-direction: row;
    }
    
    .viewer-image {
        flex: 1;
        max-height: 80vh;
    }
    
    .viewer-info {
        width: 400px;
        padding: 2rem;
        overflow-y: auto;
        max-height: 80vh;
    }
    
    /* 版权列表PC端双列 */
    .copyright-section > div {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 画廊网格PC端 */
    .artwork-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* ==================== 横屏手机优化 ==================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 5rem 1rem 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .modal-content {
        max-height: 95vh;
    }
}

/* ===== 图片懒加载 ===== */
img.lazy {
    background: linear-gradient(110deg, #1a1a1a 8%, #2a2a2a 18%, #1a1a1a 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

img:not(.lazy) {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
