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

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* ==================== 场景切换系统 ==================== */
.scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s;
}

.scene.active {
    opacity: 1;
    visibility: visible;
}

/* ==================== 场景 1: 开始界面 ==================== */
#scene-start {
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.station-hall {
    text-align: center;
    background: white;
    padding: 60px;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    max-width: 600px;
}

.main-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #333;
    font-weight: 500;
}

.subtitle {
    font-size: 1rem;
    margin-bottom: 40px;
    color: #666;
}

.journey-info {
    background: #f8f8f8;
    border-radius: 2px;
    padding: 25px;
    margin-bottom: 35px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    font-size: 0.95rem;
    color: #555;
    text-align: left;
    padding-left: 10px;
}

.btn {
    padding: 14px 40px;
    font-size: 1rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.3s ease;
}

.btn-large {
    padding: 16px 60px;
    font-size: 1.1rem;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

/* ==================== 场景 1.5: 城市选择（12306风格） ==================== */
#scene-city-select {
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 40px 20px;
}

.city-select-container {
    max-width: 900px;
    width: 100%;
    background: white;
    border-radius: 2px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.select-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 30px;
    font-weight: 500;
}

.route-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 15px;
    padding: 25px;
    background: #f8f8f8;
    border-radius: 2px;
}

.route-point {
    text-align: center;
}

.route-label {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

.selected-city {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #0066cc;
    color: white;
    border-radius: 2px;
    font-size: 1.2rem;
}

.selected-icon {
    font-size: 1.3rem;
}

.route-arrow {
    font-size: 1.5rem;
    color: #999;
}

.city-hint {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 25px;
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.city-card {
    position: relative;
    height: 140px;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background-size: cover;
    background-position: center;
    border: 2px solid #e8e8e8;
}

.city-card:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.city-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
}

.city-card:hover .city-card-overlay {
    background: linear-gradient(to bottom, rgba(0, 102, 204, 0.4) 0%, rgba(0, 82, 163, 0.7) 100%);
}

.city-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.city-name {
    font-size: 1.1rem;
    font-weight: 500;
}

.city-landmark {
    font-size: 0.85rem;
    opacity: 0.9;
}

.btn-confirm {
    display: block;
    margin: 0 auto;
}

/* ==================== 场景 2: 真实车票 ==================== */
#scene-ticket {
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ticket-container {
    text-align: center;
}

.ticket-card {
    background: white;
    width: 750px;
    border: 2px solid #ddd;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.ticket-header {
    background: white;
    color: #d32f2f;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #d32f2f;
}

.ticket-logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: #d32f2f;
}

.ticket-type {
    font-size: 0.9rem;
    color: #666;
}

.ticket-body {
    padding: 25px;
    background: white;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #e0e0e0;
}

.ticket-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.main-route {
    align-items: center;
    padding-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
}

.station-box {
    text-align: center;
}

.station-label {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 5px;
}

.station-name {
    font-size: 2rem;
    font-weight: bold;
    color: #000;
}

.train-symbol {
    font-size: 2rem;
    color: #0066cc;
}

.ticket-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-label {
    font-size: 0.8rem;
    color: #999;
}

.field-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: #000;
}

.field-value.price {
    color: #d32f2f;
    font-size: 1.4rem;
}

.passenger-info {
    background: #f8f8f8;
    padding: 12px;
    margin-top: 10px;
}

.ticket-footer {
    background: white;
    padding: 15px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.ticket-barcode {
    font-family: "Courier New", monospace;
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: #000;
}

.ticket-tips {
    font-size: 0.85rem;
    color: #d32f2f;
}

.checking-status {
    margin-top: 30px;
}

.checking-text {
    font-size: 1.2rem;
    color: #4caf50;
}

/* ==================== 场景 3: 地图动画 ==================== */
#scene-map {
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-container {
    text-align: center;
    max-width: 1000px;
    width: 90%;
}

.map-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 40px;
    font-weight: 500;
}

.route-map {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    padding: 60px;
    margin-bottom: 40px;
}

.map-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.city-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.city-name {
    font-size: 1.3rem;
    font-weight: 500;
    color: #000;
}

.route-line {
    flex: 1;
    height: 4px;
    background: #ddd;
    margin: 0 40px;
    position: relative;
}

.train-icon {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    animation: trainMove 2.5s ease-in-out forwards;
}

@keyframes trainMove {
    from {
        left: 0%;
    }
    to {
        left: 100%;
    }
}

.countdown-display {
    font-size: 1.2rem;
    color: #666;
}

.countdown {
    font-size: 4rem;
    font-weight: bold;
    color: #0066cc;
    margin-top: 15px;
}

/* ==================== 场景 4: 真实车厢 ==================== */
#scene-train {
    background: #e8e4d9;
    display: flex;
    flex-direction: column;
}

