:root {
    --primary: #d4a0b9;
    --primary-light: #fdf2f8;
    --primary-dark: #be185d;
    --accent: #f472b6;
    --bg: #fefcfb;
    --bg-card: #ffffff;
    --text: #3d2c2e;
    --text-light: #8c7070;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow: 0 4px 16px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --radius: 14px;
    --radius-sm: 8px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'PingFang SC', -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    --fan-radius: 165px;
}

@media (max-width: 1199px) and (min-width: 768px) {
    :root { --fan-radius: 128px; }
}
@media (max-width: 767px) {
    :root { --fan-radius: 90px; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== 导航栏 ===== */
.navbar {
    background: rgba(255,255,255,0.82);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    padding: 0 2.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
}

.navbar .logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: none;
    letter-spacing: -0.3px;
}

.navbar .logo span {
    color: var(--accent);
    font-weight: 500;
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.navbar nav a {
    text-decoration: none;
    color: var(--text-light);
    padding: 0.4rem 0.9rem;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: 6px;
    transition: color var(--transition), background var(--transition);
}

.navbar nav a:hover {
    color: var(--primary-dark);
    background: rgba(190, 24, 93, 0.05);
}

.navbar nav a.active {
    color: var(--primary-dark);
    background: var(--primary-light);
}

/* ===== 地图页面 ===== */
.map-container {
    margin-top: 56px;
    height: calc(100vh - 56px);
    width: 100%;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.countdown-card {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    background: rgba(255,255,255,0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 0.6rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: all 0.3s ease;
}

.countdown-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.countdown-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
    font-weight: 500;
    padding: 0.1rem 0;
}

.countdown-row + .countdown-row {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 0.35rem;
}

.countdown-icon {
    font-size: 0.9rem;
    line-height: 1;
    flex-shrink: 0;
}

.countdown-name {
    flex-shrink: 0;
}

.countdown-days {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.countdown-unit {
    font-size: 0.75rem;
}

.countdown-date {
    font-size: 0.68rem;
    opacity: 0.6;
    border-left: 1px solid rgba(0,0,0,0.1);
    padding-left: 0.5rem;
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.countdown-today-text {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.85rem;
}

.map-stats {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.78);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 0.75rem 2.2rem;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    display: flex;
    gap: 2.2rem;
    z-index: 500;
}

.map-stats .stat-item {
    text-align: center;
}

.map-stats .stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.map-stats .stat-label {
    color: var(--text-light);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* 高德地图自定义信息窗体 */
.place-popup {
    padding: 0.22rem;
    min-width: 162px;
    max-width: 172px;
    text-align: center;
}

.place-popup h3 {
    margin-bottom: 0.2rem;
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-popup .date {
    font-size: 0.74rem;
    color: var(--text-light);
    margin-bottom: 0.4rem;
}

.place-popup .desc {
    display: none;
}

.place-popup img {
    width: 100%;
    max-width: 162px;
    border-radius: 6px;
    object-fit: cover;
    height: 105px;
    display: block;
    margin: 0 auto;
}

.place-popup .link {
    display: block;
    margin-top: 0.4rem;
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== 画廊页面 ===== */
.page-content {
    margin-top: 56px;
    padding: 2.5rem 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.page-title {
    text-align: center;
    margin: 1.5rem 0 0.6rem;
    font-size: 1.65rem;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.page-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-size: 0.9rem;
    font-weight: 400;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.6rem;
}

.place-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.place-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0,0,0,0.06);
}

.place-card .card-img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    background: var(--primary-light);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.place-card:hover .card-img {
    transform: scale(1.03);
}

.place-card .card-img-placeholder {
    width: 100%;
    height: 210px;
    background: linear-gradient(135deg, var(--primary-light), #fce7f3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    opacity: 0.7;
}

.place-card .card-body {
    padding: 1.1rem 1.3rem 1.3rem;
}

.place-card .card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    letter-spacing: -0.2px;
}

.place-card .card-date {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.place-card .card-desc {
    font-size: 0.84rem;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

/* 卡片图片溢出隐藏容器 */
.place-card {
    overflow: hidden;
}

/* ===== 地点详情页 ===== */
.detail-header {
    text-align: center;
    margin-bottom: 2rem;
}

.detail-header h1 {
    font-size: 1.75rem;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.detail-header .date {
    color: var(--text-light);
    font-size: 0.88rem;
    margin-top: 0.4rem;
    font-weight: 400;
}

.detail-desc {
    max-width: 680px;
    margin: 0 auto 2.5rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.9;
}

.detail-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.detail-photos img {
    width: 100%;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    object-fit: cover;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-sm);
}

.detail-photos img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    transition: all var(--transition);
}

.back-link:hover {
    color: var(--primary-dark);
    background: var(--primary-light);
}

/* ===== 灯箱 ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: lbFadeIn 0.2s ease;
}

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

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 6px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}

/* ===== 后台管理 ===== */
.admin-container {
    margin-top: 56px;
    padding: 2.5rem 2rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    font-size: 1.4rem;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.3px;
}

.admin-page-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
    margin-bottom: 1.8rem;
    padding-left: 0.9rem;
    border-left: 3px solid var(--primary-dark);
    line-height: 1.3;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.4rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    font-family: var(--font);
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary-dark);
    color: white;
    box-shadow: 0 2px 8px rgba(190, 24, 93, 0.2);
}

.btn-primary:hover {
    background: #9d174d;
    box-shadow: 0 4px 16px rgba(190, 24, 93, 0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid rgba(0,0,0,0.08);
}

.btn-secondary:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
}

/* 管理表格 */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
}

.admin-table th,
.admin-table td {
    padding: 0.85rem 1.2rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.admin-table th {
    background: rgba(0,0,0,0.018);
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.76rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.admin-table td {
    font-size: 0.88rem;
    color: var(--text);
}

.admin-table tbody tr {
    transition: background var(--transition);
}

.admin-table tbody tr:hover {
    background: rgba(0,0,0,0.015);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table .actions {
    display: flex;
    gap: 0.4rem;
}

/* 表单 */
.form-card {
    background: var(--bg-card);
    padding: 2.2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-dark), var(--accent));
    border-radius: var(--radius) var(--radius) 0 0;
}

.form-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

[data-theme="dark"] .form-card-title {
    border-bottom-color: rgba(255,255,255,0.06);
}

.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 500;
    color: var(--text);
    font-size: 0.85rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.08);
    background: var(--bg-card);
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.7;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238c7070' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.2rem;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-hint {
    font-size: 0.76rem;
    color: var(--text-light);
    margin-top: 0.4rem;
}

/* 照片预览 */
.photo-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 0.6rem;
}

.photo-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.photo-preview-item:hover img {
    transform: scale(1.05);
}

.photo-preview-item .delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
    backdrop-filter: blur(4px);
}

.photo-preview-item:hover .delete-btn {
    opacity: 1;
}

/* 封面选择按钮 */
.photo-preview-item .cover-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255,255,255,0.7);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition), background var(--transition), color var(--transition);
    backdrop-filter: blur(4px);
}

