body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5em;
}

main {
    padding: 20px;
    max-width: 900px; /* 調整最大寬度 */
    margin: 20px auto;
    background-color: #f4f7f6; /* 將背景色移到 main */
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

#itinerary-container {
    flex: 2; /* 行程佔2份寬度 */
    padding-right: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
}


.day-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out;
    position: relative; /* 添加相對定位 */
}

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

.day-card h2 {
    color: #34495e;
    margin-top: 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.day-card h3 {
    color: #2980b9;
    font-size: 1.4em;
    margin-top: 15px;
    margin-bottom: 10px;
}

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

.day-card ul li {
    background-color: #f9f9f9;
    border-left: 4px solid #5dade2;
    margin-bottom: 8px;
    padding: 10px 15px;
    border-radius: 4px;
    display: flex;
    align-items: flex-start; /* 調整對齊方式 */
    flex-wrap: wrap; /* 允許內容換行 */
    position: relative; /* For absolute positioning of map link */
}

.activity-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.map-link-wrapper {
    margin-left: auto; /* 將 MAP 連結推到最右邊 */
}

.activity-link-group {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* .day-map-link-container is removed as map is now separate */

.day-map-link-container {
    position: absolute; /* 絕對定位 */
    top: 20px; /* 距離頂部 */
    right: 20px; /* 距離右側 */
    font-size: 0.9em;
}

.day-map-link-container a {
    color: #007bff;
    text-decoration: none;
}

.day-map-link-container a:hover {
    text-decoration: underline;
}

.activity-note {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    margin-left: 70px; /* 調整縮排以對齊時間 */
}

.split-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 20px;
    border-top: 1px dashed #ccc;
    padding-top: 20px;
}

.split-group {
    flex: 1;
    padding: 0 10px;
}

.split-group h4 {
    color: #34495e;
    border-bottom: 1px solid #3498db;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.activity-options-list {
    list-style: disc;
    margin-left: 20px;
    margin-top: 5px;
}

.activity-options-list li {
    background-color: #f0f0f0;
    border-left: 2px solid #aed6f1;
    padding: 5px 10px;
    margin-bottom: 5px;
    display: flex; /* Add flexbox to the list item */
    justify-content: space-between; /* Distribute space between items */
    align-items: center; /* Vertically align items */
}

.option-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Ensure it takes full width */
}

.option-name {
    flex-grow: 1; /* Allow name to take available space */
    margin-right: 10px; /* Add some space between name and map link */
}

.option-map-link {
    flex-shrink: 0; /* Prevent map link from shrinking */
}

.day-card ul li strong {
    color: #2c3e50;
    margin-right: 10px;
    min-width: 60px;
}

.day-card ul li span {
    flex-grow: 1;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    background-color: #2c3e50;
    color: #ecf0f1;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}