/* ✨ 星空物语 - 二次元博客 v2 ✨ */

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

:root {
    --primary: #ff6b9d;
    --primary-light: #ffa0c4;
    --secondary: #a855f7;
    --accent: #60a5fa;
    --bg: #0a0618;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text: #ede8f5;
    --text-muted: #8b7faa;
    --text-dim: #5a5080;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --glass: rgba(255, 255, 255, 0.03);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --radius-lg: 24px;
}

body {
    font-family: 'Noto Sans SC', -apple-system, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(ellipse at 20% 10%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(255, 107, 157, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 90%, rgba(96, 165, 250, 0.06) 0%, transparent 50%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.8;
}

#stars, #sakura { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#sakura { z-index: 1; }

/* ===== 导航 ===== */
.navbar {
    position: fixed; top: 0; width: 100%; padding: 0.8rem 2.5rem;
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(10, 6, 24, 0.75); backdrop-filter: blur(24px) saturate(1.5);
    border-bottom: 1px solid var(--border); z-index: 100;
    transition: all 0.3s;
}
.nav-brand { display: flex; align-items: center; gap: 0.5rem; }
.nav-icon { font-size: 1.4rem; animation: float 3s ease-in-out infinite; }
.nav-title {
    font-size: 1.2rem; font-weight: 700; text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links { display: flex; list-style: none; gap: 0.3rem; }
.nav-links a {
    color: var(--text-muted); text-decoration: none; padding: 0.4rem 0.9rem;
    border-radius: 10px; transition: all 0.3s; font-size: 0.85rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary-light); background: rgba(255, 107, 157, 0.08); }

/* ===== Hero ===== */
.hero {
    position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    min-height: 85vh; text-align: center; padding: 8rem 2rem 4rem;
}
.hero-content { max-width: 700px; }
.hero-badge {
    display: inline-block; padding: 0.4rem 1.4rem; border-radius: 30px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(255, 107, 157, 0.15); font-size: 0.8rem;
    color: var(--primary-light); margin-bottom: 2rem; letter-spacing: 2px;
}
.hero h1 {
    font-size: 4.5rem; font-weight: 900; line-height: 1.2; margin-bottom: 1.2rem;
    letter-spacing: -2px;
}
.highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: gradientShift 5s ease infinite;
    background-size: 200% 200%;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.hero-subtitle { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 2rem; line-height: 2; }
.hero-tags { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.tag {
    padding: 0.35rem 1rem; border-radius: 20px; font-size: 0.85rem;
    background: var(--glass); border: 1px solid var(--border);
    transition: all 0.3s; color: var(--text-muted);
}
.tag:hover { background: rgba(255, 107, 157, 0.1); border-color: var(--primary); color: var(--primary-light); transform: translateY(-2px); }
.hero-scroll { color: var(--text-dim); font-size: 0.8rem; animation: float 2s ease-in-out infinite; }
.scroll-arrow { font-size: 1.2rem; margin-top: 0.3rem; }

/* ===== 容器 ===== */
.container {
    position: relative; z-index: 2;
    max-width: 1100px; margin: 0 auto; padding: 0 2rem 4rem;
}

/* ===== Section Title ===== */
.section-title {
    font-size: 1.6rem; font-weight: 700; margin-bottom: 0.5rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.title-icon { font-size: 1.3rem; }
.section-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2.5rem; }

/* ===== 置顶文章 ===== */
.featured-section { margin-bottom: 3rem; }
.featured-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    display: grid; grid-template-columns: 380px 1fr;
    transition: all 0.4s; margin-bottom: 2rem;
}
.featured-card:hover {
    border-color: var(--border-hover); box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.featured-image {
    position: relative; min-height: 280px;
    display: flex; align-items: center; justify-content: center;
}
.featured-overlay {
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.featured-badge {
    padding: 0.3rem 1rem; border-radius: 20px;
    background: rgba(0,0,0,0.3); backdrop-filter: blur(10px);
    font-size: 0.8rem; color: #fff;
}
.featured-emoji { font-size: 4rem; filter: drop-shadow(0 4px 15px rgba(0,0,0,0.3)); animation: float 3s ease-in-out infinite; }
.featured-content { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.card-meta { display: flex; gap: 1rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.meta-date, .meta-read { color: var(--text-dim); font-size: 0.8rem; }
.meta-category {
    font-size: 0.8rem; color: var(--primary-light);
    background: rgba(255, 107, 157, 0.1); padding: 0.15rem 0.6rem; border-radius: 8px;
}
.featured-content h2 {
    font-size: 1.5rem; margin-bottom: 1rem; line-height: 1.5;
    background: linear-gradient(135deg, var(--text), var(--primary-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.featured-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.9; }
.read-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--primary); text-decoration: none; font-weight: 500; font-size: 0.95rem;
    padding: 0.6rem 1.5rem; border: 1px solid rgba(255, 107, 157, 0.2); border-radius: 10px;
    transition: all 0.3s; width: fit-content;
}
.read-btn:hover { background: rgba(255, 107, 157, 0.1); border-color: var(--primary); }
.read-btn .arrow { transition: transform 0.3s; }
.read-btn:hover .arrow { transform: translateX(4px); }

/* ===== 文章网格 ===== */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.article-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden; transition: all 0.4s;
}
.article-card:hover { transform: translateY(-6px); border-color: var(--border-hover); box-shadow: var(--shadow-lg); }
.card-cover {
    height: 160px; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.card-cover::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
    background: linear-gradient(transparent, var(--bg-card));
}
.cover-icon { font-size: 3rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2)); z-index: 1; }
.card-body { padding: 1.5rem; }
.card-body .card-meta { margin-bottom: 0.6rem; }
.card-body h3 {
    font-size: 1.05rem; margin-bottom: 0.6rem; line-height: 1.5;
    color: var(--text); transition: color 0.3s;
}
.article-card:hover h3 { color: var(--primary-light); }
.card-body p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-link { color: var(--primary); text-decoration: none; font-size: 0.85rem; font-weight: 500; transition: all 0.3s; }
.card-link:hover { color: var(--primary-light); letter-spacing: 1px; }

/* ===== 信息区 ===== */
.info-section { margin-top: 1rem; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.info-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; transition: all 0.3s;
}
.info-card:hover { border-color: var(--border-hover); }
.widget-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.2rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border); }
.widget-icon { font-size: 1.3rem; }
.widget-header h3 { font-size: 1rem; font-weight: 600; }

/* 关于 */
.about-body { text-align: center; }
.about-avatar { font-size: 3.5rem; margin-bottom: 0.5rem; animation: float 3s ease-in-out infinite; }
.about-body h4 { font-size: 1.1rem; color: var(--primary); margin-bottom: 0.5rem; }
.about-body > p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.2rem; line-height: 1.8; }
.about-stats { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1.2rem; }
.about-stat .num { display: block; font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.about-stat .label { font-size: 0.75rem; color: var(--text-dim); }
.about-btn {
    display: inline-block; padding: 0.5rem 1.5rem; border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(255, 107, 157, 0.2); color: var(--primary-light);
    text-decoration: none; font-size: 0.85rem; transition: all 0.3s;
}
.about-btn:hover { background: linear-gradient(135deg, rgba(255, 107, 157, 0.25), rgba(168, 85, 247, 0.25)); transform: translateY(-2px); }

/* 分类 */
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
.cat-item {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem;
    border-radius: 10px; background: var(--glass); border: 1px solid var(--border);
    text-decoration: none; transition: all 0.3s;
}
.cat-item:hover { border-color: var(--cat-color); background: rgba(255,255,255,0.04); transform: translateX(4px); }
.cat-icon { font-size: 1.2rem; }
.cat-name { flex: 1; font-size: 0.85rem; color: var(--text-muted); }
.cat-count { font-size: 0.75rem; color: var(--text-dim); background: var(--glass); padding: 0.1rem 0.5rem; border-radius: 8px; }

/* 标签云 */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-pill {
    padding: 0.3rem 0.8rem; border-radius: 10px; font-size: 0.8rem;
    text-decoration: none; transition: all 0.3s; border: 1px solid;
}
.tag-pill.t1 { background: rgba(255, 107, 157, 0.1); color: var(--primary-light); border-color: rgba(255, 107, 157, 0.15); }
.tag-pill.t2 { background: rgba(168, 85, 247, 0.1); color: #c084fc; border-color: rgba(168, 85, 247, 0.15); }
.tag-pill.t3 { background: rgba(96, 165, 250, 0.1); color: #93c5fd; border-color: rgba(96, 165, 250, 0.15); }
.tag-pill.t4 { background: rgba(52, 211, 153, 0.1); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.15); }
.tag-pill:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

/* 友链 */
.friend-list { display: flex; flex-direction: column; gap: 0.6rem; }
.friend-item {
    display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem;
    border-radius: 10px; text-decoration: none; transition: all 0.3s;
}
.friend-item:hover { background: var(--glass); }
.friend-avatar { font-size: 1.5rem; }
.friend-name { display: block; font-size: 0.9rem; color: var(--text); }
.friend-desc { font-size: 0.75rem; color: var(--text-dim); }
.more-link { display: block; text-align: center; margin-top: 1rem; color: var(--primary); text-decoration: none; font-size: 0.85rem; }
.more-link:hover { color: var(--primary-light); }

/* ===== 页脚 ===== */
.footer {
    position: relative; z-index: 2;
    border-top: 1px solid var(--border); background: rgba(10, 6, 24, 0.6);
    padding: 3rem 2rem;
}
.footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.footer-logo {
    font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.footer-brand p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1.5rem; }
.footer-links a { color: var(--text-dim); text-decoration: none; font-size: 0.85rem; transition: color 0.3s; }
.footer-links a:hover { color: var(--primary-light); }
.footer-copy p { color: var(--text-dim); font-size: 0.8rem; }

/* 回到顶部 */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 99;
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none; color: #fff; font-size: 1.2rem; cursor: pointer;
    opacity: 0; transform: translateY(20px); transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.3);
}
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(255, 107, 157, 0.4); }