.photo-preview-item:hover .cover-btn {
    opacity: 1;
}

.photo-preview-item.is-cover .cover-btn {
    opacity: 1;
    background: rgba(190, 24, 93, 0.85);
    color: #fff;
}

.photo-preview-item.is-cover {
    box-shadow: 0 0 0 2.5px var(--primary-dark);
}

/* 多选模式 */
.photo-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.photo-section-header label {
    margin-bottom: 0;
}

.multi-select-toolbar {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

.photo-checkbox {
    display: none;
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: 2px solid rgba(0,0,0,0.15);
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition);
}

.photo-checkbox::after {
    content: '';
    display: none;
    position: absolute;
    top: 4px;
    left: 7px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.photo-checkbox.checked {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.photo-checkbox.checked::after {
    display: block;
}

.photo-preview-grid.multi-select-mode .photo-checkbox {
    display: block;
}

.photo-preview-grid.multi-select-mode .photo-preview-item.selected {
    box-shadow: 0 0 0 2.5px var(--primary-dark);
    transform: scale(0.95);
}

.photo-preview-grid.multi-select-mode .photo-preview-item {
    cursor: pointer;
}

.batch-delete-bar {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.9);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    padding: 0.65rem 1.5rem;
    border-radius: 40px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1500;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

[data-theme="dark"] .photo-checkbox {
    background: rgba(24,24,31,0.85);
    border-color: rgba(255,255,255,0.15);
}

[data-theme="dark"] .photo-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
}

[data-theme="dark"] .batch-delete-bar {
    background: rgba(24,24,31,0.9);
    border-color: rgba(255,255,255,0.06);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
    .photo-section-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .batch-delete-bar {
        bottom: 1rem;
        padding: 0.55rem 1.2rem;
        font-size: 0.82rem;
    }
}

/* 登录页 */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    position: relative;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(190, 24, 93, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.login-card {
    background: var(--bg-card);
    padding: 2.8rem 2.5rem;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.04);
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 1;
}

.login-card h2 {
    text-align: center;
    color: var(--text);
    margin-bottom: 0.4rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.login-card h2 + .form-group {
    margin-top: 2rem;
}

/* Flash消息 */
.flash-messages {
    position: fixed;
    top: 66px;
    right: 1.2rem;
    z-index: 1500;
}

.flash-msg {
    padding: 0.7rem 1.3rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.84rem;
    font-weight: 500;
    animation: slideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(8px);
}

.flash-msg.success {
    background: rgba(209, 250, 229, 0.9);
    color: #065f46;
    border: 1px solid rgba(6, 95, 70, 0.1);
}

.flash-msg.error {
    background: rgba(254, 226, 226, 0.9);
    color: #991b1b;
    border: 1px solid rgba(153, 27, 27, 0.1);
}

@keyframes slideIn {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 无数据 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: var(--shadow-sm);
}

.empty-state .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.88rem;
}

/* ===== 响应式 ===== */
.admin-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}

