/* 云却梦的家 - 展示官网样式 */
/* 浅色调设计，清新自然 */

:root {
    --primary: #4a6fa5;
    --primary-light: #6b8fc5;
    --bg: #f8f6f3;
    --bg-card: #ffffff;
    --bg-hover: #f0ece8;
    --text: #2d3436;
    --text-light: #636e72;
    --border: #e0dbd5;
    --accent: #00b894;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-lg: 20px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.7;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent);
}

/* 导航 */
.navbar {
    background: var(--bg-card);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-logo {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--bg-hover);
    color: var(--text);
}

.nav-admin {
    color: var(--text-light) !important;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* 页面区域 */
.page-section {
    min-height: calc(100vh - 140px);
}

.hidden {
    display: none !important;
}

/* Hero */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bg-card);
    padding: 60px 24px;
    margin-bottom: 40px;
}

.hero-content {
    max-width: 500px;
}

.hero-content .avatar {
    font-size: 4rem;
    margin-bottom: 16px;
}

.hero-content h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.hero-content .intro {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 32px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-text {
    color: var(--text-light);
    font-size: 0.85rem;
}

.btn-hero {
    padding: 12px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-hero:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* 区块 */
.section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.section h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 6px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 作品网格 */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.work-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.work-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.work-card-cover {
    width: 100%;
    height: 160px;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-light);
    overflow: hidden;
}

.work-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-card-body {
    padding: 16px 20px 20px;
}

.work-card-type {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-hover);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--primary);
    margin-bottom: 6px;
}

.work-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.work-card-summary {
    color: var(--text-light);
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.work-card-meta {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.8rem;
}

.more-link {
    text-align: center;
    margin-top: 32px;
}

.more-link a {
    color: var(--primary);
    font-weight: 500;
}

/* 作品详情 */
.work-detail {
    max-width: 700px;
    margin: 0 auto;
    padding: 32px 24px 40px;
}

.back-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-light);
    padding: 6px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.back-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.detail-cover {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.detail-header {
    margin-bottom: 24px;
}

.detail-header h1 {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.detail-meta {
    display: flex;
    gap: 16px;
    color: var(--text-light);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.detail-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
}

.detail-content p {
    margin-bottom: 14px;
}

.detail-content img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 20px 0;
}

/* 评论 */
.comments-section {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.comments-section h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.comment-form {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-family: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-form button {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
}

.comments-list .comment-item {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 600;
    color: var(--primary);
}

.comment-time {
    color: var(--text-light);
    font-size: 0.8rem;
}

.comment-text {
    color: var(--text);
    font-size: 0.95rem;
}

.empty {
    color: var(--text-light);
    text-align: center;
    padding: 32px;
}

/* 关于 */
.about-card {
    background: var(--bg-card);
    padding: 48px 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid var(--border);
}

.avatar-large {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.about-card h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.bio {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 24px;
    line-height: 1.7;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.social-link {
    padding: 8px 20px;
    background: var(--bg-hover);
    border-radius: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.social-link:hover {
    background: var(--primary);
    color: white;
}

/* 按钮 */
.btn-primary {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

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

/* 加载/空状态 */
.loading, .empty {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* 页脚 */
footer {
    background: var(--bg-card);
    padding: 24px;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 响应式 */
@media (max-width: 640px) {
    .nav-links {
        gap: 4px;
    }
    
    .nav-links a {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    .hero-stats {
        gap: 24px;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .works-grid {
        grid-template-columns: 1fr;
    }
    
    .about-card {
        padding: 32px 20px;
    }
}