/* 植感程式美學 (Botanical Programming Aesthetics) */
:root {
    --sage-green: #90A583;    /* 自然綠主色調 */
    --sage-light: #E8EDE4;    /* 淺色背景底色 */
    --sage-dark: #6C825D;     /* 深綠色，用於強調與文字 */
    --tech-white: #FAFAFA;    /* 科技白背景 */
    --text-main: #2C3E20;     /* 主要文字顏色 */
    --text-muted: #556B48;    /* 次要文字顏色 */
    --white: #FFFFFF;         /* 純白卡片顏色 */
}

/* 考量 83 歲長輩閱讀，使用大字體與易讀的行距 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--tech-white);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    padding-bottom: 90px; /* 確保內容不會被底部工具列擋住 */
    font-size: 20px; 
    line-height: 1.6;
}

header {
    background-color: var(--sage-green);
    color: var(--white);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

h1 {
    margin: 0 0 1rem 0;
    font-size: 2.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.search-container input {
    width: 90%;
    max-width: 600px;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    border: 2px solid var(--sage-light);
    border-radius: 30px;
    outline: none;
    transition: all 0.3s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.search-container input:focus {
    border-color: var(--sage-dark);
    box-shadow: 0 0 10px rgba(108, 130, 93, 0.4);
}

main {
    padding: 2.5rem 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.poi-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* 卡片設計：圓角、輕微陰影 */
.poi-card {
    background-color: var(--white);
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: 0 4px 15px rgba(108, 130, 93, 0.15);
    border-left: 8px solid var(--sage-green);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.poi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 130, 93, 0.25);
}

.poi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.poi-name {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    color: var(--sage-dark);
}

.toggle-icon {
    color: var(--sage-green);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.poi-card.expanded .toggle-icon {
    transform: rotate(180deg);
}

.poi-address {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-top: 0.8rem;
    display: inline-block;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.poi-address:hover {
    color: var(--sage-dark);
    font-weight: bold;
}

/* 避暑備案區塊 (預設隱藏) */
.backups-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--sage-green);
    display: none;
}

.poi-card.expanded .backups-section {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

.backup-item {
    background-color: var(--sage-light);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    border-left: 4px solid var(--sage-dark);
}

.backup-item:last-child {
    margin-bottom: 0;
}

.backup-title {
    font-weight: bold;
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: var(--sage-dark);
}

.backup-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.backup-name {
    font-size: 1.3rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: var(--text-main);
    flex: 1;
}

.backup-name:hover {
    color: var(--sage-dark);
    font-weight: bold;
}

.badge-container {
    display: flex;
    gap: 8px;
}

.badge {
    background-color: var(--sage-green);
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 1.1rem;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ======== 分頁按鈕樣式 ======== */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--sage-light);
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-size: 1.3rem;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.tab-btn.active, .tab-btn:hover {
    background-color: var(--white);
    color: var(--sage-green);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 顯示特定內容的 class */
.active-view {
    display: flex !important;
}

.itinerary-container {
    display: none; /* 預設隱藏，由 active-view 覆蓋 */
    flex-direction: column;
    gap: 1.5rem;
}

.poi-container {
    display: none; /* 預設隱藏，由 active-view 覆蓋 */
    flex-direction: column;
    gap: 1.5rem;
}

/* ======== 行程表卡片樣式 ======== */
.itinerary-card {
    background-color: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(108, 130, 93, 0.15);
    border-top: 8px solid var(--sage-dark);
}

.day-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--sage-dark);
    border-bottom: 2px solid var(--sage-light);
    padding-bottom: 0.8rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.time-slot {
    margin-bottom: 1.5rem;
}

.time-label {
    font-weight: bold;
    color: var(--text-main);
    background-color: var(--sage-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.time-content {
    padding-left: 0.8rem;
    color: var(--text-muted);
    font-size: 1.3rem;
}

/* 提示與重點區塊 */
.alert-info {
    font-size: 1.2rem;
    background-color: var(--sage-light);
    color: var(--sage-dark);
    padding: 1.2rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    border-left: 6px solid var(--sage-green);
}

.alert-warning {
    font-size: 1.2rem;
    background-color: #FFF3CD;
    color: #856404;
    padding: 1.2rem;
    border-radius: 12px;
    margin-top: 1rem;
    border-left: 6px solid #FFEEBA;
}

/* ======== 求生工具列 ======== */
.survival-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 0.8rem 0;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
}

.tool-btn {
    background-color: transparent;
    border: none;
    font-size: 1.1rem;
    color: var(--sage-dark);
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-family: inherit;
}

.tool-btn:hover {
    color: var(--sage-green);
}

/* ======== 彈出小視窗 (Modal) ======== */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background-color: var(--tech-white);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    width: 85%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0,0,0,0.25);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--sage-dark);
}

.exchange-calc input {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--sage-light);
    border-radius: 12px;
    box-sizing: border-box;
    outline: none;
}

.exchange-calc input:focus {
    border-color: var(--sage-dark);
}

.calc-result {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--sage-dark);
    margin-bottom: 1rem;
}