/* 顶部进度条 */
.top-bar {
    background: white;
    padding: 12px 25px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.mini-map {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.mini-station {
    font-size: 0.9rem;
    white-space: nowrap;
    font-weight: 500;
    color: #333;
}

.progress-track {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    position: relative;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #0066cc;
    border-radius: 3px;
    transition: width 1s linear;
}

.mini-train {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    font-size: 1.3rem;
    transition: left 1s linear;
}

/* 真实车厢主体 */
.train-cabin-realistic {
    flex: 1;
    position: relative;
    background: linear-gradient(180deg, #e8e4d9 0%, #d4d0c5 100%);
    overflow: hidden;
}

/* 倒计时显示 */
.timer-overlay {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
    background: rgba(255, 255, 255, 0.98);
    padding: 20px 45px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.main-timer {
    font-size: 4rem;
    font-weight: 500;
    color: #0066cc;
    font-family: "SF Mono", "Courier New", monospace;
}

.main-timer.running {
    color: #4caf50;
}

.main-timer.paused {
    color: #ff9800;
}

.timer-status {
    font-size: 1rem;
    color: #666;
    margin-top: 8px;
}

/* 真实车窗 - 照片风景版 */
.realistic-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 65%;
}

.window-frame-realistic {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #87ceeb;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

/* 照片风景滚动系统 */
.scenery-photos {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
}

.photo-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 300%;
    height: 100%;
    display: flex;
    animation: photoScroll 30s linear infinite;
}

.photo-layer.paused {
    animation-play-state: paused;
}

@keyframes photoScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-66.666%);
    }
}

.photo-item {
    flex: 0 0 33.333%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 窗框边框 - 金属材质 */
.window-border-top,
.window-border-bottom,
.window-border-left,
.window-border-right {
    position: absolute;
    background: linear-gradient(135deg, #b8b8b8 0%, #7a7a7a 50%, #9e9e9e 100%);
    z-index: 10;
}

.window-border-top {
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.window-border-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
}

.window-border-left {
    top: 0;
    left: 0;
    bottom: 0;
    width: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
}

.window-border-right {
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
}

/* 隧道效果 */
.tunnel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
    z-index: 5;
}

.tunnel.active {
    opacity: 0.9;
}

/* 车厢内饰 */
.cabin-details {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.seat-left {
    position: absolute;
    bottom: 40px;
    left: 20px;
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    border-radius: 8px 8px 0 0;
    opacity: 0.4;
}

.seat-left::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 5px;
    right: 5px;
    height: 25px;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    border-radius: 8px 8px 0 0;
}

.table-board {
    position: absolute;
    bottom: 70px;
    right: 40px;
    width: 120px;
    height: 80px;
    background: linear-gradient(135deg, #d4a574 0%, #b8935c 100%);
    border-radius: 4px;
    opacity: 0.5;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.3);
}

/* 控制按钮 */
.train-controls {
    background: white;
    padding: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.1);
}

.btn-control {
    padding: 10px 25px;
    font-size: 1rem;
    background: #0066cc;
    color: white;
}

.btn-control:hover {
    background: #0052a3;
}

.btn-reset {
    background: #d32f2f;
}

.btn-reset:hover {
    background: #b71c1c;
}

/* ==================== 场景 5: 到站 ==================== */
#scene-arrival {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.arrival-screen {
    text-align: center;
    color: white;
}

.celebration {
    font-size: 6rem;
}

.arrival-title {
    font-size: 2.5rem;
    margin: 25px 0;
    font-weight: 500;
}

.arrival-message {
    font-size: 1.3rem;
    margin-bottom: 35px;
}

.arrival-stats {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 2px;
    padding: 25px;
    margin-bottom: 35px;
    display: flex;
    gap: 35px;
    justify-content: center;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 1rem;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 500;
}

.arrival-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ==================== 场景 3: 真实中国地图 ==================== */
.china-map-wrapper {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 40px;
    margin-bottom: 40px;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

#chinaMap {
    width: 100%;
    max-width: 800px;
    height: auto;
}

.city-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.city-dot:hover {
    r: 8;
}

.city-label {
    font-size: 14px;
    font-weight: 500;
    fill: #333;
    font-family: "Microsoft YaHei", sans-serif;
}

#routePath {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawRoute 2s ease-in-out forwards;
}

@keyframes drawRoute {
    to {
        stroke-dashoffset: 0;
    }
}

#movingTrain {
    opacity: 0;
    animation: trainAppear 0.5s ease-in 2s forwards;
}

@keyframes trainAppear {
    to {
        opacity: 1;
    }
}

.map-legend {
    margin-top: 30px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 1.2rem;
}

.legend-from,
.legend-to {
    font-weight: 500;
    color: #333;
}

.legend-arrow {
    color: #0066cc;
    font-size: 1.5rem;
}

/* ==================== 照片风景滚动系统 ==================== */
.scenery-photos {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
}

.photo-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 300%;
    height: 100%;
    display: flex;
    animation: photoScroll 30s linear infinite;
}

.photo-layer.paused {
    animation-play-state: paused;
}

@keyframes photoScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-66.666%);
    }
}

.photo-item {
    flex: 0 0 33.333%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
