/* ==========================================
   全域變數與主題設定 (預設為亮色模式)
   ========================================== */
:root {
    --primary-color: #DDD8C5;       /* 主色調：典雅暖米色 */
    --primary-hover: #cfcaa9;       /* 主色調 Hover */
    --primary-text: #2e2c25;        /* 專用於主色背景上的文字色，以確保高對比度 */
    --secondary-color: #8c7a6b;     /* 強調色：雅緻木質棕 */
    --secondary-hover: #756456;     /* 強調色 Hover */
    --bg-color: #f7f6f2;            /* 頁面背景：極淺暖灰 */
    --card-bg: rgba(255, 255, 255, 0.88); /* 玻璃卡片背景 */
    --card-border: rgba(221, 216, 197, 0.6); /* 卡片邊框 */
    --text-color: #2e2c25;          /* 主要文字：深暖棕灰 */
    --text-muted: #706e64;          /* 次要文字 */
    --shadow-color: rgba(140, 122, 107, 0.08); /* 配合主色調的暖色投影 */
    --border-color: #e5e3d8;        /* 邊框顏色 */
    --glass-blur: blur(16px);       /* 玻璃模糊效果 */
    --transition-speed: 0.35s;
}

/* 深色模式主題變數 */
body.dark-mode {
    --primary-color: #DDD8C5;
    --primary-hover: #ece9dc;
    --primary-text: #2e2c25;
    --secondary-color: #bfaea0;     /* 深色模式下的柔和木質棕 */
    --secondary-hover: #d5c8bd;
    --bg-color: #161412;            /* 深色背景：黑巧克力深木棕 */
    --card-bg: rgba(30, 27, 24, 0.8);  /* 暗色卡片 */
    --card-border: rgba(221, 216, 197, 0.12);
    --text-color: #f2f0e8;
    --text-muted: #a3a095;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --border-color: #2d2924;
}

body.dark-mode header nav ul li a:hover,
body.dark-mode header nav ul li a.active {
    color: var(--primary-color);
}

body.dark-mode header nav ul li a::after {
    background-color: var(--primary-color);
}

/* 全域重設與基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', 'Noto Sans TC', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button, input, select {
    font-family: inherit;
}

/* ==========================================
   頁首與導覽列
   ========================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 4px 30px var(--shadow-color);
    transition: background var(--transition-speed);
}

header .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

header .logo span span {
    color: var(--secondary-color);
}

header nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

header nav ul li a {
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-speed);
}

header nav ul li a:hover,
header nav ul li a.active {
    color: var(--secondary-color);
}

header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transition: width var(--transition-speed);
}

header nav ul li a:hover::after,
header nav ul li a.active::after {
    width: 100%;
}

.btn-icon {
    background: var(--border-color);
    color: var(--text-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background var(--transition-speed), transform 0.2s;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* ==========================================
   主視覺區 (Hero Section)
   ========================================== */
.hero-section {
    position: relative;
    padding: 7rem 5% 5rem;
    background: linear-gradient(135deg, rgba(46, 44, 37, 0.72) 0%, rgba(140, 122, 107, 0.55) 100%), url('hero-bg.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ffffff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    font-size: 1.125rem;
    color: #e5e3d8;
    margin-bottom: 3rem;
    max-width: 600px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   搜尋面板 (玻璃擬物風)
   ========================================== */
.search-panel {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 1000px;
    box-shadow: 0 10px 40px var(--shadow-color);
    margin-bottom: 2rem;
}

.trip-type {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.trip-type-btn {
    background: none;
    border: none;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 30px;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.trip-type-btn.active {
    background: var(--primary-color);
    color: var(--primary-text);
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.25rem;
    align-items: flex-end;
}

.input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.input-group select,
.input-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.input-group select:focus,
.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(83, 110, 254, 0.15);
}

/* 位置交換按鈕 */
.swap-btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.swap-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: background var(--transition-speed), color var(--transition-speed), transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.swap-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(180deg) scale(1.08);
    box-shadow: 0 6px 15px rgba(83, 110, 254, 0.3);
}

.search-submit-btn {
    background: var(--primary-color);
    color: var(--primary-text);
    border: 1px solid rgba(46, 44, 37, 0.1);
    padding: 1.1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s, background var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(140, 122, 107, 0.2);
}

.search-submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(140, 122, 107, 0.35);
}

/* 搜尋按鈕與外部跳轉整合區 */
.search-actions-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    margin-top: 1rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 1.5rem;
}

