/* ===== Hero 区域 ===== */
.hero {
    /* 用 min-height 代替固定 height：
       - 移动端浏览器地址栏会占据一部分视口，100vh 是“地址栏收起”时的最大高度，
         地址栏可见时底部内容会被挤出屏幕（显示不完整）。
         改用动态视口 dvh/svh，让 hero 恰好等于当前可见区域。
       - 固定 height + flex 居中在内容超高时会把顶部（标题）裁掉且无法滚动到；
         改用 min-height，内容超高时 hero 自动撑高，保证完整显示。 */
    min-height: 600px;
    min-height: 100vh;                  /* 旧浏览器回退 */
    min-height: max(600px, 100dvh);     /* 桌面/平板：至少满屏，随视口（含缩放/工具栏）变化 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* 深色渐变遮罩(scrim)：背景图来自随机图 API(https://t.alcy.cc/ycy)，每次加载明暗、色相都不同，
       叠加半透明深色渐变保证白色文字在任何图片上都有足够对比度（WCAG 大文字 ≥ 3:1） */
    background:
        linear-gradient(rgba(15, 23, 42, 0.50), rgba(15, 23, 42, 0.65)),
        url('https://t.alcy.cc/ycy') center / cover no-repeat;
    padding: 0;
}

/* ===== Hero 内容：滚动渐显 =====
   功能：页面顶部时 Hero 内容隐藏（只显示背景图），向下滚动一小段后渐显，
   回到最顶端时再次隐藏。由 js/navbar.js 在 .hero 上切换 .hidden 类控制。 */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}

.hero.hidden .hero-content {
    opacity: 0;
    transform: translateY(14px);
}

/* 系统开启「减少动态效果」时：不做渐显动画，直接显隐 */
@media (prefers-reduced-motion: reduce) {
    .hero-content {
        transition: none;
    }
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    color: #ffffff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
    max-width: 780px;
    margin-bottom: 16px;
}

.hero-title-highlight {
    background: linear-gradient(135deg, #a5b4fc, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== 一言卡片 ===== */
.hitokoto-card {
    max-width: 400px;
    min-height: 100px;
    margin: 0 auto;
}

.hitokoto-text {
    font-size: 1.2rem;
    color: #e2e8f0;
    line-height: 1.4;
    text-align: center;
    margin: 0;
}

.hitokoto-creator {
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.3;
    text-align: right;
    margin-top: 6px;
}

/* ===== 滚动提示 ===== */
.scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 0.95rem;
    animation: bounce-down 2.4s infinite;
}

.scroll-hint-icon {
    width: 22px;
    height: 22px;
    stroke: #cbd5e1;
}

@keyframes bounce-down {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

/* ===== 滚动进度指示器 ===== */
.scroll-progress {
    position: absolute;
    top: 100%;                 /* 紧贴导航栏底部，随 navbar 滑动 */
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    z-index: -1;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
    opacity: 0;
    pointer-events: none;
}

.scroll-progress.visible {
    opacity: 1;
}

/* ===== 内容区块 ===== */
.page-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 60px 24px 120px;
}

.page-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 44px;
    margin-bottom: 36px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: box-shadow 0.3s;
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

.page-section-body {
    flex: 1;
    min-width: 0;
}

.page-section:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.page-section-title {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-section-badge {
    font-size: 0.8rem;
    font-weight: 600;
    background: #eef2ff;
    color: #4f46e5;
    padding: 2px 14px;
    border-radius: 30px;
}

.page-section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 4px;
    margin: 16px 0 20px;
}

.page-section-text {
    color: #475569;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.page-section-text:last-child {
    margin-bottom: 0;
}

.page-section-tip {
    margin-top: 16px;
    color: #94a3b8;
    font-size: 0.95rem;
}

/* ===== 液态玻璃时钟 ===== */
.page-section-clock {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 24px;
    background: rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 2px 12px rgba(99, 102, 241, 0.12),
        0 0 0 1px rgba(99, 102, 241, 0.06);
    position: relative;
    overflow: hidden;
}

/* 光斑 — 液态流动高光 */
.page-section-clock::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -40%;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(168, 85, 247, 0.15),
        transparent 60%
    );
    animation: clock-shimmer 6s ease-in-out infinite;
}

@keyframes clock-shimmer {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(10%, 10%) rotate(3deg); }
}

.clock-time {
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -1px;
    line-height: 1;
}

/* 本地浏览器时间 — 加粗 */
#localTime {
    font-weight: 800;
    color: #0f172a;
}

.clock-date {
    font-size: 0.75rem;
    color: #6366f1;
    font-weight: 600;
}

.clock-weekday {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    /* 移动端：hero 高度取 100svh（地址栏可见时的实际视口高度），
       首屏恰好填满可视区，不再把底部内容挤出屏幕 */
    .hero {
        min-height: 100vh;   /* 旧浏览器回退 */
        min-height: 100svh;
    }

    .page-section {
        padding: 24px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    /* 长方形卡片：横向排列 时间 | 日期 | 星期 */
    .page-section-clock {
        width: auto;
        height: auto;
        flex-direction: row;
        gap: 16px;
        padding: 16px 24px;
        border-radius: 16px;
    }

    .clock-time {
        font-size: 1.5rem;
    }

    .clock-date {
        font-size: 0.8rem;
    }

    /* 文字容器自适应宽度 */
    .page-section-body {
        flex: none;
        width: 100%;
    }

    .page-section-title {
        font-size: 1.35rem;
    }

    .hero-title {
        font-size: 2rem;
    }
}

/* 小屏手机：收紧 hero 内容，避免首屏元素“显示过大”导致内容超出可视区 */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 12px;
        letter-spacing: -0.5px;
        /* 防止副标题「将梦绘进现实，与民一起」横向顶满屏幕边缘 */
        padding: 0 16px;
    }

    .hitokoto-card {
        min-height: 84px;
    }

    .hitokoto-text {
        font-size: 1.05rem;
    }

    .scroll-hint {
        font-size: 0.9rem;
    }
}

/* ===== 页脚 ===== */
.site-footer {
    width: 100%;
    padding: 28px 16px 36px;
    background: rgba(15, 23, 42, 0.03);
    border-top: 1px solid #f1f5f9;
}

/* 页脚内容：百分比宽度 + 水平居中 */
.footer-content {
    width: 90%;
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.footer-icp {
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.footer-icp a,
.footer-copyright a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.25s;
}

.footer-icp a:hover,
.footer-copyright a:hover {
    color: #4f46e5;
}

.footer-copyright {
    font-size: 0.85rem;
    color: #94a3b8;
}