@media (max-width: 768px) {
    .navbar { padding: 0 1.2rem; }
    .navbar nav a { padding: 0.35rem 0.6rem; font-size: 0.82rem; }
    .countdown-card { padding: 0.45rem 0.8rem; top: 0.8rem; left: 0.8rem; font-size: 0.72rem; }
    .countdown-days { font-size: 1rem; }
    .map-stats { gap: 1.2rem; padding: 0.6rem 1.4rem; bottom: 1.2rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .page-content { padding: 1.5rem 1rem; }
    .admin-container { padding: 1.5rem 0.8rem; }
    .detail-photos { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .admin-header { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
    .admin-header h1 { font-size: 1.2rem; }

    .admin-table th,
    .admin-table td { padding: 0.6rem 0.6rem; font-size: 0.78rem; }
    .admin-table td { white-space: nowrap; }
    .admin-table .actions { gap: 0.3rem; }
    .admin-table .actions .btn { padding: 0.3rem 0.5rem; font-size: 0.72rem; }

    .form-card { padding: 1.2rem 1rem; }
    .form-card input,
    .form-card textarea,
    .form-card select { font-size: 16px; }

    .storage-widget-card { padding: 1rem 1rem; }
    .storage-widget-header { flex-direction: column; align-items: flex-start; gap: 4px; }
    .storage-widget-footer { flex-direction: column; gap: 4px; }
}

/* ===== 暗色模式 ===== */
[data-theme="dark"] {
    --primary: #a78bfa;
    --primary-light: #1e1b2e;
    --primary-dark: #a78bfa;
    --accent: #c4b5fd;
    --bg: #0f0f14;
    --bg-card: #18181f;
    --text: #e4e4e7;
    --text-light: #9ca3af;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow: 0 4px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
}

[data-theme="dark"] .navbar {
    background: rgba(15,15,20,0.82);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

[data-theme="dark"] .countdown-card {
    background: rgba(24,24,31,0.78);
    border-color: rgba(255,255,255,0.06);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

[data-theme="dark"] .countdown-date {
    border-left-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .countdown-row + .countdown-row {
    border-top-color: rgba(255,255,255,0.05);
}

[data-theme="dark"] .map-stats {
    background: rgba(24,24,31,0.78);
    border-color: rgba(255,255,255,0.06);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

[data-theme="dark"] .place-card {
    border-color: rgba(255,255,255,0.04);
}

[data-theme="dark"] .place-card:hover {
    border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .admin-table {
    border-color: rgba(255,255,255,0.04);
}

[data-theme="dark"] .admin-table th {
    background: rgba(255,255,255,0.02);
}

[data-theme="dark"] .admin-table th,
[data-theme="dark"] .admin-table td {
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

[data-theme="dark"] .admin-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

[data-theme="dark"] .form-card {
    border-color: rgba(255,255,255,0.04);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
    border-color: rgba(255,255,255,0.08);
    background: var(--bg);
    color: var(--text);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.12);
    background: var(--bg-card);
}

[data-theme="dark"] .form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

[data-theme="dark"] .admin-page-title {
    border-left-color: var(--primary);
}

[data-theme="dark"] .empty-state {
    background: var(--bg-card);
    border-color: rgba(255,255,255,0.04);
}

[data-theme="dark"] .btn-primary {
    background: var(--primary);
    color: #0f0f14;
    box-shadow: 0 2px 8px rgba(167, 139, 250, 0.2);
}

[data-theme="dark"] .btn-primary:hover {
    background: #8b5cf6;
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.3);
}

[data-theme="dark"] .btn-secondary {
    background: rgba(255,255,255,0.04);
    color: var(--text);
    border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="dark"] .btn-danger {
    background: rgba(220, 38, 38, 0.1);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.2);
}

[data-theme="dark"] .btn-danger:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

[data-theme="dark"] .login-wrapper {
    background: var(--bg);
}

[data-theme="dark"] .login-wrapper::before {
    background: radial-gradient(circle, rgba(167, 139, 250, 0.06) 0%, transparent 70%);
}

[data-theme="dark"] .login-wrapper::after {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.04) 0%, transparent 70%);
}

[data-theme="dark"] .login-card {
    background: var(--bg-card);
    border-color: rgba(255,255,255,0.04);
}

[data-theme="dark"] .flash-msg.success {
    background: rgba(6, 95, 70, 0.15);
    color: #6ee7b7;
    border-color: rgba(6, 95, 70, 0.2);
}

[data-theme="dark"] .flash-msg.error {
    background: rgba(153, 27, 27, 0.15);
    color: #fca5a5;
    border-color: rgba(153, 27, 27, 0.2);
}

/* 主题切换按钮 */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.4rem;
    color: var(--text-light);
    transition: color var(--transition), transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.theme-toggle:hover {
    color: var(--primary-dark);
    transform: rotate(25deg);
    background: rgba(0,0,0,0.03);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255,255,255,0.04);
}

/* ===== 地图照片叠加动画标记 ===== */
@keyframes photoMarkerIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.photo-marker {
    position: relative;
    cursor: pointer;
    animation: photoMarkerIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,0.18));
    transition: filter 0.3s ease, z-index 0.3s ease;
}

.photo-marker::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%);
    pointer-events: none;
    opacity: 0.6;
    z-index: 200;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .photo-marker::after {
    opacity: 0;
}