.external-search-shortcut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.shortcut-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-quick-external {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition-speed);
}

.btn-quick-external:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* ==========================================
   搜尋結果區
   ========================================== */
.results-section {
    padding: 4rem 5%;
    max-width: 1000px;
    margin: 0 auto;
    transition: opacity 0.5s ease-in-out;
}

.results-section.hidden {
    display: none;
    opacity: 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.results-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
}

.results-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-muted);
    font-weight: 600;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: var(--primary-text);
    border-color: var(--primary-color);
}

.direct-filter {
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.direct-filter input {
    margin-right: 0.4rem;
    cursor: pointer;
}

/* 載入動畫 (Spinner) */
.loading-container {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 4rem 0;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 機票卡片 */
.flight-cards-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.flight-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    animation: fadeInUp 0.4s ease-out forwards;
}

.flight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--shadow-color);
}

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

.airline-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 25%;
}

.airline-logo-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.airline-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.airline-class {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.flight-duration-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 45%;
    justify-content: center;
}

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

.time-box .time {
    font-size: 1.4rem;
    font-weight: 800;
}

.time-box .airport {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.path-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.path-box .duration {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.path-line {
    width: 100%;
    height: 2px;
    background: var(--border-color);
    position: relative;
}

.path-line::after {
    content: '\f072';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    color: var(--primary-color);
    background: var(--bg-color);
    padding: 0 8px;
    font-size: 0.85rem;
}

.path-box .stops {
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.stops.direct {
    color: #10b981; /* 綠色 */
}

.stops.transit {
    color: #f59e0b; /* 橘色 */
}

.price-booking {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    width: 25%;
}

.card-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.card-badge.cheapest {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.card-badge.fastest {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.card-badge.recommended {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.price-booking .price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
}

.booking-btn {
    background: var(--primary-color);
    color: var(--primary-text);
    border: none;
    padding: 0.6rem 1.25rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition-speed), transform 0.2s;
}

.booking-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

/* 外部搜尋跳轉提示 */
.external-search-tip {
    background: var(--card-bg);
    border: 1px dashed var(--primary-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.external-search-tip p {
    font-weight: 600;
    margin-bottom: 1rem;
}

.external-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-external {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-speed);
}

.btn-external:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* ==========================================
   特惠航線推薦區
   ========================================== */
.hot-deals-section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.deal-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow-color);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    position: relative;
    display: flex;
    flex-direction: column;
}

.deal-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px var(--shadow-color);
}

.deal-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary-color);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(255, 64, 129, 0.35);
}

