/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-cream: radial-gradient(circle at 20% 20%, #f7f3eb 0%, #f2ede4 24%, transparent 30%), radial-gradient(circle at 80% 0%, #f0eadf 0%, #e8e0d3 20%, transparent 34%), linear-gradient(145deg, #f8f5ee 0%, #ebe4d8 40%, #f6f1e9 100%);
    --primary: #0c1b2a;
    --primary-dark: #0a1525;
    --accent: #d8b56a;
    --accent-strong: #b48a35;
    --text-main: #191919;
    --text-sub: #4f5563;
    --border-soft: rgba(12, 27, 42, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.9);
    --radius: 26px;
    --shadow-elevated: 0 22px 50px rgba(12, 27, 42, 0.15), 0 8px 18px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Optima', 'Avenir Next', 'PingFang SC', 'Hiragino Sans GB', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-cream);
    overflow-x: hidden;
    color: var(--text-main);
    line-height: 1.6;
}

/* ========== 封面页 ========== */
.cover-page {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: transparent;
    padding: 60px 20px 40px;
    isolation: isolate;
}

/* 封面背景动效 - 四张图片叠动 */
.bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bg-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: layerFade 16s infinite;
}

.bg-layer:nth-child(1) { animation-delay: 0s; }
.bg-layer:nth-child(2) { animation-delay: 4s; }
.bg-layer:nth-child(3) { animation-delay: 8s; }
.bg-layer:nth-child(4) { animation-delay: 12s; }

@keyframes layerFade {
    0%, 100% { opacity: 0; transform: scale(1); }
    6.25% { opacity: 1; transform: scale(1.02); }
    18.75% { opacity: 1; transform: scale(1.05); }
    25% { opacity: 0; transform: scale(1.08); }
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 15% 20%, rgba(216, 181, 106, 0.14), transparent 28%), linear-gradient(150deg, rgba(15, 30, 61, 0.48), rgba(15, 30, 61, 0.1));
    z-index: 2;
}

.cover-content {
    position: relative;
    z-index: 3;
    text-align: center;
    animation: fadeInUp 1.2s ease;
    padding: 42px 56px;
    border-radius: 34px;
    max-width: 860px;
}

/* 主标题 - 萌新必看 - 萌一点的字体 */
.cover-main-title {
    position: relative;
    font-size: 4.1em;
    font-weight: 800;
    margin-bottom: 6px;
    font-family: 'HanziPen SC', 'STKaiti', 'KaiTi', 'PingFang SC', serif;
    letter-spacing: 4px;
    color: #fefefe;
    text-shadow:
        0 18px 40px rgba(0, 0, 0, 0.35),
        0 8px 18px rgba(0, 0, 0, 0.22),
        0 0 2px rgba(0, 0, 0, 0.45);
}

.cover-main-title .title-zh {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 22px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.14);
    letter-spacing: 6px;
}

.cover-main-title .title-en {
    display: inline-block;
    font-size: 0.4em;
    letter-spacing: 4px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8f3e8;
}

/* 副标题 - 报到不迷茫，指南伴你闯 - 宋体或正规字体 */
.cover-subtitle {
    font-size: 1.25em;
    color: #f1f1f1;
    margin: 18px auto 50px;
    font-family: 'Songti SC', 'Noto Serif SC', serif;
    letter-spacing: 1.2px;
    text-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
    max-width: 640px;
}

.enter-btn {
    padding: 18px 60px;
    font-size: 1.2em;
    background: linear-gradient(140deg, rgba(255,255,255,0.16), rgba(255,255,255,0.06)), linear-gradient(120deg, var(--primary) 0%, #102947 80%);
    color: #fdfbf7;
    border: 1px solid rgba(216, 181, 106, 0.45);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 18px 36px rgba(15, 30, 61, 0.35), 0 0 0 1px rgba(255,255,255,0.08) inset;
    letter-spacing: 0.6px;
    font-family: 'Avenir Next', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

.enter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 46px rgba(15, 30, 61, 0.4), 0 0 0 1px rgba(255,255,255,0.12) inset;
    background: linear-gradient(140deg, rgba(255,255,255,0.18), rgba(255,255,255,0.08)), linear-gradient(120deg, #102947 0%, #0f1e3d 80%);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 导语页 ========== */
.intro-page {
    position: relative;
    display: none;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at 18% 24%, rgba(216, 181, 106, 0.08), transparent 32%), radial-gradient(circle at 84% 0%, rgba(255,255,255,0.06), transparent 26%), #0f1e3d;
    color: #fdfbf7;
}

.intro-page.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    animation: fadeIn 0.6s ease;
}

.intro-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(12, 27, 42, 0.66), rgba(12, 27, 42, 0.2)), url('https://1843978466.v.123pan.cn/1843978466/26919074') center/cover no-repeat;
    transform: scale(1.04);
    filter: saturate(1.02) contrast(1.05);
}