.photo-marker:hover::after,
.photo-marker.fan-open::after {
    opacity: 0;
}

.photo-marker-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform: scale(var(--marker-zoom-scale, 1.0));
    transform-origin: bottom center;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    perspective: 800px;
}

.photo-marker:hover,
.photo-marker.fan-open {
    filter: drop-shadow(0 12px 28px rgba(0,0,0,0.35));
    z-index: 99999 !important;
}

.photo-marker:hover .photo-marker-inner,
.photo-marker.fan-open .photo-marker-inner {
    transform: scale(calc(var(--marker-zoom-scale, 1.0) * 1.05));
}

.photo-marker .fan-img {
    width: 138px;
    height: 138px;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid rgba(255,255,255,0.85);
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 0 0 1px rgba(255,255,255,0.2);
    transform-origin: 50% var(--fan-radius, 220px);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

[data-theme="dark"] .photo-marker .fan-img {
    border-color: rgba(42,42,53,0.85);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.photo-marker:hover .fan-img:not(.fan-img-in-wrap),
.photo-marker.fan-open .fan-img:not(.fan-img-in-wrap) {
    transform: rotate(var(--angle, 0deg)) translateY(var(--ty, 0px)) scale(1.0);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.15);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, z-index 0s;
}

[data-theme="dark"] .photo-marker:hover .fan-img:not(.fan-img-in-wrap),
[data-theme="dark"] .photo-marker.fan-open .fan-img:not(.fan-img-in-wrap) {
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

/* 扇形展开包裹容器（含"更多"覆盖层） */
.fan-img-wrap {
    width: 138px;
    height: 138px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transform-origin: 50% var(--fan-radius, 220px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, z-index 0s;
}

.fan-img-wrap::before {
    content: '';
    position: absolute;
    inset: -15px;
    z-index: -1;
}

.photo-marker:hover .fan-img-wrap,
.photo-marker.fan-open .fan-img-wrap {
    transform: rotate(var(--angle, 0deg)) translateY(var(--ty, 0px)) scale(1.0);
}

.photo-marker:hover .fan-img-wrap:hover,
.photo-marker.fan-open .fan-img-wrap:hover {
    z-index: 999 !important;
    transform: rotate(var(--angle, 0deg)) translateY(var(--ty, 0px)) scale(1.35) rotateX(8deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 8px 16px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.1);
}

[data-theme="dark"] .photo-marker:hover .fan-img-wrap:hover,
[data-theme="dark"] .photo-marker.fan-open .fan-img-wrap:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 8px 16px rgba(0,0,0,0.3);
}

.fan-img-wrap .fan-img-in-wrap {
    transform-origin: center center;
    transition: none;
}

.fan-more-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px) saturate(120%);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    pointer-events: none;
    border: 3px solid rgba(255,255,255,0.85);
}