/* 使用精美漸層替代真實圖片以符合鐵律 */
.deal-image-placeholder {
    height: 180px;
    background: linear-gradient(135deg, #3f51b5 0%, #536dfe 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    gap: 0.75rem;
}

.deal-card:nth-child(2) .deal-image-placeholder {
    background: linear-gradient(135deg, #7e57c2 0%, #b388ff 100%);
}

.deal-card:nth-child(3) .deal-image-placeholder {
    background: linear-gradient(135deg, #ff4081 0%, #ff80ab 100%);
}

.deal-card:nth-child(4) .deal-image-placeholder {
    background: linear-gradient(135deg, #ff9100 0%, #ffab40 100%);
}

.deal-image-placeholder i {
    font-size: 3rem;
    opacity: 0.9;
}

.deal-image-placeholder h3 {
    font-size: 1.5rem;
    font-weight: 800;
}

.deal-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.deal-info .route {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.deal-info .date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.25rem;
}

.price-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.price-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
}

.deal-search-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-speed);
}

.deal-search-btn:hover {
    background: var(--primary-hover);
}

/* ==========================================
   為什麼選擇我們區
   ========================================== */
.why-us-section {
    padding: 5rem 5%;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
    padding: 2rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: transform var(--transition-speed);
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.feature-item h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

}

/* ==========================================
   LINE 降價推播訂閱專區
   ========================================== */
.line-subscribe-section {
    padding: 6rem 5%;
    background: linear-gradient(135deg, rgba(6, 199, 85, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.line-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.line-badge {
    background: #06c755;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    width: fit-content;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 10px rgba(6, 199, 85, 0.3);
}

.line-content {
    flex: 1;
}

.line-content h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    color: var(--text-color);
}

.line-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.line-features {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 2.5rem;
}

.line-feat-item {
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.line-feat-item i {
    color: #06c755;
    font-size: 1.1rem;
}

.btn-line-primary {
    background: #06c755;
    color: white;
    border: none;
    padding: 1.1rem 2.2rem;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 6px 20px rgba(6, 199, 85, 0.35);
    transition: transform 0.2s, background var(--transition-speed), box-shadow var(--transition-speed);
}

.btn-line-primary:hover {
    background: #05b04b;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 199, 85, 0.5);
}

.line-actions {
    display: flex;
    gap: 1rem;
}

.btn-line-friend {
    background: var(--bg-color);
    color: #06c755;
    border: 2px solid #06c755;
    padding: 1.1rem 2.2rem;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: transform 0.2s, background var(--transition-speed), color var(--transition-speed), border-color var(--transition-speed);
}

.btn-line-friend:hover {
    background: #06c755;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 199, 85, 0.25);
}

.success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1rem;
}

.btn-line-friend-large {
    background: #06c755;
    color: white !important;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(6, 199, 85, 0.25);
    transition: background 0.2s, transform 0.2s;
}

.btn-line-friend-large:hover {
    background: #05b04b;
    transform: translateY(-2px);
}

/* 模擬手機對話畫面 (非常精緻的視覺亮點) */
.line-mock-phone {
    width: 300px;
    height: 480px;
    background: #121212;
    border: 10px solid #1f2937;
    border-radius: 40px;
    box-shadow: 0 20px 45px var(--shadow-color);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    transition: transform var(--transition-speed);
}

.line-mock-phone:hover {
    transform: translateY(-5px) rotate(1deg);
}

/* 加上動態島 */
.line-mock-phone::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 16px;
    background: #000;
    border-radius: 20px;
    z-index: 10;
}

/* 加上手機底部 Home Indicator 線條 */
.line-mock-phone::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #8b9bb4; /* LINE 經典聊天背景藍灰色 */
    display: flex;
    flex-direction: column;
}

.phone-header {
    background: #2b303b;
    color: white;
    padding: 0.85rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phone-header i {
    color: #06c755;
    font-size: 1.1rem;
}

.phone-chat-area {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.chat-time {
    align-self: center;
    background: rgba(0, 0, 0, 0.15);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
}

.chat-bubble {
    align-self: flex-start;
    background: white;
    border-radius: 16px;
    padding: 0.85rem 1rem;
    max-width: 85%;
    font-size: 0.8rem;
    color: #1f1f1f;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.chat-bubble::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -8px;
    border-width: 6px 8px 6px 0;
    border-style: solid;
    border-color: transparent white transparent transparent;
}

.chat-bubble p {
    margin-bottom: 0.4rem;
}

.chat-bubble p:last-child {
    margin-bottom: 0;
}

.price-highlight {
    color: var(--secondary-color);
    font-weight: 800;
    font-size: 0.95rem;
}

.chat-btn {
    display: block;
    text-align: center;
    background: #06c755;
    color: white !important;
    font-weight: 700;
    padding: 0.4rem;
    border-radius: 6px;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.chat-btn:hover {
    background: #05b04b;
}

/* ==========================================
   LINE 訂閱彈窗 (Modal)
   ========================================== */
.line-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity var(--transition-speed);
}

.line-modal-backdrop.hidden {
    display: none !important;
}

.line-modal-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    width: 90%;
    max-width: 460px;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: zoomIn 0.3s ease-out forwards;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.line-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.line-modal-close:hover {
    color: var(--text-color);
}

.line-modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.line-icon-large {
    font-size: 3.5rem;
    color: #06c755;
    margin-bottom: 0.75rem;
}

.line-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.line-modal-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.line-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.line-form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.line-form-group select {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.95rem;
    outline: none;
}

.line-form-group-checkbox {
    margin-bottom: 1.5rem;
}

.line-form-group-checkbox label {
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.line-form-group-checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-tip {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    padding-left: 1.4rem;
}

.line-step-info {
    background: rgba(6, 199, 85, 0.05);
    border: 1px solid rgba(6, 199, 85, 0.15);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.line-step-info .step-title {
    font-weight: 700;
    color: #06c755;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.line-step-info ol {
    padding-left: 1.2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.btn-line-submit {
    width: 100%;
    background: #06c755;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(6, 199, 85, 0.25);
    transition: background 0.2s;
}

.btn-line-submit:hover {
    background: #05b04b;
}

/* 訂閱成功頁面 */
.line-success-state {
    text-align: center;
    padding: 1rem 0;
    animation: fadeIn 0.3s ease-out forwards;
}

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

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
    animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes scaleUp {
    from { transform: scale(0.5); }
    to { transform: scale(1); }
}

.line-success-state h4 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.line-success-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.success-tip {
    font-size: 0.8rem !important;
    background: var(--border-color);
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid #06c755;
    text-align: left;
}

.btn-success-close {
    background: var(--primary-color);
    color: var(--primary-text);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-success-close:hover {
    background: var(--primary-hover);
}

/* ==========================================
   頁尾
   ========================================== */
footer {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 5%;
    text-align: center;
}

.footer-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* ==========================================
   實時航班看板區
   ========================================== */
.flight-board-section {
    padding: 6rem 5%;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

.board-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5rem;
}

.board-image-box {
    flex: 1;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow-color);
    border: 1px solid var(--card-border);
    transition: transform var(--transition-speed);
}

.board-image-box:hover {
    transform: translateY(-5px);
}

.board-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.board-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(37, 99, 235, 0.1), rgba(15, 23, 42, 0.3));
    pointer-events: none;
}

.board-info-content {
    flex: 1.2;
}

.board-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    width: fit-content;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.board-info-content h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    color: var(--text-color);
}

.board-info-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.board-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.board-feat-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.board-feat-item .feat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.board-feat-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.board-feat-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* ==========================================
   響應式設計 (RWD) 調整
   ========================================== */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    header nav ul {
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .search-panel {
        padding: 1.5rem;
    }
    
    .form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .swap-btn-container {
        transform: rotate(90deg);
        margin: 0.25rem 0;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .flight-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    
    .airline-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .flight-duration-info {
        width: 100%;
    }
    
    .price-booking {
        width: 100%;
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
        border-top: 1px dashed var(--border-color);
        padding-top: 1rem;
    }
    
    .external-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .external-search-shortcut {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }
    
    .shortcut-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-quick-external {
        justify-content: center;
    }

    .line-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .line-container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .line-badge {
        margin: 0 auto 1.5rem;
    }
    
    .line-feat-item {
        justify-content: center;
    }
    
    .btn-line-primary {
        justify-content: center;
        margin: 0 auto;
    }
    
    .line-mock-phone {
        margin: 0 auto;
    }
    
    .line-modal-card {
        padding: 1.5rem;
    }

    /* 實時航班看板區 RWD */
    .board-container {
        flex-direction: column-reverse;
        gap: 3rem;
        text-align: center;
    }
    
    .board-tag {
        margin: 0 auto 1.5rem;
    }
    
    .board-feat-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
