/* ============================================================
   个人网站 - 二次元古早风 样式表
   ============================================================ */

/* ---------- 字体引入 ---------- */
@import url('https://fonts.googleapis.com/css2?family=ZCOOL+KuaiLe&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;700&display=swap');

/* ---------- 全局重置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #fff5f5 0%, #fff0f5 30%, #fce4ec 70%, #f8bbd0 100%);
    color: #5a3e4a;
    line-height: 1.8;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰：飘落的星星 */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(2px 2px at 10% 20%, #ffb6c1 50%, transparent 50%),
        radial-gradient(2px 2px at 30% 40%, #ffc0cb 50%, transparent 50%),
        radial-gradient(2px 2px at 50% 10%, #ffdab9 50%, transparent 50%),
        radial-gradient(2px 2px at 70% 60%, #e8a0bf 50%, transparent 50%),
        radial-gradient(2px 2px at 90% 30%, #ffb6c1 50%, transparent 50%),
        radial-gradient(3px 3px at 20% 70%, #ffc0cb 50%, transparent 50%),
        radial-gradient(2px 2px at 80% 80%, #ffdab9 50%, transparent 50%),
        radial-gradient(2px 2px at 40% 90%, #e8a0bf 50%, transparent 50%),
        radial-gradient(3px 3px at 60% 50%, #ffb6c1 50%, transparent 50%);
    background-size: 200px 200px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* ---------- 顶部导航 ---------- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 240, 245, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 2px dashed #f0b4c4;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(255, 150, 180, 0.15);
}

.nav-brand {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 1.5em;
    color: #d4728a;
    text-decoration: none;
    text-shadow: 2px 2px 0 #ffe4e1;
}

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

.nav-links a {
    text-decoration: none;
    color: #7a5a6a;
    font-size: 0.95em;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1.5px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    background: #ffe4e1;
    border-color: #f0b4c4;
    color: #d4728a;
    transform: translateY(-2px);
}

.nav-links a::after {
    content: ' ★';
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.7em;
}

.nav-links a:hover::after {
    opacity: 1;
}

/* ---------- 主容器 ---------- */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 80px 20px 40px;
    position: relative;
    z-index: 1;
}

/* ---------- 首页 Hero 区 ---------- */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
    position: relative;
}

.hero-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid #f0b4c4;
    box-shadow: 0 8px 30px rgba(220, 120, 160, 0.25);
    margin-bottom: 20px;
    object-fit: cover;
    background: linear-gradient(135deg, #ffe4e1, #fce4ec);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5em;
}

.hero h1 {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 2.8em;
    color: #d4728a;
    text-shadow: 3px 3px 0 #ffe4e1;
    margin-bottom: 10px;
    line-height: 1.3;
}

.hero .subtitle {
    font-size: 1.15em;
    color: #a08090;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.hero .signature {
    background: rgba(255, 228, 225, 0.6);
    border: 2px dashed #f0b4c4;
    border-radius: 16px;
    padding: 16px 30px;
    display: inline-block;
    font-size: 1em;
    color: #7a5a6a;
    position: relative;
}

.hero .signature::before {
    content: '💬 ';
}

.hero .signature::after {
    content: ' 💬';
}

/* ---------- 装饰分隔线 ---------- */
.divider {
    text-align: center;
    margin: 50px 0 30px;
    font-size: 1.5em;
    color: #f0b4c4;
    letter-spacing: 12px;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    display: inline-block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #f0b4c4, transparent);
    vertical-align: middle;
    margin: 0 15px;
}

/* ---------- 板块标题 ---------- */
.section-title {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 2em;
    color: #d4728a;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 #ffe4e1;
}

.section-subtitle {
    text-align: center;
    color: #a08090;
    font-size: 0.95em;
    margin-bottom: 35px;
}

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

.card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 2px solid #f5d0d8;
    padding: 28px 22px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(255, 192, 203, 0.08), transparent 60%);
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(220, 120, 160, 0.2);
    border-color: #e8a0bf;
}

.card:hover::before {
    transform: scale(1.1);
}

/* 卡片顶部分类标签 */
.card-tag {
    display: inline-block;
    font-size: 0.75em;
    padding: 2px 12px;
    border-radius: 12px;
    background: #ffe4e1;
    color: #d4728a;
    margin-bottom: 10px;
    border: 1px solid #f0b4c4;
}

.card h3 {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 1.25em;
    color: #5a3e4a;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.card .date {
    font-size: 0.8em;
    color: #b090a0;
    margin-bottom: 10px;
}

.card p {
    font-size: 0.9em;
    color: #7a5a6a;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.card .read-more {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85em;
    color: #d4728a;
    text-decoration: none;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.card .read-more::after {
    content: ' →';
}

.card .read-more:hover {
    color: #e06080;
}

/* 作品卡片的特色样式 */
.card.work-card .card-tag {
    background: #e8e0ff;
    color: #7a6aa0;
    border-color: #c8b8e0;
}

.card.work-card:hover {
    border-color: #c8b8e0;
    box-shadow: 0 12px 40px rgba(160, 120, 200, 0.18);
}

/* 作品占位预览 */
.work-preview {
    width: 100%;
    height: 140px;
    border-radius: 12px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #ffe4e1, #fce4ec);
    border: 2px dashed #f0b4c4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    color: #d4728a;
    transition: all 0.3s ease;
}

.card.work-card:hover .work-preview {
    border-color: #e8a0bf;
    transform: scale(1.02);
}

/* ---------- 关于我（首页内嵌） ---------- */
.about-section {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    border: 2px solid #f5d0d8;
    padding: 40px;
    margin: 40px 0;
    text-align: center;
}

.about-section .avatar-large {
    font-size: 5em;
    margin-bottom: 15px;
    display: block;
}

.about-section h2 {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 2em;
    color: #d4728a;
    margin-bottom: 8px;
}

.about-section .about-desc {
    max-width: 600px;
    margin: 0 auto;
    color: #7a5a6a;
    font-size: 0.95em;
    line-height: 1.9;
}

.about-section .about-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.about-section .about-tags span {
    background: #ffe4e1;
    border: 1.5px solid #f0b4c4;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    color: #d4728a;
}

/* ---------- 页脚 ---------- */
footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 2px dashed #f0b4c4;
    margin-top: 40px;
    background: rgba(255, 240, 245, 0.5);
}

footer .footer-icons {
    font-size: 1.2em;
    margin-bottom: 10px;
    letter-spacing: 8px;
}

footer p {
    color: #b090a0;
    font-size: 0.85em;
}

footer .footer-links {
    margin-top: 12px;
}

footer .footer-links a {
    color: #d4728a;
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.9em;
}

footer .footer-links a:hover {
    text-decoration: underline;
}

/* ---------- 子页面样式 ---------- */
.page-header {
    text-align: center;
    padding: 40px 0 20px;
}

.page-header h1 {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 2.5em;
    color: #d4728a;
    text-shadow: 2px 2px 0 #ffe4e1;
    margin-bottom: 8px;
}

.page-header .breadcrumb {
    font-size: 0.85em;
    color: #b090a0;
}

.page-header .breadcrumb a {
    color: #d4728a;
    text-decoration: none;
}

.page-header .breadcrumb a:hover {
    text-decoration: underline;
}

/* ---------- 文章详情 ---------- */
.article-detail {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    border: 2px solid #f5d0d8;
    padding: 50px 40px;
    margin: 20px 0;
}

.article-detail .article-meta {
    font-size: 0.85em;
    color: #b090a0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #f0b4c4;
}

.article-detail h1 {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 2em;
    color: #d4728a;
    margin-bottom: 5px;
}

.article-detail h2 {
    font-family: 'ZCOOL KuaiLe', cursive;
    color: #c8708a;
    margin: 30px 0 15px;
    font-size: 1.4em;
}

.article-detail p {
    margin-bottom: 18px;
    color: #5a3e4a;
    line-height: 1.9;
}

.article-detail ul, .article-detail ol {
    margin: 15px 0;
    padding-left: 28px;
}

.article-detail li {
    margin-bottom: 8px;
}

.article-detail code {
    background: #f5e8ec;
    padding: 2px 10px;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: #c86080;
}

.article-detail pre {
    background: #2d2530;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-detail pre code {
    background: transparent;
    color: #f0d8e0;
    padding: 0;
}

.article-detail blockquote {
    border-left: 4px solid #f0b4c4;
    padding: 12px 20px;
    margin: 20px 0;
    background: #faf0f2;
    border-radius: 0 12px 12px 0;
    color: #7a5a6a;
}

.article-detail img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
    border: 2px solid #f5d0d8;
}

/* ---------- 联系/留言 ---------- */
.contact-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    border: 2px solid #f5d0d8;
    padding: 40px;
    margin: 20px 0;
    text-align: center;
}

.contact-card h2 {
    font-family: 'ZCOOL KuaiLe', cursive;
    color: #d4728a;
    margin-bottom: 20px;
}

.contact-card p {
    color: #7a5a6a;
    margin-bottom: 20px;
}

.contact-card .contact-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-card .contact-item {
    background: #ffe4e1;
    border: 2px solid #f0b4c4;
    border-radius: 16px;
    padding: 20px 30px;
    min-width: 140px;
    text-decoration: none;
    color: #5a3e4a;
    transition: all 0.3s ease;
}

.contact-card .contact-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(220, 120, 160, 0.2);
}

.contact-card .contact-item .icon {
    font-size: 2em;
    display: block;
    margin-bottom: 6px;
}

.contact-card .contact-item .label {
    font-size: 0.9em;
    font-weight: 700;
}

/* ---------- 加载动画 ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .about-section, .article-detail, .contact-card {
    animation: fadeInUp 0.6s ease forwards;
}

.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    nav {
        padding: 10px 16px;
        flex-direction: column;
        gap: 8px;
    }

    .nav-brand { font-size: 1.2em; }

    .nav-links {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 0.85em;
        padding: 4px 12px;
    }

    .container { padding: 90px 14px 30px; }

    .hero h1 { font-size: 2em; }

    .hero-avatar { width: 100px; height: 100px; font-size: 2.8em; }

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

    .about-section { padding: 24px 18px; }

    .article-detail { padding: 24px 18px; }

    .contact-card .contact-icons { flex-direction: column; align-items: center; }

    .divider::before, .divider::after { width: 30px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.6em; }
    .section-title { font-size: 1.5em; }
    .hero .signature { font-size: 0.85em; padding: 12px 18px; }
}
