/**
 * The Pleiades — 奇幻风格主样式
 * 深色星空背景、金色/银色点缀、易读字体，兼顾 SEO 与可访问性
 */

/* ========== 基础与变量 ========== */
:root {
    --bg-deep: #0a0a12;
    --bg-mid: #12121f;
    --bg-card: rgba(22, 22, 38, 0.85);
    --text-primary: #e8e6e3;
    --text-muted: #a09b92;
    --accent-gold: #c9a227;
    --accent-silver: #b8b5ae;
    --accent-glow: rgba(201, 162, 39, 0.25);
    --border-subtle: rgba(201, 162, 39, 0.2);
    --font-serif: "Cormorant Garamond", Georgia, serif;
    --font-sans: "Source Sans 3", system-ui, sans-serif;
    --space-unit: 1rem;
    --radius: 8px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-deep);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ========== 星空背景层（装饰用） ========== */
.stars,
.twinkling {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.stars {
    background: radial-gradient(ellipse at 50% 0%, #1a1a2e 0%, var(--bg-deep) 50%);
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 50px 160px, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 90px 40px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.4), transparent);
    background-size: 200px 200px;
    background-repeat: repeat;
    opacity: 0.9;
}

.twinkling {
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.01' numOctaves='2' /%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
    animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ========== 布局容器 ========== */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--space-unit);
    position: relative;
    z-index: 1;
}

/* ========== 站头 ========== */
.site-header {
    padding: calc(var(--space-unit) * 2) 0;
    text-align: center;
}

.site-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.05em;
    color: var(--accent-silver);
}

.title-icon {
    color: var(--accent-gold);
    margin-right: 0.25em;
}

.site-tagline {
    margin: 0.25em 0 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ========== 主内容区 ========== */
.main-content {
    padding: calc(var(--space-unit) * 2) 0 calc(var(--space-unit) * 3);
}

/* ========== 首屏区块 ========== */
.hero {
    text-align: center;
    padding: calc(var(--space-unit) * 2) 0;
}

.hero-intro {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: calc(var(--space-unit) * 1.5);
}

.hero-intro strong {
    color: var(--accent-gold);
    font-weight: 600;
}

/* 生日表单 */
.birthday-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-unit);
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-unit);
}

.birthday-form select {
    font-family: var(--font-sans);
    font-size: 1rem;
    padding: 0.5em 0.75em;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    min-width: 5rem;
    cursor: pointer;
}

.birthday-form select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.btn-primary {
    font-family: var(--font-sans);
    font-size: 1rem;
    padding: 0.6em 1.2em;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #a68520 100%);
    color: var(--bg-deep);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.hero-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* ========== 关于区块 ========== */
.about {
    padding: calc(var(--space-unit) * 2) 0;
}

.about h2 {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    text-align: center;
    margin-bottom: calc(var(--space-unit) * 1.5);
    color: var(--accent-silver);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-unit);
}

@media (min-width: 600px) {
    .about-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: calc(var(--space-unit) * 1.25);
}

.about-card h3 {
    font-size: 1rem;
    margin: 0 0 0.5em;
    color: var(--accent-gold);
}

.about-card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ========== 示例链接 ========== */
.sample-link {
    text-align: center;
    padding: var(--space-unit) 0;
}

.sample-link a {
    color: var(--accent-gold);
    text-decoration: none;
    border-bottom: 1px solid var(--border-subtle);
}

.sample-link a:hover {
    border-bottom-color: var(--accent-gold);
}

/* ========== 页脚 ========== */
.site-footer {
    padding: calc(var(--space-unit) * 2) 0;
    text-align: center;
    border-top: 1px solid var(--border-subtle);
}

.site-footer small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========== 无障碍：仅屏幕阅读器 ========== */
/* ========== 日期详情页（day/MM-DD.html） ========== */
.day-page .page-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.5em;
    color: var(--accent-silver);
}

.day-page .page-date {
    text-align: center;
    font-size: 0.95rem;
    color: var(--accent-gold);
    margin-bottom: calc(var(--space-unit) * 2);
}

.day-page .content-section {
    margin-bottom: calc(var(--space-unit) * 2);
}

.day-page .content-section h2 {
    font-size: 1.1rem;
    color: var(--accent-gold);
    margin-bottom: 0.5em;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.25em;
}

.day-page .content-section p {
    line-height: 1.75;
    color: var(--text-primary);
    margin: 0 0 0.75em;
}

.day-page .content-section p:last-child {
    margin-bottom: 0;
}

.day-page .back-link {
    display: inline-block;
    margin-top: calc(var(--space-unit) * 2);
    color: var(--accent-silver);
    text-decoration: none;
    font-size: 0.9rem;
}

.day-page .back-link:hover {
    color: var(--accent-gold);
}

/* ========== 无障碍：仅屏幕阅读器 ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
