/* 美容护肤博客 - 清新优雅风格 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e8a4b8;
    --primary-hover: #d4829a;
    --secondary-color: #f5c6d6;
    --accent-color: #ff9a9e;
    --background-color: #fff9fa;
    --surface-color: #ffffff;
    --surface-hover: #f8f4f5;
    --text-primary: #4a3f42;
    --text-secondary: #7a6b70;
    --text-muted: #a89a9e;
    --border-color: #f0e4e6;
    --accent-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    --soft-gradient: linear-gradient(180deg, #fff5f7 0%, #ffffff 100%);
    --card-shadow: 0 4px 20px rgba(232, 164, 184, 0.15);
    --card-shadow-hover: 0 8px 30px rgba(232, 164, 184, 0.25);
}

html {
    scroll-behavior: smooth;
}

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

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

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 249, 250, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo::before {
    content: '✿';
    font-size: 1.3rem;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 4px 0;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 英雄区域 */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--soft-gradient);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 154, 158, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(254, 207, 239, 0.2) 0%, transparent 30%);
    pointer-events: none;
}

.hero::after {
    content: '✿ ❀ ✿ ❀ ✿';
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    color: var(--secondary-color);
    letter-spacing: 20px;
    opacity: 0.6;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    position: relative;
    letter-spacing: 2px;
}

.hero h1 span {
    color: var(--primary-color);
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    line-height: 1.6;
}

.hero-tags {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.tag {
    padding: 10px 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

/* 文章区域 */
.articles-section {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* 文章网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

/* 文章卡片 */
.article-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    box-shadow: var(--card-shadow);
}

.article-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow-hover);
}

.card-image {
    width: 100%;
    height: 180px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.15'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10zm10 0c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10z'/%3E%3C/g%3E%3C/svg%3E");
}

.card-content {
    padding: 24px;
}

.card-category {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(232, 164, 184, 0.15);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.5;
}

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-meta .read-time {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 外链区域 */
.links-section {
    padding: 60px 0;
    background: var(--soft-gradient);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.links-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-primary);
    text-align: center;
}

.links-title::after {
    content: ' ❀';
    color: var(--primary-color);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.link-category {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.link-category:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.link-category-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.link-category-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.link-item {
    padding: 6px 12px;
    background: rgba(232, 164, 184, 0.1);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.link-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

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

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

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--text-primary);
    position: relative;
}

.footer-section h3::before {
    content: '✿ ';
    color: var(--primary-color);
}

.footer-section p,
.footer-section a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

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

.footer-bottom::before {
    content: '✿ ❀ ✿ ❀ ✿';
    display: block;
    margin-bottom: 10px;
    color: var(--secondary-color);
    letter-spacing: 8px;
}

/* 文章详情页样式 */
.article-header {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
    background: var(--soft-gradient);
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(255, 154, 158, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.article-header .category {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(232, 164, 184, 0.2);
    color: var(--primary-color);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
    position: relative;
}

.article-header h1 {
    font-size: 2.4rem;
    font-weight: 700;
    max-width: 800px;
    margin: 0 auto 24px;
    line-height: 1.4;
    position: relative;
    color: var(--text-primary);
}

.article-header .meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
}

.article-header .meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.article-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 48px 0 20px;
    color: var(--text-primary);
    position: relative;
    padding-left: 16px;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.article-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.9;
}

.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.article-content li::marker {
    color: var(--primary-color);
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 16px 24px;
    margin: 24px 0;
    background: rgba(232, 164, 184, 0.1);
    border-radius: 0 12px 12px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article-content img {
    max-width: 100%;
    border-radius: 16px;
    margin: 24px 0;
    box-shadow: var(--card-shadow);
}

.article-content .tip-box {
    background: rgba(232, 164, 184, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
}

.article-content .tip-box h4 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 10px;
}

.article-content .tip-box p {
    margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .hero::after {
        letter-spacing: 10px;
    }

    .nav-links {
        display: none;
    }

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

    .article-header h1 {
        font-size: 1.6rem;
    }

    .article-header .meta {
        flex-direction: column;
        gap: 12px;
    }

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

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 选择文本样式 */
::selection {
    background: var(--primary-color);
    color: white;
}

/* 淡入动画 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 浮动装饰 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}