.intro-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(15, 30, 61, 0.78), rgba(10, 21, 46, 0.46));
    backdrop-filter: blur(1px);
}

.intro-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    text-align: left;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 32px;
    padding: 44px 48px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(12px);
}

.intro-title {
    font-size: 2.2em;
    line-height: 1.5;
    margin-bottom: 22px;
    font-family: 'Iowan Old Style', 'Noto Serif SC', 'Songti SC', serif;
    letter-spacing: 1.2px;
}

.intro-text {
    font-size: 1.05em;
    line-height: 2;
    color: #eef2f7;
    margin-bottom: 32px;
    font-family: 'Microsoft YaHei', 'SimSun', sans-serif;
}

.next-arrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px 14px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #fdfbf7;
    font-size: 1em;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.next-arrow:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.18);
}

.arrow-icon {
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(140deg, rgba(255,255,255,0.26), rgba(255,255,255,0.08));
    text-align: center;
    line-height: 36px;
    font-size: 18px;
    color: #0f1e3d;
    font-weight: bold;
}

/* ========== 地图导航页 ========== */
.map-page {
    display: none;
    min-height: 100vh;
    padding: 72px 18px 90px;
    background: var(--bg-cream);
}

.map-page.active {
    display: block;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.page-header {
    text-align: center;
    margin-bottom: 38px;
    position: relative;
    padding-bottom: 14px;
}

.page-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, rgba(216, 181, 106, 0), rgba(216, 181, 106, 0.9), rgba(216, 181, 106, 0));
    border-radius: 999px;
}

.page-header h1 {
    font-size: 2.4em;
    color: var(--text-main);
    margin-bottom: 12px;
    font-family: 'Iowan Old Style', 'Noto Serif SC', 'Songti SC', serif;
    letter-spacing: 1.4px;
}

.page-header p {
    color: var(--text-sub);
    font-size: 1.05em;
    letter-spacing: 0.4px;
}

.map-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.86));
    border-radius: 30px;
    padding: 52px;
    box-shadow: var(--shadow-elevated);
    border: 1px solid var(--border-soft);
    overflow: hidden;
}

.map-container::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 24px;
    border: 1px solid rgba(12, 27, 42, 0.06);
    pointer-events: none;
}

.campus-map-wrapper {
    position: relative;
    width: 100%;
    background: radial-gradient(circle at 15% 20%, rgba(216, 181, 106, 0.08), transparent 35%), radial-gradient(circle at 80% 10%, rgba(12, 27, 42, 0.06), transparent 30%), #fdfbf7;
    padding: 18px;
    border-radius: 18px;
}

.campus-map {
    width: 100%;
    display: block;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

/* 建筑图标定位 */
.map-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.marker {
    position: absolute;
    cursor: pointer;
    transition: all 0.3s;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.16));
    display: grid;
    place-items: center;
    padding: 4px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(12, 27, 42, 0.08);
}

.marker-icon {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 14px;
}

.marker:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 10px 18px rgba(0,0,0,0.28));
    border-color: rgba(216, 181, 106, 0.55);
}

/* 图书馆 */
.marker-library .marker-icon {
    width: 80px;
    height: 80px;
}

/* 中文楼 */
.marker-chinese .marker-icon {
    width: 70px;
    height: 65px;
}

/* 逸夫楼 */
.marker-yifu .marker-icon {
    width: 69px;
    height: 69px;
}

/* 操场 */
.marker-playground .marker-icon {
    width: 134px;
    height: 171px;
}

/* 根据地图的建筑位置（按整张校园图比例坐标） */
.marker-library { top: 19%; left: 57.5%; }   /* 图书馆 */
.marker-chinese { top: 27.65%; left: 69.7%; }   /* 中文楼 */
.marker-yifu { top: 20.5%; left: 78.8%; }    /* 逸夫楼 */
.marker-playground { top: 12.85%; left: 24.5%; }/* 操场/篮球场 */

/* ========== 详情弹窗 ========== */
.detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 15, 28, 0.75);
    z-index: 1000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.detail-modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

.detail-content {
    background: linear-gradient(160deg, rgba(255,255,255,0.98), rgba(255,255,255,0.92));
    border-radius: 22px;
    max-width: 900px;
    width: 100%;
    margin: auto;
    position: relative;
    animation: slideUp 0.4s ease;
    box-shadow: var(--shadow-elevated);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    background: rgba(0,0,0,0.12);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    color: white;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(0,0,0,0.3);
    transform: rotate(90deg);
}

/* 简介页面建筑外观 - 封面做成动效素材，前后叠动 */
.detail-header {
    position: relative;
    height: 350px;
    overflow: hidden;
    border-radius: 22px 22px 0 0;
}

.detail-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 27, 42, 0) 40%, rgba(12, 27, 42, 0.35) 100%);
    pointer-events: none;
}

