/* 新的 style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8; /* 更淺的背景色 */
    color: #333;
}

body {
    text-align: center;
    padding-top: 50px; /* 稍微調整 header 的空間 */
    padding-bottom: 30px;
    line-height: 1.5; /* 更緊湊的行高 */
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 50px; /* 縮小 header 高度 */
    background-color: #3498db; /* 現代感的藍色 */
    color: white;
    text-align: center;
    line-height: 50px;
    font-size: 1.5rem; /* 稍微縮小標題字體 */
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

main {
    width: 100%;
    max-width: 700px; /* 稍微縮小最大寬度 */
    min-height: calc(100vh - 80px); /* 配合 header 和 footer 的高度調整 */
    margin: 0 auto;
    padding: 20px; /* 縮小 main 的 padding */
    background: white;
    border-radius: 6px; /* 稍微調整圓角 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 表單樣式優化 */
form {
    display: flex;
    align-items: center;
    margin-bottom: 15px; /* 縮小表單間距 */
}

input[type="hidden"] {
    display: none;
}

input[type="text"] {
    padding: 10px; /* 縮小 padding */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    flex-grow: 1;
    margin-right: 8px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 3px rgba(52, 152, 219, 0.3);
}

input[type="submit"] {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 1em; /* 縮小 padding */
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
    background-color: #2980b9;
}

.result-container {
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f0f0; /* 更淺的結果容器背景 */
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.result-container h1 {
    font-size: 1.0rem; /* 縮小標題字體 */
    margin-bottom: 10px;
    color: #555;
}

.result-container h2 {
    font-size: 1.0rem; /* 縮小標題字體 */
    margin-bottom: 10px;
    color: #555;
}

.sthelse-container {
    font-size: 1.0rem;
    margin-top: 20px;
    margin-bottom: 50px;
    padding: 15px;
    background: #c0c0c069; /* 更淺的結果容器背景 */
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: left;
}
.sthelse-container p a{
    font-size: 1.2rem;
    color: #fff; 
    background-color: #ff00a8; 
    text-decoration: none; 
}


.result-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item strong {
    color: #2c3e50; /* 更深的文字顏色 */
    font-weight: bold;
    margin-right: 5px;
}

.result-item a {
    color: #3498db; /* 強調連結顏色 */
    text-decoration: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: inline-block;
    max-width: 100%;
    transition: color 0.3s ease;
    font-weight: bold; /* 強調連結 */
}

.result-item a:hover {
    text-decoration: underline;
    color: #2980b9;
}



.title-details {

    color: #777;
    font-size: 1.1rem;
}

.title-details p {
    margin-bottom: 6px;
}

.title-details strong {
    color: #555;
    font-weight: bold;
    margin-right: 5px;
}

.title-details p a {
    color: #007bff; /* 設定預設的連結顏色為藍色 */
    text-decoration: none; /* 移除預設的底線 */
    font-weight: normal; /* 預設不加粗 */
    transition: color 0.3s ease, background-color 0.3s ease; /* 添加顏色和背景顏色變換的動畫效果 */
    padding: 2px 5px; /* 增加一些內邊距，使其更容易點擊 */
    border-radius: 3px; /* 添加一點圓角 */
    background-color: transparent; /* 預設背景透明 */
}

.title-details p a:hover {
    color: #fff; /* 滑鼠懸停時，文字顏色變為白色 */
    background-color: #007bff; /* 滑鼠懸停時，背景顏色變為藍色 */
    text-decoration: none; /* 保持無底線 */
}

p a.formatted_synopsis{
    color: #fff;
    background-color: #007bff; 
    text-decoration: none; 
}

.title-details p strong + a, /* 針對 "演員：" 後面的第一個連結 */
.title-details p a:first-child { /* 如果演員是段落中的第一個連結 */
    font-weight: bold; /* 稍微加粗，以區別於其他連結（如果有的話） */
}

.title-list {
    list-style: none; /* 移除列表的項目符號 */
    padding: 0; /* 移除列表預設的內邊距 */
    margin: 0; /* 移除列表預設的外邊距 */
}

.title-list li {
    margin-bottom: 8px; /* 設定每個列表項之間的垂直間距 */
    padding: 8px; /* 設定列表項的內邊距 */
    border-radius: 5px; /* 設定列表項的圓角 */
    background-color: #f9f9f9; /* 設定列表項的背景顏色 */
    border: 1px solid #eee; /* 設定列表項的邊框 */
}

.title-list li a {
    text-decoration: none; /* 移除連結的底線 */
    color: #007bff; /* 設定連結的顏色 */
    transition: color 0.3s ease; /* 添加顏色變換的動畫效果 */
    display: block; /* 使連結填滿整個 li 區域，方便點擊 */
}

.title-list li a:hover {
    color: #0056b3; /* 設定滑鼠懸停時連結的顏色 */
    background-color: #eee; /* 設定滑鼠懸停時列表項的背景顏色 */
}

footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 60px; /* 縮小 footer 高度 */
    background: #343a40;
    color: white;
    text-align: center;
    line-height: 30px;
    font-size: 0.8rem; /* 縮小 footer 字體 */
    z-index: 1000;
}

footer a.shplink{
    font-size: 1.3rem;
    color: #fff; 
    background-color: #ff00a8; 
    text-decoration: none;
}

/* 響應式設計調整 (即使你說沒有特別想法，還是保留基本的調整以應對小螢幕) */
@media (max-width: 600px) {
    main {
        padding: 15px;
        border-radius: 0;
        box-shadow: none;
    }

    /* 修改這裡 */
    form {
        display: flex; /* 讓表單元素水平排列 */
        align-items: center; /* 垂直置中對齊 */
        flex-direction: row; /* 強制設定為水平方向 */
        margin-bottom: 15px; /* 保留間距 */
    }

    input[type="text"] {
        flex-grow: 1; /* 輸入框彈性擴展，佔據剩餘空間 */
        margin-right: 10px; /* 輸入框和按鈕之間的間距 */
        margin-bottom: 0; /* 移除原本的底部間距 */
    }

    input[type="submit"] {
        width: auto; /* 讓按鈕根據內容自動調整寬度 */
    }

}

   
    /* ======= 篩選器表單樣式調整 START ======= */
.filter-form {
    display: flex;             /* 使用 Flexbox 布局 */
    flex-wrap: wrap;           /* 允許項目換行 */
    gap: 15px;                 /* 項目之間的間距 */
    align-items: center;       /* 垂直居中對齊項目 */
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px; /* 標籤和選單之間的間距 */
}

.filter-form label {
    font-weight: bold;
    color: #333;
    font-size: 1.1em;
}

.filter-form select {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    min-width: 150px; /* 設置最小寬度 */
    background-color: #fff;
    cursor: pointer;
    -webkit-appearance: none; /* 移除瀏覽器預設樣式 */
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2C185.1L146.2%2C32.7c-2.4-2.4-5.2-3.7-8.1-3.7s-5.8%2C1.3-8.1%2C3.7l-140.8%2C152.4c-4.7%2C4.7-4.7%2C12.3%2C0%2C17c2.4%2C2.4%2C5.2%2C3.7%2C8.1%2C3.7c2.9%2C0%2C5.7-1.3%2C8.1-3.7l132.7-143.9l132.7%2C143.9c2.4%2C2.4%2C5.2%2C3.7%2C8.1%2C3.7c2.9%2C0%2C5.7-1.3%2C8.1-3.7C291.7%2C197.4%2C291.7%2C189.8%2C287%2C185.1z%22%2F%3E%3C%2Fsvg%3E'); /* 自定義下拉箭頭 */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 30px; /* 留出箭頭空間 */
}

.filter-form select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.filter-form button[type="submit"] {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.05em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-form button[type="submit"]:hover {
    background-color: #0056b3;
}

/* 針對較小的螢幕 (平板和手機) 進行調整，使其呈現垂直堆疊 */
@media (max-width: 768px) {
    .filter-form {
        flex-direction: column; /* 垂直堆疊 */
        align-items: flex-start; /* 左對齊 */
    }
    .filter-group {
        width: 100%; /* 每個篩選組佔滿寬度 */
        justify-content: space-between; /* 標籤和選單分散對齊 */
    }
    .filter-form select {
        width: calc(100% - 70px); /* 讓選單佔據可用寬度 */
    }
    .filter-form button[type="submit"] {
        width: 100%;
        margin-top: 10px;
    }
}
/* ======= 篩選器表單樣式調整 END ======= */
