/* 重置和基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 導航欄 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.nav-logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #667eea;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 英雄區域 */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stat i {
    font-size: 2rem;
    color: #ffd700;
}

.hero-image {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.floating-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    color: #333;
    animation: float 3s ease-in-out infinite;
}

.floating-card h3 {
    margin-bottom: 20px;
    color: #667eea;
}

.progress-bar {
    width: 200px;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* 區段樣式 */
.section {
    padding: 80px 0;
    background: white;
}

.section:nth-child(even) {
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* 預約比價 */
.booking-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.booking-controls .fx-rate label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.booking-controls .fx-rate input {
    width: 140px;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
}

.booking-actions {
    display: flex;
    gap: 10px;
}

.booking-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.booking-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 18px;
    border: 1px solid #f0f0f0;
}

.booking-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

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

.booking-providers {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.provider-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 10px;
    align-items: center;
}

.provider-row .provider-name {
    font-weight: 700;
    color: #333;
}

.provider-row .price-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.provider-row input[type="number"] {
    width: 120px;
    padding: 8px 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.provider-row .open-link {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
    cursor: pointer;
}

.best-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    background: #27ae60;
    color: white;
    font-size: 12px;
    font-weight: 700;
    margin-left: 6px;
}

.twd-hint {
    color: #27ae60;
    font-weight: 700;
}

.provider-footer {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.provider-footer .btn-secondary {
    color: #667eea;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
}

@media (max-width: 768px) {
    .provider-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

/* 概覽卡片 */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.overview-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-10px);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
}

.overview-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.overview-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status.pending {
    background: #fff3cd;
    color: #856404;
}

.status.completed {
    background: #d4edda;
    color: #155724;
}

/* 時間軸樣式 */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-date {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 2;
}

.timeline-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 0 40px;
    flex: 1;
    position: relative;
}

.timeline-content h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.schedule-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.time-slot {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    position: relative;
}

.time-slot:last-child {
    margin-bottom: 0;
}

.time-slot .time {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.time-slot .activity {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.time-slot .transport {
    background: #e3f2fd;
    color: #1976d2;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-left: auto;
    border: 1px solid #bbdefb;
}

.time-slot .note {
    background: #fff3e0;
    color: #f57c00;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-left: auto;
    border: 1px solid #ffcc02;
}

.time-slot .backup {
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-left: auto;
    border: 1px solid #ce93d8;
}

.time-slot .important {
    background: #ffebee;
    color: #d32f2f;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-left: auto;
    border: 1px solid #ef9a9a;
    animation: pulse 2s infinite;
}

.time-slot .price {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-left: auto;
    border: 1px solid #a5d6a7;
}

/* 實用提醒 */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.tip-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-5px);
}

.tip-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
    font-size: 1.5rem;
}

.tip-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.tip-card ul {
    list-style: none;
    padding: 0;
}

.tip-card ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #666;
    position: relative;
    padding-left: 20px;
}

.tip-card ul li:last-child {
    border-bottom: none;
}

.tip-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* 互動元素樣式 */
.detail-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    margin-left: 10px;
}

.detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.search-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

/* 模態框樣式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 30px;
}

/* 搜尋容器 */
.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-container input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #667eea;
}

.search-container button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

/* 搜尋結果 */
#searchResults {
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.search-result-item h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.search-result-item p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* 景點詳情樣式 */
.location-detail {
    margin-bottom: 20px;
}

.location-detail h3 {
    color: #667eea;
    margin-bottom: 10px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 5px;
}

.location-detail ul {
    list-style: none;
    padding: 0;
}

.location-detail ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #666;
}

.location-detail ul li:last-child {
    border-bottom: none;
}

.location-detail ul li strong {
    color: #333;
    font-weight: 600;
}

/* 動畫 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(211, 47, 47, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0);
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-date {
        position: absolute;
        left: 0;
        top: 0;
        transform: translateX(-50%);
        min-width: 100px;
        font-size: 0.9rem;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        margin-left: 60px;
    }

    .timeline-content {
        margin: 20px 0 0 0;
        width: 100%;
    }

    .time-slot {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .time-slot .time {
        align-self: flex-start;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .search-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline-content {
        padding: 20px;
    }

    .schedule-item {
        padding: 10px;
    }
}

/* --- Dark mode overrides (ensure no white sections) --- */
.dark-mode body {
    background: #0f172a !important;
    color: #e5e7eb;
}
.dark-mode .section {
    background: #0b1220 !important;
}
.dark-mode .section:nth-child(even) {
    background: #0d1526 !important;
}
.dark-mode .section-title {
    color: #e5e7eb;
}
.dark-mode .overview-card,
.dark-mode .tip-card,
.dark-mode .booking-card,
.dark-mode .timeline-content,
.dark-mode .modal-content {
    background: #111827 !important;
    color: #e5e7eb;
    border-color: #1f2937;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.dark-mode .overview-card h3,
.dark-mode .tip-card h3,
.dark-mode .timeline-content h3 {
    color: #e5e7eb;
    border-color: #1f2937;
}
.dark-mode .tip-card ul li {
    border-bottom-color: #1f2937;
    color: #cbd5e1;
}
.dark-mode .time-slot {
    background: #0f172a !important;
    border-left-color: #60a5fa !important;
}
.dark-mode .time-slot .activity {
    color: #e5e7eb;
}
.dark-mode .provider-row .provider-name {
    color: #e5e7eb;
}