.header-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.header-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.header-slide.active {
    opacity: 1;
}

.detail-body {
    padding: 40px;
    background: linear-gradient(180deg, rgba(216, 181, 106, 0.04), rgba(255, 255, 255, 0));
}

.building-name {
    font-size: 2.2em;
    color: var(--text-main);
    margin-bottom: 25px;
    font-weight: bold;
    font-family: 'Noto Serif SC', 'Songti SC', serif;
}

.building-intro {
    line-height: 2;
    color: var(--text-sub);
    margin-bottom: 35px;
    font-size: 1.08em;
    text-align: justify;
    font-family: 'SimSun', serif;
}

.detail-section {
    margin-bottom: 35px;
}

.section-title {
    font-size: 1.4em;
    color: var(--accent);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(213, 162, 79, 0.25);
    font-family: 'Noto Serif SC', 'Songti SC', serif;
}

/* 备注信息文案 - 用于细节性参观建筑内部 */
.remark-info {
    background: linear-gradient(120deg, rgba(216, 181, 106, 0.12), rgba(216, 181, 106, 0.04));
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid var(--accent);
}

.remark-info p {
    line-height: 2;
    color: var(--text-sub);
    font-family: 'SimSun', serif;
    margin-bottom: 15px;
}

.remark-info p:last-child {
    margin-bottom: 0;
}

/* 具体打开按钮 */
.expand-btn {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fdfbf7;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95em;
    margin-top: 10px;
    transition: all 0.3s;
}

.expand-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(15, 30, 61, 0.24);
}

.expandable-content {
    display: none;
    margin-top: 25px;
}

.expandable-content.show {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* 楼层信息 */
.floor-info {
    background: rgba(12, 27, 42, 0.04);
    padding: 18px 22px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent);
}

.floor-name {
    font-weight: bold;
    color: var(--accent-strong);
    margin-bottom: 10px;
    font-size: 1.15em;
    font-family: 'Songti SC', 'Noto Serif SC', serif;
}

.floor-desc {
    color: var(--text-sub);
    line-height: 1.8;
    font-family: 'Songti SC', 'SimSun', serif;
}

/* 内部场景图 */
.scene-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.scene-gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s;
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    border: 1px solid rgba(12, 27, 42, 0.08);
}

.scene-gallery img:hover {
    transform: scale(1.05);
}

/* 单张场景图 */
.single-scene {
    margin-top: 20px;
}

.single-scene img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.14);
    border: 1px solid rgba(12, 27, 42, 0.08);
}

/* 简易提示弹窗 */
.simple-modal .detail-body {
    text-align: center;
    padding: 80px 40px;
}

/* 音乐开关按钮 - 极简无多余圆点版 */
.music-toggle {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(216, 181, 106, 0.5);
  background: linear-gradient(140deg, rgba(12, 27, 42, 0.95), rgba(12, 27, 42, 0.72));
  color: #fdfbf7;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  font-size: 1.1em;
  transition: all 0.25s ease;
}

.music-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 181, 106, 0.8);
  background: linear-gradient(140deg, rgba(12, 27, 42, 0.98), rgba(12, 27, 42, 0.82));
  box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}

.music-toggle:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* 指示灯：彻底去掉伪元素，仅保留一个纯色圆点 */
.music-indicator {
  display: none;
}

/* 播放状态：仅改颜色和阴影，无多余元素 */
.music-toggle.playing .music-indicator {
  display: none;
}

.music-label {
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 1.2em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-shadow: 0 6px 14px rgba(0,0,0,0.28);
}

.music-toggle.playing .music-label {
  animation: note-dance 1.2s ease-in-out infinite;
  color: #f9d489;
  text-shadow:
    0 10px 24px rgba(0,0,0,0.35),
    0 0 12px rgba(249, 212, 137, 0.6);
}

@keyframes note-dance {
  0% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-3px) rotate(-10deg); }
  60% { transform: translateY(2px) rotate(8deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* 移动端适配 */
@media (max-width: 900px) {
  .intro-content {
    padding: 32px;
  }
  .intro-title {
    font-size: 1.7em;
  }
  .music-toggle {
    padding: 8px 14px;
    font-size: 1em;
    right: 12px;
    top: 12px;
  }
  .music-indicator {
    width: 8px;
    height: 8px;
  }
}
/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .cover-content {
        padding: 32px 28px;
    }
    .cover-main-title {
        font-size: 2.5em;
        letter-spacing: 4px;
    }

    .cover-subtitle {
        font-size: 1.1em;
    }

    .marker-icon {
        width: 50px;
        height: 50px;
    }

    .building-name {
        font-size: 1.6em;
    }

    .detail-body {
        padding: 25px;
    }

    .detail-header {
        height: 250px;
    }

    .map-container {
        padding: 28px;
    }

    .campus-map-wrapper {
        padding: 12px;
    }
}
