/* ================= 第一层：科技网格动态背景 ================= */
.ft-page-environment {
    width: 100vw; position: relative; left: 50%; transform: translateX(-50%);
    padding: 40px 20px; 
    
    display: flex; justify-content: center; align-items: flex-start;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    background-image: 
        linear-gradient(to right, rgba(203, 213, 225, 0.4) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(203, 213, 225, 0.4) 1px, transparent 1px);
    background-size: 40px 40px; animation: gridMove 20s linear infinite;
}
.ft-page-environment::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, #f8fafc 85%); pointer-events: none;
}
@keyframes gridMove { 0% { background-position: 0px 0px; } 100% { background-position: 40px 40px; } }

/* ================= 第二层：中央悬浮白卡 App ================= */
.ft-app-window {
    width: 100%; max-width: 1100px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(226, 232, 240, 0.8);
    overflow: hidden; display: flex; flex-direction: column; position: relative; z-index: 10;
}

/* --- App 头部 --- */
.ft-app-header { padding: 35px 40px; background: rgba(255, 255, 255, 0.8); border-bottom: 1px solid #f1f5f9; text-align: center; }
.route-selector-wrapper { display: flex; align-items: center; justify-content: center; gap: 15px; max-width: 750px; margin: 0 auto 20px auto; }
.select-box { flex: 1; position: relative; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; transition: 0.2s; height: 54px; display: flex; align-items: center; }
.select-box:focus-within { background: #ffffff; border-color: #0073e6; box-shadow: 0 4px 20px rgba(0, 115, 230, 0.08); }
.select-box select {
    width: 100% !important; padding: 0 40px 0 20px !important; height: 100% !important;
    appearance: none !important; -webkit-appearance: none !important;
    background: transparent !important; border: none !important; outline: none !important;
    font-size: 15px !important; font-weight: 600 !important; color: #1e293b !important;
    cursor: pointer !important; box-sizing: border-box !important; line-height: normal !important;
}
.select-box select option { color: #1e293b !important; background: #ffffff !important; }
.select-box::after { content: '▼'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 10px; color: #94a3b8; pointer-events: none; }
.swap-icon { color: #cbd5e1; font-size: 20px; font-weight: bold; padding: 0 5px; }
.hot-searches { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hot-title { font-size: 12px; font-weight: 700; color: #64748b; margin-right: 5px; }
.hot-tag { background: #f1f5f9; color: #475569; padding: 6px 14px; border-radius: 20px; cursor: pointer; transition: 0.2s; border: 1px solid #e2e8f0; font-size: 12px; font-weight: 600; }
.hot-tag:hover { background: #e0f2fe; color: #0073e6; border-color: #bae6fd; }

/* --- App 主体：价格列表 --- */
.ft-app-body { min-height: 300px; }
.rate-row { display: flex; align-items: center; padding: 24px 40px; border-bottom: 1px solid #f8fafc; transition: background 0.2s; gap: 20px; }
.rate-row:hover { background: #f8fafc; }
.id-section { flex: 0 0 130px; }
.price-code-badge { font-family: 'SF Mono', monospace; font-size: 11px; color: #64748b; background: #f1f5f9; padding: 4px 8px; border-radius: 4px; border: 1px solid #e2e8f0; font-weight: 500; }
.route-path-flow { flex: 1.5; display: grid; grid-template-columns: minmax(70px, 0.7fr) minmax(140px, 1.15fr) minmax(130px, 1.35fr); align-items: center; gap: 12px; min-width: 0; }
.node { min-width: 0; }
.node-city { font-size: 15px; font-weight: 600; color: #1e293b; display: block; line-height: 1.35; overflow-wrap: break-word; }
.node-label { font-size: 10px; color: #94a3b8; font-weight: 600; text-transform: uppercase; margin-top: 2px; }
.path-line { min-width: 0; height: auto; min-height: 30px; background: linear-gradient(#cbd5e1, #cbd5e1) left center / 100% 1px no-repeat; display: flex; align-items: center; justify-content: center; }
.border-pill { position: static; transform: none; background: #f0f7ff; color: #0073e6; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 20px; border: 1px solid #bae6fd; white-space: normal; line-height: 1.35; text-align: center; max-width: 100%; box-sizing: border-box; overflow-wrap: break-word; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.info-cluster { flex: 0 0 340px; display: flex; align-items: center; justify-content: flex-end; gap: 25px; }
.price-group { text-align: right; min-width: 80px; }
.price-amount { font-size: 18px; font-weight: 700; color: #1e293b; display: block; line-height: 1.1;} 
.price-meta { font-size: 11px; color: #64748b; font-weight: 500; margin-top: 4px; display: block; }
.etd-group { text-align: right; min-width: 125px; }
.etd-date { font-size: 12px; font-weight: 500; color: #1e293b; display: block; word-wrap: break-word; line-height: 1.3; }
.etd-label { font-size: 10px; color: #94a3b8; font-weight: 600; text-transform: uppercase; margin-top: 4px; display: block;}
.btn-book { background: #0073e6; color: #ffffff !important; padding: 10px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; transition: 0.2s; white-space: nowrap; box-sizing: border-box !important; font-family: inherit; }
.btn-book:hover { background: #005bb5; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 115, 230, 0.2); }

/* --- 底部：分页栏 --- */
.ft-app-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 40px; background: rgba(255, 255, 255, 0.8); border-top: 1px solid #f1f5f9; }
.page-info { font-size: 13px; color: #64748b; font-weight: 500; flex: 0 0 auto; }
.page-controls { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; min-width: 0; }
.page-btn { padding: 6px 14px; border-radius: 6px; border: 1px solid #cbd5e1; background: #ffffff; color: #475569; cursor: pointer; font-size: 13px; font-weight: 500; transition: 0.2s; flex: 0 0 auto; }
.page-btn:hover:not(:disabled) { background: #f1f5f9; color: #0073e6; border-color: #93c5fd; }
.page-btn.active { background: #0073e6; color: #ffffff; border-color: #0073e6; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-ellipsis { padding: 6px 4px; color: #64748b; font-size: 13px; line-height: 1; flex: 0 0 auto; }

/* ================= 第三层：询价弹窗 (EmailJS) ================= */
.ft-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(6px);
    display: none; justify-content: center; align-items: center; z-index: 999999 !important; 
    opacity: 0; transition: opacity 0.3s ease;
}
.ft-modal-overlay.active { display: flex; opacity: 1; }

.ft-modal-content {
    background: #ffffff; border-radius: 20px; padding: 35px; width: 90%; max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
    transform: translateY(20px); transition: transform 0.3s ease; position: relative;
}
.ft-modal-overlay.active .ft-modal-content { transform: translateY(0); }

.ft-modal-close { position: absolute; top: 20px; right: 25px; font-size: 24px; color: #94a3b8; cursor: pointer; line-height: 1; transition: 0.2s; }
.ft-modal-close:hover { color: #0f172a; }

.ft-modal-title { margin: 0 0 25px 0; color: #0f172a; font-size: 20px; font-weight: 700; }

.ft-input-group { margin-bottom: 15px; }
.ft-input-group label { display: block; font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.ft-input {
    width: 100% !important; padding: 12px 16px !important; border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important; background: #f8fafc !important; font-size: 14px !important;
    outline: none !important; transition: 0.2s !important; box-sizing: border-box !important; color: #1e293b !important;
}
.ft-input:focus { border-color: #0073e6 !important; background: #ffffff !important; box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.1) !important; }
textarea.ft-input { resize: vertical; min-height: 80px !important; }

.btn-submit {
    width: 100% !important; padding: 14px !important; background: #0073e6 !important; color: #ffffff !important;
    border: none !important; border-radius: 10px !important; font-size: 15px !important; font-weight: 600 !important;
    cursor: pointer !important; transition: 0.2s !important; margin-top: 10px !important; box-sizing: border-box !important;
}
.btn-submit:hover { background: #005bb5 !important; }
.btn-submit:disabled { background: #94a3b8 !important; cursor: not-allowed !important; }

@media (max-width: 1100px) {
    .ft-page-environment { padding: 20px 0; }
    .ft-app-window { border-radius: 0; border: none; }
    .ft-app-header, .rate-row, .ft-app-footer { padding: 20px; }
    .route-selector-wrapper { flex-direction: column; gap: 10px; }
    .swap-icon { transform: rotate(90deg); padding: 5px 0; }
    .rate-row { flex-direction: column; align-items: flex-start; gap: 15px; }
    .info-cluster { width: 100%; justify-content: space-between; border-top: 1px solid #f1f5f9; padding-top: 15px; flex: none; flex-wrap: wrap; gap: 12px 16px; }
    .id-section, .route-path-flow { width: 100%; flex: none; }
    .price-group, .etd-group { text-align: left; }
    .etd-group { min-width: 0; }
    .btn-book { margin-left: auto; }
}

/* Staging-only mobile readability fixes; source CSS is never modified. */
@media (max-width: 1100px) {
    .route-path-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .node { min-width: 0; }
    .path-line { width: 100%; height: auto; min-height: 0; background: none; }
    .border-pill { position: static; transform: none; display: inline-block; white-space: normal; line-height: 1.35; padding: 5px 10px; }
    .ft-app-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-controls { width: 100%; flex-wrap: wrap; row-gap: 8px; }
    .page-btn { padding: 6px 10px; }
}

/* SEO P0: static search content, explicit rate status and accessible filters. */
*, *::before, *::after { box-sizing: border-box; }
.js .static-fallback { display: none; }
.no-js .interactive-only { display: none !important; }
.ft-page-environment { flex-direction: column; align-items: center; }
.seo-intro { position: relative; z-index: 10; width: 100%; max-width: 1100px; margin: 0 0 24px; padding: 0 8px; color: #1e293b; }
.seo-eyebrow { margin: 0 0 8px; color: #0073e6; font-size: 12px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.seo-intro h1 { max-width: 850px; margin: 0 0 14px; color: #0f172a; font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: -.025em; }
.seo-intro > p:not(.seo-eyebrow) { max-width: 900px; margin: 0 0 9px; color: #475569; font-size: 15px; line-height: 1.65; }
.seo-intro .rate-disclaimer { color: #64748b; font-size: 12px; }
.staging-banner { position: relative; z-index: 10; width: 100%; max-width: 1100px; margin: 0 0 20px; padding: 12px 18px; border: 1px solid #fbbf24; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: 13px; font-weight: 650; line-height: 1.5; }
.ft-app-header { width: 100%; }
.route-selector-wrapper { max-width: 980px; }
.select-box { min-width: 0; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hot-tag { appearance: none; font-family: inherit; }
.hot-tag:focus-visible, .btn-book:focus-visible, .page-btn:focus-visible, .ft-modal-close:focus-visible { outline: 3px solid rgba(0, 115, 230, .25); outline-offset: 2px; }
.id-section .rate-status { display: block; width: max-content; max-width: 100%; margin-top: 7px; padding: 2px 7px; border-radius: 4px; font-size: 9px; font-weight: 750; letter-spacing: .04em; line-height: 1.4; text-transform: uppercase; }
.rate-status.current { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.rate-status.historical { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.static-fallback section > h2 { margin: 0; padding: 28px 40px 0; color: #0f172a; font-size: 20px; line-height: 1.35; }
.static-section-note { margin: 8px 0 12px; padding: 0 40px; color: #64748b; font-size: 12px; line-height: 1.6; }
.static-rate-row .info-cluster { flex-basis: 250px; }
.data-version { position: relative; z-index: 10; width: 100%; max-width: 1100px; padding: 14px 8px 0; color: #94a3b8; font: 11px 'SF Mono', monospace; text-align: right; }
.empty-rates { padding: 80px 20px; color: #94a3b8; font-weight: 500; text-align: center; }
.data-error { margin: 20px 40px 0; padding: 14px 16px; border: 1px solid #fecaca; border-radius: 8px; background: #fef2f2; color: #b91c1c; font-size: 13px; line-height: 1.5; }
.data-error[hidden] { display: none; }
.ft-modal-close { border: 0; background: transparent; padding: 0; font-family: inherit; }
@media (max-width: 1100px) {
    .seo-intro { padding: 0 20px; }
    .staging-banner { border-radius: 0; }
    .static-fallback section > h2 { padding: 24px 20px 0; }
    .static-section-note { padding: 0 20px; }
    .static-rate-row .info-cluster { flex: none; }
    .data-version { padding: 14px 20px 0; }
    .data-error { margin: 20px 20px 0; }
}
@media (max-width: 480px) {
    .seo-intro h1 { font-size: 27px; }
    .seo-intro > p:not(.seo-eyebrow) { font-size: 14px; }
    .seo-intro .rate-disclaimer { font-size: 12px; }
    .hot-searches { align-items: stretch; }
    .hot-title { width: 100%; }
    .hot-tag { padding: 7px 11px; }
}