/* ===== 动画 ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .featured-card { grid-template-columns: 1fr; }
    .featured-image { min-height: 200px; }
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3rem; }
}
@media (max-width: 600px) {
    .navbar { padding: 0.6rem 1rem; }
    .nav-links { gap: 0.2rem; }
    .nav-links a { font-size: 0.75rem; padding: 0.3rem 0.5rem; }
    .hero { padding: 7rem 1.5rem 3rem; min-height: 70vh; }
    .hero h1 { font-size: 2.5rem; }
    .container { padding: 0 1rem 3rem; }
    .articles-grid { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: 1fr; }
    .about-stats { gap: 1.5rem; }
}

/* ===== 文章详情页 ===== */
.article-page {
    position: relative; z-index: 2;
    max-width: 860px; margin: 0 auto; padding: 7rem 2rem 3rem;
}
.article-container {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden; backdrop-filter: blur(10px);
}
.article-header {
    padding: 2.5rem 3rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.06), rgba(168, 85, 247, 0.06));
    border-bottom: 1px solid var(--border);
}
.article-header .article-meta { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.article-header .article-meta span { font-size: 0.85rem; color: var(--text-muted); }
.article-header h1 {
    font-size: 2rem; line-height: 1.4; margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.article-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.article-body { padding: 2rem 3rem 3rem; }
.article-body h2 {
    font-size: 1.3rem; margin: 2rem 0 1rem; padding-left: 0.8rem;
    border-left: 4px solid var(--primary); color: var(--text);
}
.article-body h3 { font-size: 1.1rem; margin: 1.5rem 0 0.8rem; color: var(--primary-light); }
.article-body p { margin-bottom: 1rem; color: var(--text-muted); line-height: 2; }
.article-body ul { margin: 1rem 0; padding-left: 1.5rem; color: var(--text-muted); }
.article-body li { margin-bottom: 0.5rem; line-height: 1.8; }
.article-body strong { color: var(--text); }
.article-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.author-box {
    display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem;
    padding: 1.5rem; background: var(--glass); border-radius: 12px;
}
.author-avatar { font-size: 3rem; }
.author-name { font-weight: 700; color: var(--primary); font-size: 1.1rem; }
.author-desc { color: var(--text-muted); font-size: 0.9rem; }
.article-nav { display: flex; justify-content: space-between; }
.article-nav a {
    color: var(--primary); text-decoration: none; padding: 0.6rem 1.2rem;
    border: 1px solid var(--border); border-radius: 10px; transition: all 0.3s;
}
.article-nav a:hover { background: rgba(255, 107, 157, 0.1); border-color: var(--primary); }

/* ===== 关于页面 ===== */
.about-page { text-align: center; }
.about-hero {
    padding: 2rem; background: linear-gradient(135deg, rgba(255, 107, 157, 0.06), rgba(168, 85, 247, 0.06));
    border-bottom: 1px solid var(--border);
}
.about-page .about-avatar { font-size: 6rem; animation: float 3s ease-in-out infinite; margin-bottom: 1rem; }
.about-hero h1 {
    font-size: 2rem; background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.5rem;
}
.about-subtitle { color: var(--text-muted); font-size: 1.1rem; }
.about-content { padding: 2rem 3rem 3rem; text-align: left; }
.about-content h2 { font-size: 1.3rem; margin: 2rem 0 1rem; padding-left: 0.8rem; border-left: 4px solid var(--primary); }
.about-content p { color: var(--text-muted); line-height: 2; margin-bottom: 0.8rem; }
.hobby-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0; }
.hobby-card {
    background: var(--glass); border: 1px solid var(--border); border-radius: 12px;
    padding: 1.5rem; text-align: center; transition: all 0.3s;
}
.hobby-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow); }
.hobby-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.hobby-card h3 { color: var(--primary-light); margin-bottom: 0.5rem; }
.hobby-card p { font-size: 0.9rem; color: var(--text-muted); }
.contact-list { display: flex; flex-direction: column; gap: 0.8rem; margin: 1rem 0; }
.contact-item { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 1rem; background: var(--glass); border-radius: 8px; color: var(--text-muted); }
.contact-item span:first-child { font-size: 1.3rem; }
.blog-info { background: var(--glass); border-radius: 12px; padding: 1.5rem; margin: 1rem 0; }
.blog-info p { margin-bottom: 0.5rem; }

