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

:root {
    /* 暗色主题 */
    --bg-dark: #0a0e17;
    --bg-darker: #060911;
    --bg-card: #1a1f2e;
    --bg-card-light: #242937;

    /* 地图蓝色 */
    --ocean-blue: #0d1f3c;
    --ocean-blue-dark: #071426;

    /* 文字颜色 */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #606060;

    /* 强调色 */
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;

    /* 按钮 */
    --btn-primary: #ffffff;
    --btn-danger: #ef4444;

    /* 阴影 */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

.app-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.screen.active {
    display: flex;
    opacity: 1;
    flex-direction: column;
}

/* ========== 主菜单屏幕 ========== */
.home-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--ocean-blue-dark) 0%, var(--bg-dark) 100%);
}

.greeting {
    text-align: center;
    margin-bottom: 60px;
}

.greeting h2 {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.greeting h1 {
    font-size: 36px;
    font-weight: 700;
}

.main-menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.menu-item {
    background: var(--bg-card);
    border: none;
    padding: 20px 24px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-primary);
    font-size: 18px;
}

.menu-item:hover {
    background: var(--bg-card-light);
    transform: translateX(5px);
}

.menu-icon {
    font-size: 24px;
}

/* ========== 通用头部 ========== */
.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-darker);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    min-width: 40px;
}

.screen-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.spacer {
    min-width: 40px;
}

/* ========== 航线选择屏幕 ========== */
.route-selection-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

#map-container {
    flex: 1;
    width: 100%;
    background: var(--ocean-blue);
    min-height: 0; /* 防止flex子元素溢出 */
}

.route-picker-container {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    padding: 0 20px;
    z-index: 1000; /* 确保在地图之上 */
    pointer-events: none; /* 允许点击穿透容器 */
}

.route-picker-container > * {
    pointer-events: auto; /* 恢复子元素的点击事件 */
}

.custom-route-btn {
    width: 100%;
    padding: 12px;
    background: rgba(10, 15, 25, 0.95);
    backdrop-filter: blur(10px);
    border: 2px dashed var(--accent-blue);
    border-radius: 12px;
    color: var(--accent-blue);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.custom-route-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.02);
}

.route-picker {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
    background: linear-gradient(to top, rgba(10, 15, 25, 0.95) 0%, rgba(10, 15, 25, 0.85) 50%, transparent 100%);
    backdrop-filter: blur(8px);
    margin: 0 -20px;
    padding: 15px 20px 10px 20px;
}

.route-picker::-webkit-scrollbar {
    display: none;
}

.route-card {
    flex: 0 0 260px;
    scroll-snap-align: center;
    background: rgba(26, 31, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.route-card:hover,
.route-card.selected {
    border-color: var(--accent-blue);
    transform: scale(1.02);
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.airport-codes {
    font-size: 20px;
    font-weight: 700;
}

.route-duration {
    background: var(--accent-blue);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.route-cities {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.route-distance {
    color: var(--text-primary);
    font-size: 13px;
}

.continue-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: 16px;
    background: var(--btn-primary);
    color: var(--bg-dark);
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1001; /* 确保在地图和航线选择器之上 */
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.continue-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.continue-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== 自定义航线屏幕 ========== */
.custom-route-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow-y: auto;
}

.airport-selection {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.airport-field {
    position: relative;
}

.airport-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.airport-field input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s;
}

.airport-field input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: var(--bg-card-light);
}

.airport-field input::placeholder {
    color: var(--text-muted);
}

.airport-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border-radius: 12px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 10;
    display: none;
}

.airport-dropdown.show {
    display: block;
}

.airport-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.airport-option:last-child {
    border-bottom: none;
}

.airport-option:hover {
    background: var(--bg-card-light);
}

.airport-code-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 8px;
}

.airport-name-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.swap-icon {
    text-align: center;
    font-size: 24px;
    color: var(--accent-blue);
}

.route-preview {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--accent-blue);
}

.preview-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-row:last-child {
    border-bottom: none;
}

.preview-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.preview-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
}

/* ========== 座位选择屏幕 ========== */
.seat-selection-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #0a0a0a;
    overflow-y: auto;
}

/* 航班信息头部 */
.flight-info-header {
    display: none;
}

.flight-number {
    display: none;
}

/* 飞机外形容器 */
.airplane-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
    background: #2a2a2a;
    border-radius: 150px 150px 30px 30px;
    padding: 0 0 40px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* 飞机机头（驾驶舱） */
.plane-nose {
    width: 280px;
    height: 140px;
    background: #333333;
    margin: 0 auto;
    border-radius: 140px 140px 0 0;
    position: relative;
}

.plane-nose::before {
    display: none;
}

