/* ================= 第一层：科技网格动态背景 ================= */
.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: flex; align-items: center; gap: 15px; }
.node { min-width: 80px; }
.node-city { font-size: 15px; font-weight: 600; color: #1e293b; display: block; }
.node-label { font-size: 10px; color: #94a3b8; font-weight: 600; text-transform: uppercase; margin-top: 2px; }
.path-line { flex-grow: 1; height: 1px; background: #cbd5e1; position: relative; min-width: 40px; }
.border-pill { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #f0f7ff; color: #0073e6; font-size: 12px; font-weight: 700; padding: 5px 16px; border-radius: 20px; border: 1px solid #bae6fd; white-space: nowrap; 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; 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; }
.page-controls { display: flex; gap: 6px; }
.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; }
.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; }

/* ================= 第三层：询价弹窗 (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: 900px) {
    .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; }
    .id-section, .route-path-flow { width: 100%; flex: none; }
    .price-group, .etd-group { text-align: left; }
}