[data-theme="dark"] .fan-more-overlay {
    background: rgba(0, 0, 0, 0.55);
    border-color: rgba(42,42,53,0.85);
}

.photo-marker .photo-count-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 5px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    line-height: 1;
    z-index: 105;
    letter-spacing: 0.2px;
}

/* 堆叠背景卡片 —— 真实图片 + 毛玻璃 */
.stack-card {
    transition: opacity 0.35s ease, transform 0.35s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stack-card img {
    pointer-events: none;
}

.stack-glass-overlay {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(3px) saturate(140%);
    -webkit-backdrop-filter: blur(3px) saturate(140%);
    pointer-events: none;
}

[data-theme="dark"] .stack-glass-overlay {
    background: rgba(15, 15, 20, 0.4);
}

.photo-marker:hover .stack-card,
.photo-marker.fan-open .stack-card {
    opacity: 0 !important;
    transform: rotate(0deg) scale(0.92) !important;
    pointer-events: none;
}

/* 扇形展开卡片容器 */
.fan-card-wrap {
    transform-origin: 50% var(--fan-radius, 220px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, z-index 0s;
    transform-style: preserve-3d;
}

.fan-card-wrap::before {
    content: '';
    position: absolute;
    inset: -15px;
    z-index: -1;
}

.photo-marker:hover .fan-card-wrap,
.photo-marker.fan-open .fan-card-wrap {
    transform: rotate(var(--angle, 0deg)) translateY(var(--ty, 0px)) scale(1.0);
}

.photo-marker:hover .fan-card-wrap:hover,
.photo-marker.fan-open .fan-card-wrap:hover {
    z-index: 999 !important;
    transform: rotate(var(--angle, 0deg)) translateY(var(--ty, 0px)) scale(1.35) rotateX(8deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 8px 16px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.1);
}

[data-theme="dark"] .photo-marker:hover .fan-card-wrap:hover,
[data-theme="dark"] .photo-marker.fan-open .fan-card-wrap:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 8px 16px rgba(0,0,0,0.3);
}

.photo-marker:hover .fan-card-wrap:hover .fan-img-in-wrap,
.photo-marker.fan-open .fan-card-wrap:hover .fan-img-in-wrap {
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.2);
}