/* 驾驶舱挡风玻璃 */
.cockpit-window {
    width: 80px;
    height: 35px;
    background: #1a1a1a;
    border: none;
    border-radius: 8px 8px 0 0;
    position: absolute;
    top: 30px;
    box-shadow: none;
}

.cockpit-window.left {
    left: 60px;
}

.cockpit-window.right {
    right: 60px;
}

/* 飞机机翼 */
.plane-wing {
    display: none;
}

/* 机舱主体 */
.airplane-cabin {
    width: 100%;
    padding: 30px 25px 0 25px;
    position: relative;
}

/* 飞机信息卡片 */
.plane-info-card {
    display: none;
}

.plane-model {
    display: none;
}

.plane-details {
    display: none;
}

.detail-item {
    display: none;
}

.detail-item strong {
    display: none;
}

.detail-separator {
    display: none;
}

/* 舱位区域 */
.cabin-section {
    margin-bottom: 0;
}

/* 舱位分隔线 */
.section-divider {
    display: none;
}

.divider-line {
    display: none;
}

.section-label {
    display: none;
}

/* 飞机机尾 */
.plane-tail {
    display: none;
}

/* 座位标签 */
.seat-labels {
    margin-bottom: 15px;
    padding: 0 20px;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 10px;
}

/* 公务舱标签 (2-2布局) */
.business-labels {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}

/* 经济舱标签 (3-3布局) */
.economy-labels {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}

.aisle-space {
    width: 100%;
}

.seat-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 座位行 */
.seat-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 10px;
    align-items: center;
    padding: 0 20px;
    position: relative;
}

/* 公务舱座位行 (2-2布局) */
.seat-row.business-row {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}

/* 经济舱座位行 (3-3布局) */
.seat-row.economy-row {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}

/* 行号 */
.seat-row-number {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-size: 13px;
    font-weight: 500;
    z-index: 1;
}

/* 座位样式 */
.seat {
    aspect-ratio: 1;
    background: #3a3a3a;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: none;
}

/* 座位边框装饰 */
.seat::before {
    display: none;
}

/* 座位安全带 */
.seat::after {
    display: none;
}

.seat:hover {
    background: #4a4a4a;
    transform: scale(1.05);
}

.seat.selected {
    background: #5a5a5a;
}

.seat.selected::before {
    display: none;
}

.seat.selected::after {
    display: none;
}

/* ========== 场景标签选择 ========== */
.tag-selection-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.tag-dialog {
    background: var(--bg-card);
    padding: 30px 25px;
    border-radius: 20px;
    max-width: 400px;
    width: 100%;
}

.tag-header {
    text-align: center;
    margin-bottom: 25px;
}

.seat-info {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 10px;
}

.tag-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.tag-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.tag-btn {
    background: var(--bg-card-light);
    border: 2px solid transparent;
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.tag-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.tag-icon {
    font-size: 32px;
}

.tag-text {
    font-size: 14px;
    font-weight: 600;
}

/* ========== 登机牌屏幕 ========== */
.boarding-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: var(--bg-dark);
}

.boarding-pass {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    padding: 30px 25px;
    border-radius: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: visible;
}

/* 撕票区域（条码区） */
.tear-section {
    position: relative;
    cursor: grab;
    user-select: none;
    transition: transform 0.1s;
    margin-bottom: 25px;
}

.tear-section:active {
    cursor: grabbing;
}

.tear-section.tearing {
    transition: none;
}

/* 虚线分隔线 */
.tear-line {
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        rgba(255, 255, 255, 0.3) 0px,
        rgba(255, 255, 255, 0.3) 10px,
        transparent 10px,
        transparent 18px
    );
    margin-bottom: 15px;
}

/* 撕票提示 */
.tear-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.tear-icon {
    font-size: 20px;
    animation: bounce 2s infinite;
}

.tear-text {
    font-size: 12px;
    color: var(--text-secondary);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.boarding-header {
    text-align: center;
    margin-bottom: 25px;
}

.boarding-header h2 {
    font-size: 22px;
    font-weight: 600;
}

.flight-route {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--bg-card-light);
    border-radius: 15px;
}

.airport-info {
    text-align: center;
}

