@charset "utf-8";
/* CSS Document */

/* ============================================================
   global.css — Maple's Home 全局样式（以 index.html 为准）
   ============================================================ */

/* ---------- 1. 基础重置与 CSS 变量 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}
:root {
    --indigo:        #4B0082;
    --sky-blue:      #87CEEB;
    --light-indigo:  #9370DB;
    --light-sky:     #B0E0E6;
    --white:         #fff;
    --dark:          #333;
    --shadow:        0 4px 12px rgba(0,0,0,0.15);
    --nav-height:    70px;
}
html { scroll-behavior: smooth; }

/* ---------- 2. 页面主体 + 淡入动画 ---------- */
body {
    background: url("../img/back.png") center/cover fixed;
    color: var(--dark);
    min-height: 100vh;
    position: relative;
    opacity: 0;
    animation: pageFadeIn 0.8s ease forwards;
}
@keyframes pageFadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

/* ---------- 3. 背景模糊层 ---------- */
.blur-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: -1;
    transition: backdrop-filter 0.05s;
    pointer-events: none;
}

/* ---------- 4. 导航栏（统一为 index 的"固定透明 + 滚动变白"风格） ---------- */
nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 200;
    transition: background 0.3s ease, backdrop-filter 0.3s ease,
                box-shadow 0.3s, color 0.3s;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    color: white;
    flex-wrap: wrap;
}
nav.nav-scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
    color: var(--dark);
}
.logo {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    transition: color 0.3s;
    color: white;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
nav.nav-scrolled .logo {
    color: var(--indigo);
    text-shadow: none;
}
.logo a { text-decoration: none; color: inherit; }
.nav-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.nav-links a {
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, text-shadow 0.3s;
    white-space: nowrap;
    color: white;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
nav.nav-scrolled .nav-links a {
    color: #333;
    text-shadow: none;
}
.nav-links a:hover { color: var(--sky-blue); }
nav.nav-scrolled .nav-links a:hover { color: var(--indigo); }

/* ---------- 5. 通用区块 ---------- */
.section {
    padding: 3rem 5%;
    scroll-margin-top: var(--nav-height);
}
.section-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--indigo);
    margin-bottom: 2rem;
}
.section-title::after {
    content: '';
    width: 70px;
    height: 3px;
    background: var(--sky-blue);
    display: block;
    margin: 0.8rem auto;
    border-radius: 2px;
}

/* ---------- 6. 摄影卡片（通用） ---------- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.photo-item {
    background: rgba(255,255,255,0.9);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.25s ease;
    display: block;
    text-decoration: none;
    color: inherit;
}
.photo-item:hover  { transform: scale(1.02); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.photo-item:active { transform: scale(0.98); }
.photo-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
    cursor: pointer;
    transition: filter 0.2s;
}
.photo-img:hover { filter: brightness(0.95); }
.photo-caption {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    color: var(--dark);
    border-top: 1px solid rgba(0,0,0,0.05);
    background: white;
}
.photo-caption span { color: var(--indigo); font-weight: 500; }

/* ---------- 7. 底部（含备案、友情链接、运行计时器） ---------- */
.footer {
    background: rgba(75,0,130,0.9);
    color: #fff;
    text-align: center;
    padding: 2rem 5%;
    margin-top: 3rem;
}
.copyright {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.6;
}
.copyright a {
    color: #fff;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}
.copyright a:hover { opacity: 0.8; }
.uptime-counter {
    margin-top: 1rem;
    font-size: 0.85rem;
    opacity: 0.9;
    letter-spacing: 0.5px;
}
.uptime-counter span {
    font-weight: 500;
    color: #FFD966;
}
.records {
    margin-top: 1rem;
    line-height: 1.6;
    font-size: 0.85rem;
}
.record-link {
    color: #fff;
    text-decoration: underline;
    transition: opacity 0.2s ease;
    display: inline-block;
    margin: 0.2rem 0;
}
.record-link:hover { opacity: 0.8; }
.records i { margin-right: 4px; }

/* ---------- 8. 移动端适配 ---------- */
@media (max-width: 768px) {
    nav          { padding: 0.8rem 5%; }
    .logo        { font-size: 1.4rem; }
    .nav-links   { gap: 1rem; width: 100%; justify-content: center; margin-top: 0.3rem; }
    .section-title { font-size: 1.6rem; }
    .photo-grid  { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
    .photo-img   { height: 160px; }
    .records, .uptime-counter { font-size: 0.75rem; }
}
@media (max-width: 480px) {
    .photo-grid { grid-template-columns: 1fr; }
}