[data-theme="dark"] .photo-marker:hover .fan-card-wrap:hover .fan-img-in-wrap,
[data-theme="dark"] .photo-marker.fan-open .fan-card-wrap:hover .fan-img-in-wrap {
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

/* 扇形卡片上的渐进毛玻璃霜层 */
.fan-frost-overlay {
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, var(--opacity, 0.2));
    backdrop-filter: blur(var(--blur, 1px)) saturate(120%);
    -webkit-backdrop-filter: blur(var(--blur, 1px)) saturate(120%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .fan-frost-overlay {
    background: rgba(15, 15, 20, var(--opacity, 0.2));
}

.photo-marker .photo-marker-tail {
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid #fff;
    pointer-events: none;
    z-index: 106;
}

[data-theme="dark"] .photo-marker .photo-marker-tail {
    border-top-color: #2a2a35;
}

/* 触摸设备：禁用 hover 展开，仅通过 .fan-open 控制 */
@media (hover: none) {
    .photo-marker:hover::after { opacity: 0.6; }
    .photo-marker:hover { filter: drop-shadow(0 6px 16px rgba(0,0,0,0.18)); z-index: auto; }
    .photo-marker:hover .photo-marker-inner { transform: scale(var(--marker-zoom-scale, 1.0)); }
    .photo-marker:hover .fan-img:not(.fan-img-in-wrap) { transform: none; }
    .photo-marker:hover .fan-img-wrap { transform: none; }
    .photo-marker:hover .fan-card-wrap { transform: none; }
    .photo-marker:hover .stack-card { opacity: 1 !important; transform: rotate(var(--stack-rotate, 0deg)) scale(var(--stack-scale, 1)) !important; }
}

/* 没有照片的地点：用小彩点代替图片 */
.dot-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2.5px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    animation: photoMarkerIn 0.4s ease both;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(var(--marker-zoom-scale, 1.0));
    transform-origin: center center;
}

.dot-marker:hover {
    transform: scale(calc(var(--marker-zoom-scale, 1.0) * 1.5));
}

.dot-marker.cluster-dot {
    width: auto;
    height: auto;
    min-width: 24px;
    padding: 4px 8px;
    border-radius: 12px;
    color: white;
    font-size: 11px;
    font-weight: 600;
}

[data-theme="dark"] .dot-marker {
    background: var(--primary);
    border-color: #2a2a35;
}

/* ===== Live Photo 样式 ===== */
.live-photo-container {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
}

.live-photo-container .live-photo-thumb,
.live-photo-container .live-photo-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-sm);
    transition: opacity 0.3s ease;
}

.live-photo-container .live-photo-video {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.live-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 7px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.2);
    transition: background 0.3s ease;
}

.live-badge.playing {
    background: rgba(255, 59, 48, 0.75);
}

.live-badge-small {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 2px 5px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.15);
}

/* 相册列表卡片视频 */
.card-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.card-img-wrap .card-img {
    transition: opacity 0.3s ease;
    border-radius: var(--radius) var(--radius) 0 0;
}