.airport-code {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.airport-name {
    font-size: 13px;
    color: var(--text-secondary);
}

.flight-path-icon {
    font-size: 24px;
    opacity: 0.6;
}

.flight-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.meta-value {
    font-size: 14px;
    font-weight: 600;
}

.barcode-container {
    margin: 25px 0;
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.barcode {
    width: 100%;
    height: 40px;
    color: black;
}

.flight-mode-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--accent-blue);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.start-flight-btn {
    width: 100%;
    max-width: 400px;
    padding: 16px;
    background: var(--btn-primary);
    color: var(--bg-dark);
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.start-flight-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* ========== 飞行中屏幕 ========== */
.flight-content {
    flex: 1;
    position: relative;
}

#flight-map-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* 飞机标记样式 */
.plane-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.plane-marker svg {
    display: block;
    overflow: visible;
}

/* GSAP会处理所有动画，移除CSS transition避免冲突 */
.maplibregl-marker {
    transition: none !important;
}

.flight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    z-index: 1000; /* 确保在地图之上 */
}

.flight-overlay > * {
    pointer-events: auto;
}

.flight-info-bottom-left,
.flight-info-bottom-right {
    position: absolute;
    bottom: 20px;
    background: rgba(26, 31, 46, 0.95);
    backdrop-filter: blur(15px);
    padding: 15px 20px;
    border-radius: 15px;
    min-width: 200px;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.flight-info-bottom-left {
    left: 20px;
}

.flight-info-bottom-right {
    right: 20px;
}

.info-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.info-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.flight-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 1001;
}

.control-btn {
    padding: 12px 24px;
    background: rgba(26, 31, 46, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.control-btn:hover {
    background: var(--bg-card);
}

.control-btn.danger {
    background: rgba(239, 68, 68, 0.9);
}

.ambient-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    gap: 12px;
}

.sound-btn {
    width: 54px;
    height: 54px;
    background: rgba(26, 31, 46, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.sound-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.sound-btn.active {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.sound-btn svg {
    opacity: 0.8;
}

.sound-btn.active svg {
    opacity: 1;
}

.locate-btn {
    width: 54px;
    height: 54px;
    background: rgba(26, 31, 46, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.locate-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.locate-btn svg {
    opacity: 0.9;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(59, 130, 246, 0.8);
    }
}

/* 夜晚模式按钮 */
.night-mode-btn {
    width: 54px;
    height: 54px;
    background: rgba(26, 31, 46, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.night-mode-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.night-mode-btn.active {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.2);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
}

/* 夜晚模式全局样式 */
body.night-mode {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a1f2e;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
}

body.night-mode .flight-overlay {
    background: linear-gradient(
        to bottom,
        rgba(10, 14, 26, 0.85) 0%,
        rgba(26, 31, 46, 0.85) 100%
    );
}

body.night-mode .route-card,
body.night-mode .boarding-pass,
body.night-mode .custom-route-content,
body.night-mode .sound-selector-content {
    background: #1a1f2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.night-mode .screen-header {
    background: rgba(26, 31, 46, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.night-mode .flight-info-panel,
body.night-mode .flight-stat {
    background: rgba(26, 31, 46, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 高德地图控制按钮样式（夜晚模式） */
body.night-mode .amap-logo,
body.night-mode .amap-copyright {
    opacity: 0.6;
}

/* 音效选择弹窗 */
.sound-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.sound-selector-content {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

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

.sound-selector-content h3 {
    margin: 0 0 20px 0;
    text-align: center;
    color: var(--text-primary);
    font-size: 20px;
}

.sound-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.sound-option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    background: var(--bg-card-light);
    border: 2px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-primary);
    font-size: 16px;
}

.sound-option-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(5px);
}

.sound-option-btn.playing {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.sound-option-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-option-name {
    flex: 1;
    font-weight: 500;
}

.close-selector-btn {
    width: 100%;
    padding: 14px;
    background: var(--bg-card-light);
    border: none;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.close-selector-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* ========== 完成屏幕 ========== */
.complete-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: var(--bg-dark);
}

.celebration {
    font-size: 80px;
    margin-bottom: 20px;
    animation: celebrate 1s ease-in-out;
}

@keyframes celebrate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(10deg); }
}

.complete-content h2 {
    font-size: 28px;
    margin-bottom: 30px;
}

.completion-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 400px;
}

.completion-stat {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
}

.big-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.unit {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
}

.completion-message {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.primary-btn {
    padding: 16px 40px;
    background: var(--btn-primary);
    color: var(--bg-dark);
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* ========== 历史记录屏幕 ========== */
.history-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-dark);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.history-route {
    font-size: 18px;
    font-weight: 700;
}

.history-tag {
    background: var(--accent-blue);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.history-details {
    display: flex;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.history-date {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ========== 数据分析屏幕 ========== */
.stats-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-dark);
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.summary-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
}

.summary-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.summary-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.stats-breakdown {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
}

.stats-breakdown h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.tag-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tag-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tag-breakdown-item:last-child {
    border-bottom: none;
}

.tag-breakdown-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag-breakdown-value {
    font-weight: 700;
}

/* 响应式 */
@media (max-width: 768px) {
    .completion-stats {
        grid-template-columns: 1fr;
    }

    .stats-summary {
        grid-template-columns: 1fr;
    }
}