.alipay-guide p {
    font-size: 1.3rem;
    border-bottom: 1px solid var(--sage-light);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.alipay-guide p:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* ======== App 指南樣式 ======== */
.app-category {
    margin-bottom: 1.5rem;
    border-bottom: 2px dashed var(--sage-light);
    padding-bottom: 1.5rem;
}

.app-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.app-category h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--sage-dark);
    font-size: 1.7rem;
}

.app-item {
    background-color: var(--tech-white);
    padding: 1.2rem;
    border-radius: 12px;
    border-left: 6px solid var(--sage-green);
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.app-item:hover {
    background-color: var(--sage-light);
}

.app-header {
    font-weight: bold;
    font-size: 1.4rem;
    color: var(--sage-dark);
}

.app-badge {
    display: inline-block;
    background-color: var(--sage-green);
    color: var(--white);
    font-size: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    margin-top: 0.8rem;
}

.app-tutorial {
    display: none;
    font-size: 1.2rem;
    color: var(--text-main);
    background-color: var(--white);
    padding: 1.2rem;
    border-radius: 10px;
    margin-top: 1rem;
    margin-bottom: 0;
    border: 1px solid var(--sage-light);
    line-height: 1.6;
}

.step-list {
    margin: 0;
    padding-left: 1.8rem;
}

.step-list li {
    margin-bottom: 0.8rem;
}

.step-list li:last-child {
    margin-bottom: 0;
}

.step-title {
    font-weight: bold;
    color: var(--sage-dark);
}

.app-tutorial strong {
    color: #1A2514; /* 對比極高的極深綠 */
    background-color: rgba(144, 165, 131, 0.2);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.app-item.expanded .app-tutorial {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* ======== 住宿建議樣式 ======== */
.accommodation-container {
    display: none;
    padding-bottom: 2rem;
}

.accommodation-container.active-view {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

.hotel-card {
    background-color: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border-left: 8px solid var(--sage-dark);
}

.hotel-name {
    font-size: 1.6rem;
    color: var(--sage-dark);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.hotel-location {
    display: inline-block;
    background-color: var(--sage-light);
    color: var(--sage-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hotel-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.hotel-props {
    margin-top: 1rem;
    background-color: var(--tech-white);
    padding: 1.2rem;
    border-radius: 10px;
    line-height: 1.6;
}

.hotel-props p {
    margin: 0.8rem 0;
    font-size: 1.2rem;
}

.hotel-price {
    font-weight: bold;
    color: #D98A72;
    font-size: 1.3rem;
    margin-top: 1rem;
    text-align: right;
}

.hotel-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    border-top: 1px dashed var(--sage-light);
    padding-top: 1.2rem;
}

.hotel-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--sage-light);
    color: var(--sage-dark);
    border: none;
    padding: 0.8rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin: 0 0.5rem;
    transition: background-color 0.2s, transform 0.1s;
    font-family: inherit;
}

.hotel-action-btn:hover {
    background-color: var(--sage-green);
    color: var(--white);
}

.hotel-action-btn:active {
    transform: scale(0.98);
}

.btn-line {
    background-color: #06C755;
    color: white;
}

.btn-line:hover {
    background-color: #04A646;
}

.highlight-hotel {
    font-size: 1.2em; /* 字體加大20% */
    font-weight: bold;
    color: var(--sage-dark); /* 植感美學深綠色 */
}

/* 切換行程卡片的微小動畫 */
.fade-in-card {
    animation: fadeIn 0.4s ease-in-out;
}

/* 備案 B 特殊視覺樣式 */
.plan-b-card {
    border-left: 8px solid #B48EAD !important; /* 紫色邊框與主色區隔 */
    background-color: #FEFAFD !important;
}

.plan-b-card .alert-warning {
    background-color: #F8EDF5;
    color: #8C6A88;
    border-left-color: #B48EAD;
}

/* 驚喜點發光與貼紙特效 */
.surprise-glow {
    border: 1px solid #E6C27A;
    animation: glow-pulse 3s infinite alternate ease-in-out;
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 5px rgba(255, 223, 0, 0.2);
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 223, 0, 0.6);
    }
}

.surprise-sticker {
    display: inline-block;
    background: linear-gradient(135deg, #FFD54F, #FFCA28);
    color: #5D4037;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 1.15rem;
    transform: rotate(-2deg);
    box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
    margin-bottom: 0.8rem;
    border: 1px dashed #FFF;
}