.card-img-wrap .card-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-img-wrap .live-badge {
    top: 10px;
    left: 10px;
}

/* ===== 旅行时间线 ===== */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 2px;
    transform: translateX(-50%);
}

.timeline-year-section {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-year-marker {
    display: flex;
    justify-content: center;
    margin-bottom: 1.8rem;
    position: relative;
    z-index: 2;
}

.timeline-year-label {
    background: var(--bg-card);
    color: var(--primary-dark);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    padding: 0.45rem 1.6rem;
    border-radius: 30px;
    border: 2px solid var(--primary);
    box-shadow: var(--shadow);
    font-variant-numeric: tabular-nums;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding-bottom: 1.5rem;
}

.timeline-item.timeline-left {
    padding-right: 2.5rem;
    text-align: right;
}

.timeline-item.timeline-right {
    margin-left: 50%;
    padding-left: 2.5rem;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    top: 12px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-dark);
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--primary), var(--shadow-sm);
    z-index: 3;
}

.timeline-left .timeline-dot {
    right: -7px;
}

.timeline-right .timeline-dot {
    left: -7px;
}

.timeline-card {
    display: block;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0,0,0,0.06);
}

.timeline-card-img-wrap {
    position: relative;
    overflow: hidden;
}

.timeline-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--primary-light);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-card:hover .timeline-card-img {
    transform: scale(1.03);
}

.timeline-card-img-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--primary-light), #fce7f3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    opacity: 0.7;
}

.timeline-card-body {
    padding: 1rem 1.2rem 1.2rem;
}

.timeline-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    letter-spacing: -0.2px;
}

.timeline-card-date {
    font-size: 0.76rem;
    color: var(--text-light);
    margin-bottom: 0.4rem;
    font-weight: 400;
}

.timeline-card-desc {
    font-size: 0.82rem;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

/* 时间线响应式：手机端改为单列 */
@media (max-width: 768px) {
    .timeline-line {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 3rem !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        text-align: left !important;
    }

    .timeline-dot {
        left: 13px !important;
        right: auto !important;
    }

    .timeline-year-marker {
        justify-content: flex-start;
        padding-left: 0.5rem;
    }
}

/* 暗色模式时间线适配 */
[data-theme="dark"] .timeline-line {
    background: linear-gradient(180deg, var(--primary), #6d28d9);
}

[data-theme="dark"] .timeline-year-label {
    background: var(--bg-card);
    border-color: var(--primary);
}

[data-theme="dark"] .timeline-card {
    border-color: rgba(255,255,255,0.04);
}

[data-theme="dark"] .timeline-card:hover {
    border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .timeline-dot {
    border-color: var(--bg-card);
    box-shadow: 0 0 0 2px var(--primary), var(--shadow-sm);
}


/* ===== 地图页左侧时间线面板 ===== */

.timeline-rail {
    position: absolute;
    left: 0;
    top: 7rem;
    bottom: 5rem;
    width: 260px;
    background: transparent;
    z-index: 400;
    overflow: hidden;
}

.timeline-rail-body {
    height: 100%;
    overflow-y: auto;
    padding: 1rem 0.5rem 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}

.timeline-rail-body::-webkit-scrollbar {
    width: 3px;
}
.timeline-rail-body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}

.tl-year-group {
    position: relative;
    margin-bottom: 0.3rem;
    padding-left: 22px;
}

.tl-year-group::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 1px;
    opacity: 0.45;
}

.tl-year-tag {
    position: relative;
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary-dark);
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(190, 24, 93, 0.35);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    margin-bottom: 0.4rem;
    margin-left: -6px;
    z-index: 2;
    white-space: nowrap;
    letter-spacing: -0.2px;
    font-variant-numeric: tabular-nums;
}

.tl-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.3rem 0.4rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.tl-item:hover {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: translateX(2px);
}

