/* ========================================
   小语的作品集 - 样式文件
   治愈系风格 🌸
======================================== */

/* CSS变量 */
:root {
    --primary: #FFB6C1;        /* 樱花粉 */
    --primary-light: #FFD1DC; /* 浅粉 */
    --secondary: #98FB98;      /* 薄荷绿 */
    --accent: #FFD700;        /* 阳光金 */
    --bg-white: #FAFAFA;      /* 云朵白 */
    --bg-pink: #FFF5F8;       /* 淡粉白 */
    --text-dark: #333333;      /* 深灰 */
    --text-light: #666666;     /* 中灰 */
    --shadow: 0 4px 20px rgba(255, 182, 193, 0.3);
    --shadow-hover: 0 8px 30px rgba(255, 182, 193, 0.5);
    --radius: 20px;
    --radius-sm: 12px;
}

/* 重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 飘落的花瓣 */
.petals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.petal {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-light);
    border-radius: 50% 0 50% 50%;
    opacity: 0.6;
    animation: fall 10s linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* 导航 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 20px;
    font-weight: 500;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* 欢迎区 */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #FFF5F8 0%, #FFF 50%, #F5FFF5 100%);
    padding: 120px 20px 80px;
}

.hero-title {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* 区块标题 */
.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* 特色作品 */
.featured {
    padding: 80px 0;
    background: var(--bg-white);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.work-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.work-cover {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
}

.work-info {
    padding: 20px;
}

.work-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.work-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-light);
}

.work-tag {
    background: var(--bg-pink);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

/* 分类入口 */
.categories {
    padding: 80px 0;
    background: var(--bg-pink);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.category-card {
    background: white;
    padding: 40px 20px;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 15px;
}

.category-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

/* 关于预览 */
.about-preview {
    padding: 80px 0;
    background: white;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 800px;
    margin: 0 auto;
}

.about-avatar {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    flex-shrink: 0;
}

.about-text h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 10px;
}

.link-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.link-more:hover {
    text-decoration: underline;
}

/* 页脚 */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-family {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.7;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-links {
        gap: 20px;
    }
    
    .hero {
        min-height: 60vh;
        padding: 100px 20px 60px;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    
    .section-title {
        font-size: 24px;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
    color: var(--text-light);
}

.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
