body {
    margin: 0;
    background-color: rgba(0, 0, 0, 0.05);
    color: white;
    font-family: sans-serif;
}
/* 搜尋框 */
.search-bar {
    display: flex;
    padding: 10px;
    margin: 4px;
    /* background-color: white; */
    align-items: center;
    border-radius: 12px;
    gap: 10px;
}

.search-left {
    flex: 1; /* 讓搜尋欄佔滿剩餘空間 */
}

.search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border-radius: 20px;
    font-size: 16px;
    box-sizing: border-box;
    border: none;
}
.search-right .search-cancel {
    font-size: 16px;
    color: gray;
    text-decoration: none;
    padding: 6px 12px;
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
}


.vod-grid {
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
    gap: 10px;
}
.vod-item {
    width: 31%;
    background-color: #001a40;
    border-radius: 4px;
    overflow: hidden;
    color: white;
    font-size: 12px;
}
.vod-item img {
    width: 100%;
    display: block;
}
.vod-title {
    padding: 5px;
    height: 38px;
    overflow: hidden;
}
.no-result {
    text-align: center;
    padding: 50px 20px;
}

#clearInput {
    position : absolute;
    right : 10px; 
    top : 50%; 
    transform : translateY(-50%); 
    cursor : pointer; 
    color : white; 
    font-size : 25px; 
    display : none;
}

form {
  position: relative;
  flex: 1;
}

.category-tabs {
  display: flex;
  padding: 10px;
  white-space: nowrap;
  
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

.category-tabs::-webkit-scrollbar {
  display: none; /* Chrome / Safari / Edge */
}

.category-tabs span {
    display: inline-block;
    color: #666666;
    white-space: nowrap;
    height: 28px;
    line-height: 20px;
    text-align: center;
    padding: 4px 8px; 
    font-size: 16px;
    font-weight: bold;
    box-sizing: border-box;
}

.category-tabs span.active {
    font-weight: 900;
    color: #FF8C00;
    background-color: rgba(255, 140, 0, 0.2);;
    border-radius: 20px;
}


.video-item {
    width: 120px;
    text-align: center;
}

.video-item img {
    width: 100%;
    border-radius: 4px;
    height: 160px; 
    object-fit: cover; 
}


.video-item p {
    margin-top: 5px;
    font-size: 14px;
    color: black;
    display: -webkit-box;        
    -webkit-box-orient: vertical; 
    -webkit-line-clamp: 1;       
    overflow: hidden;            
    text-overflow: ellipsis; 
    font-weight: bolder;
    text-align: left;
}

.hot-title {
    display: flex;
    align-items: center;
    font-size: 18px;
    color: black;
    margin: 10px;
    gap: 8px;
    font-weight: bold;
}

.yellow-bar {
    width: 4px;
    height: 16px;
    background-color: #facc15; 
    border-radius: 2px;
}

.hot-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 每行三個 */
    gap: 15px; /* 元素間距 */
    padding: 10px;
}

#video-list.grid-mode {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 10px;
    min-height: 60vh;
}

#video-list.no-data-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 10px;
    flex-direction: column;
}

.hot-list .video-item {
    text-align: center;
}

.hot-list .video-item img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.hot-list .video-item p {
    margin-top: 6px;
    font-size: 14px;
}


.no-data img {
    width: 150px;
    margin-bottom: 10px;
}

.no-data p {
    font-size: 16px;
}

/* 搜尋的歷史紀錄 */
#searchHistoryArea {
    padding: 10px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    margin-bottom: 10px;
}

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

.history-title {
    font-size: 16px;
    color: gray;
}

.history-clear {
    cursor: pointer;
    font-size: 14px;
    color:black;
}

/* .history-tag {
    display: inline-block;
    background-color: rgba(136, 132, 132, 0.15);
    padding: 5px 10px;
    border-radius: 15px;
    margin: 5px;
    font-size: 14px;
    color: gray;
} */

.history-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    background-color: rgba(136, 132, 132, 0.15);
    border-radius: 20px;
    margin: 5px;
    font-size: 14px;
    position: relative;
    color: gray;
}

.history-tag .delete-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-left: 6px;
    width: 16px;
    height: 16px;
    background-color: rgb(161, 160, 160);
    color: white;
    font-size: 14px;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
}


.clear_history_btn {
    color: gray;
}

.history-back {
    color: orange;
    font-size: 14px;
}

.video-title {
    color: #111111;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;         
    margin-top: 6px;
}

.video-subtitle {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;         
}

.highlight {
    color: #FF8C00;
    font-weight: bold;
}

#hot-recommend {
    margin-top: 20px;
}

.history-actions span {
    font-weight: normal;
}