.tl-item-dot {
    position: absolute;
    left: -19px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-dark);
    border: 1.5px solid rgba(255,255,255,0.6);
    box-shadow: 0 0 0 1px var(--primary);
    transform: translateY(-50%);
    z-index: 3;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.tl-item:hover .tl-item-dot {
    transform: translateY(-50%) scale(1.3);
}

.tl-item-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.06);
}

.tl-item-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    overflow: hidden;
}

.tl-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    overflow: hidden;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.tl-item-name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 8px rgba(255,255,255,0.8);
}

.tl-item-date {
    font-size: 0.68rem;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 6px rgba(255,255,255,0.6);
}

/* ===== 移动端：时间线按钮 + 底部抽屉 ===== */

.timeline-mobile-btn {
    display: none;
    position: absolute;
    left: 1rem;
    bottom: 5.5rem;
    background: rgba(255,255,255,0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 20px;
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-dark);
    z-index: 400;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: background 0.2s ease;
}

.timeline-mobile-btn:active {
    background: rgba(255,255,255,0.9);
}

.timeline-drawer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55vh;
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(0,0,0,0.06);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.1);
    z-index: 600;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    flex-direction: column;
}

.timeline-drawer.drawer-open {
    transform: translateY(0);
}

.timeline-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem 0.6rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.timeline-drawer-close {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.timeline-drawer-close:active {
    background: rgba(0,0,0,0.05);
}

.timeline-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.8rem 1rem;
    -webkit-overflow-scrolling: touch;
}

.timeline-drawer-body .tl-item-info {
    display: flex;
}

.timeline-drawer-body .tl-item-img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
}

.timeline-drawer-body .tl-item-placeholder {
    width: 44px;
    height: 44px;
}

.timeline-drawer-body .tl-item {
    padding: 0.5rem 0.3rem;
}

/* ===== 暗色模式：时间线面板 ===== */

[data-theme="dark"] .tl-year-tag {
    border-color: rgba(167, 139, 250, 0.35);
    color: var(--primary);
    background: rgba(24,24,31,0.7);
}

[data-theme="dark"] .tl-item:hover {
    background: rgba(24,24,31,0.5);
}

[data-theme="dark"] .tl-item-dot {
    border-color: rgba(24,24,31,0.6);
}

[data-theme="dark"] .tl-item-img {
    border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .tl-item-name {
    text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

[data-theme="dark"] .tl-item-date {
    text-shadow: 0 0 6px rgba(0,0,0,0.6);
}

[data-theme="dark"] .timeline-rail-body {
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

[data-theme="dark"] .timeline-mobile-btn {
    background: rgba(24,24,31,0.78);
    border-color: rgba(255,255,255,0.06);
    color: var(--primary);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

[data-theme="dark"] .timeline-drawer {
    background: rgba(24,24,31,0.92);
    border-top-color: rgba(255,255,255,0.06);
    box-shadow: 0 -4px 32px rgba(0,0,0,0.4);
}

[data-theme="dark"] .timeline-drawer-header {
    border-bottom-color: rgba(255,255,255,0.05);
}

/* ===== 响应式：移动端适配 ===== */

@media (max-width: 767px) {
    .timeline-rail {
        display: none;
    }
    .timeline-mobile-btn {
        display: block;
    }
    .timeline-drawer {
        display: flex;
    }
}

/* ===== 轨迹 Tooltip ===== */
.trajectory-tooltip {
    position: fixed;
    z-index: 2000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.06);
    pointer-events: none;
    white-space: nowrap;
    animation: tooltipFadeIn 0.15s ease;
}

[data-theme="dark"] .trajectory-tooltip {
    background: rgba(24,24,31,0.92);
    border-color: rgba(255,255,255,0.06);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

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

/* 统计栏响应式：项目多时缩小间距 */
@media (max-width: 767px) {
    .map-stats { gap: 1rem; padding: 0.5rem 1rem; }
    .map-stats .stat-num { font-size: 1.2rem; }
    .map-stats .stat-label { font-size: 0.65rem; }
}