/* ===== 友链页面 ===== */
.links-page { padding: 2rem 3rem 3rem; }
.links-page h1 {
    font-size: 2rem; text-align: center; margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.links-intro { text-align: center; color: var(--text-muted); margin-bottom: 2rem; }
.links-page h2 { font-size: 1.3rem; margin: 2rem 0 1rem; padding-left: 0.8rem; border-left: 4px solid var(--primary); }
.friend-links-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1rem 0; }
.friend-card {
    display: flex; align-items: center; gap: 1rem; padding: 1.2rem;
    background: var(--glass); border: 1px solid var(--border); border-radius: 12px;
    text-decoration: none; transition: all 0.3s;
}
.friend-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow); }
.friend-card .friend-avatar { font-size: 2.5rem; }
.friend-card .friend-info h3 { color: var(--text); font-size: 1rem; margin-bottom: 0.3rem; }
.friend-card .friend-info p { color: var(--text-muted); font-size: 0.85rem; }
.apply-rules { background: var(--glass); border-radius: 12px; padding: 1.5rem; margin: 1rem 0; }
.apply-rules p { color: var(--text-muted); margin-bottom: 0.8rem; }
.apply-rules ul { list-style: none; padding: 0; margin: 1rem 0; }
.apply-rules li { color: var(--text-muted); padding: 0.3rem 0; }
.apply-format { background: rgba(0, 0, 0, 0.2); border-radius: 8px; padding: 1rem; margin: 1rem 0; }
.apply-format p { font-size: 0.9rem; margin-bottom: 0.3rem; }

@media (max-width: 700px) {
    .article-header { padding: 1.5rem; }
    .article-body { padding: 1.5rem; }
    .article-header h1 { font-size: 1.5rem; }
    .about-content, .links-page { padding: 1.5rem; }
    .hobby-grid, .friend-links-grid { grid-template-columns: 1fr; }
}
