/* ============================================
   去哪儿模块样式（按 Figma 设计稿还原）
   - 地图页、详情页、表单弹窗、照片详情
   ============================================ */

/* ---------- 去哪儿首页（与首页 index 同宽：max-width 1440px） ---------- */
.page-where {
    min-height: 100vh;
    min-height: 1024px;
    max-width: 1440px;
    margin: 0 auto;
    background: transparent;
    padding: 0 24px 40px;
    overflow-y: auto;
}

/* 顶部：返回 + 标题区，与下方留空隙 */
.where-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 24px;
    margin-bottom: 32px;
}

.where-back {
    text-decoration: none;
}

.where-back:hover {
    text-decoration: underline;
}

/* 标题区：左侧图标 + 标题与副标题 */
.where-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.section-icon {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
}

.where-title {
    margin: 0;
    font-size: clamp(34px, 3.2vw, 46px);
    font-weight: 700;
    color: #ED688D;
}

.where-subtitle {
    margin: 8px 0 0;
    font-size: 16px;
    font-weight: 500;
    color: #757575;
}

/* 地图区域：与标题、按钮之间留空隙 */
.map-section {
    margin-bottom: 20px;
    padding: 8px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.china-map {
    position: relative;
    width: min(100%, 820px);
    margin: 0 auto;
}

.china-map-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.map-marker-layer {
    position: absolute;
    inset: 0;
}

.map-marker {
    position: absolute;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transform: translate(-50%, -50%);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.map-marker:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

.map-marker:focus {
    outline: none;
}

.map-marker-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #c9c9c9;
    border: 4px solid #fff;
    box-shadow: 0 8px 18px rgba(117, 117, 117, 0.18);
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.map-marker-label {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #67616c;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(117, 117, 117, 0.08);
}

.map-marker--visited .map-marker-dot {
    background: #ED688D;
    box-shadow: 0 10px 20px rgba(237, 104, 141, 0.28);
}

.map-marker--visited:hover .map-marker-dot {
    box-shadow: 0 14px 26px rgba(237, 104, 141, 0.32);
}

.map-marker--visited .map-marker-label {
    color: #ED688D;
}

.map-marker:not(.map-marker--visited) .map-marker-label {
    color: #8c8790;
}

.form-label select {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    background: #fff;
}

.form-label select:focus {
    outline: none;
    border-color: #ED688D;
    box-shadow: 0 0 0 3px rgba(237, 104, 141, 0.2);
}

/* 底部按钮：与地图之间已有 map-section 的 margin，再与页底留空隙 */
.where-footer {
    text-align: center;
    padding-top: 24px;
}

.btn-add-place {
    padding: 14px 32px;
    font-size: 18px;
    font-weight: 600;
    gap: 16px;
    color: #fff;
    background: #ED688D;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(237, 104, 141, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-add-place:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 104, 141, 0.5);
}

/* ---------- 表单弹窗 ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-title {
    margin: 0 0 24px;
    font-size: 22px;
    color: #333;
}

.form-add-place {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
    color: #555;
}

.form-label input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
}

.form-label input[type="file"] {
    padding: 8px 0;
    border: none;
}

.form-label input:focus {
    outline: none;
    border-color: #ED688D;
    box-shadow: 0 0 0 3px rgba(237, 104, 141, 0.2);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s ease;
}

.btn:hover {
    opacity: 0.9;
}

.btn-cancel {
    background: #eee;
    color: #333;
}

.btn-submit {
    background: #ED688D;
    color: #fff;
}

@media (max-width: 760px) {
    .map-section {
        padding: 14px;
    }

    .map-marker-dot {
        width: 18px;
        height: 18px;
    }

    .map-marker-label {
        padding: 5px 8px;
        font-size: 12px;
    }
}

/* ---------- 地点详情页 ---------- */
.page-place-detail {
    min-height: 100vh;
    background: linear-gradient(180deg, #FFCAD6 0%, #E3FFF9 99.05%);
    padding: 0 0 40px;
    max-width: 1440px;
    margin: 0 auto;
}

.place-header {
    padding: 24px 24px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.place-hero {
    position: relative;
    width: min(calc(100% - 48px), 1072px);
    margin: 0 auto 32px;
    aspect-ratio: 16/10;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(145deg, #FFE4E9, #E3FFF9);
}

.place-hero-edit {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.place-hero-edit:hover {
    background: rgba(0, 0, 0, 0.65);
}

.place-hero-upload {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.place-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.place-hero-note {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    margin: 0;
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 6px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.place-hero-name {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    pointer-events: none;
}

/* 弹幕墙：向左滚动；男生 #A5E1D4，女生 #FFCAD6 */
.danmaku-section {
    padding: 0 24px 24px;
    max-width: 1120px;
    margin: 0 auto 16px;
}

.danmaku-panel,
.photo-panel {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.56);
    box-shadow: 0 20px 40px rgba(148, 124, 137, 0.1);
    padding: 22px 22px 24px;
}

.danmaku-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 600;
    color: #333;
}

.danmaku-title .section-icon {
    width: 36px;
    height: 36px;
}


/* 弹幕身份：大福 #757575，舟舟 #A5E1D4 */
.danmaku-item--dafu {
    background: #FFCAD6;
    color: #fff;
}

.danmaku-item--zhouzhou {
    background: #A5E1D4;
    color: #333;
}

/* 照片墙：横向滚动，滚过的照片缩小 */
.photo-section {
    padding: 0 24px 32px;
    max-width: 1120px;
    margin: 0 auto 24px;
}

.photo-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    font-size: 32px;
    font-weight: 600;
    color: #333;
}

.photo-title .section-icon {
    width: 36px;
    height: 36px;
}

/* 添加弹幕：身份选择（大福 #757575、舟舟 #A5E1D4） */
.danmaku-add {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

.danmaku-identity {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 14px;
    background: #fff;
    color: #333;
}

.danmaku-input {
    flex: 1;
    min-width: 120px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.danmaku-input:focus {
    outline: none;
    border-color: #ED688D;
}

.btn-danmaku-add {
    padding: 10px 20px;
    border-radius: 12px;
    border: none;
    background: #ED688D;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-danmaku-add:hover {
    opacity: 0.9;
}

.danmaku-track {
    overflow: hidden;
    padding: 12px 0;
    border-radius: 16px;
    background: rgba(255,255,255,0.6);
}

.danmaku-list {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: danmaku-scroll 30s linear infinite;
}

.danmaku-list:hover {
    animation-play-state: paused;
}

@keyframes danmaku-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.danmaku-item {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    color: #333;
}
/* 照片墙上传入口 */
.photo-upload-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
}

.photo-upload-input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.photo-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    border-radius: 16px;
    border: 2px dashed rgba(237, 104, 141, 0.5);
    background: rgba(255, 255, 255, 0.6);
    color: #ED688D;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.photo-upload-wrap:hover .photo-upload-label {
    background: rgba(255, 202, 214, 0.4);
    border-color: #ED688D;
}

.photo-wall {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0 24px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.photo-wall::-webkit-scrollbar {
    height: 8px;
}

.photo-wall::-webkit-scrollbar-thumb {
    background: rgba(237, 104, 141, 0.3);
    border-radius: 4px;
}

.photo-item {
    flex-shrink: 0;
    scroll-snap-align: center;
    transition: transform 0.35s ease;
}

.photo-item a {
    display: block;
    width: 200px;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    text-decoration: none;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-modal[hidden] {
    display: none;
}

.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.photo-modal-content {
    position: relative;
    max-width: min(90vw, 960px);
    max-height: min(90vh, 640px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
}

.photo-modal-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.photo-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.photo-modal-close:hover {
    background: rgba(0, 0, 0, 0.85);
}

/* 滚出视口的照片自动缩小，在视口中的保持正常大小 */
.photo-wall .photo-item {
    transform: scale(0.88);
    transition: transform 0.35s ease;
}

.photo-wall .photo-item.in-view {
    transform: scale(1);
}

/* ---------- 添加地址独立表单页 ---------- */
.page-add-place {
    min-height: 100vh;
    background: linear-gradient(180deg, #FFCAD6 0%, #E3FFF9 99.05%);
    padding: 40px 24px;
    max-width: 1440px;
    margin: 0 auto;
}

.page-add-place .modal-box {
    margin: 0 auto;
}

/* ---------- 照片详情页 ---------- */
.page-photo-detail {
    min-height: 100vh;
    background: linear-gradient(180deg, #FFCAD6 0%, #E3FFF9 99.05%);
    padding: 24px;
    max-width: px;
    margin: 0 auto;
}

.photo-detail-back {
    display: inline-block;
    margin-bottom: 16px;
    color: #ED688D;
    text-decoration: none;
    font-weight: 600;
}

.photo-detail-img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: block;
}

.photo-detail-caption {
    margin-top: 16px;
    font-size: 16px;
    color: #555;
}
