﻿/* ========================================
   Vibrant Gradient Theme - Search Page
   search.css
   ======================================== */

.tp4-search-page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 12px 24px;
}

/* Search header */
.tp4-search-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--tp4-bg-primary);
}

.tp4-top-back-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.tp4-bk-back-icon {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

.tp4-search-input-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--tp4-border);
    border-radius: 24px;
    padding: 0 12px;
    transition: var(--tp4-transition);
}

.tp4-search-input-box:focus-within {
    border-color: var(--tp4-accent-alt);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.tp4-search-page-main .tp4-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--tp4-text-primary);
    font-size: 14px;
    padding: 10px 0;
}

.tp4-search-page-main .tp4-search-input::placeholder {
    color: var(--tp4-text-muted);
}

.tp4-mobile-clear-icon {
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
}

.tp4-mobile-clear-icon img {
    width: 16px;
    height: 16px;
    filter: invert(0.7);
}

.tp4-search-page-main .tp4-search-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--tp4-transition);
}

.tp4-search-page-main .tp4-search-icon:hover {
    opacity: 1;
}

.tp4-cancel-btn {
    font-size: 14px;
    color: var(--tp4-accent);
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    padding: 8px 4px;
}

/* Grid boxes */
.tp4-grid-box {
    margin: 8px 0;
}

.tp4-pc-grid-box {
    display: none;
}

@media screen and (min-width: 825px) {
    .tp4-grid-box {
        display: none;
    }
    .tp4-pc-grid-box {
        display: block;
        margin: 8px 0;
    }
    .tp4-search-header {
        background: transparent;
        position: relative;
    }
}

/* PC header */
.tp4-pc-header {
    padding: 20px 0;
    text-align: center;
}

.tp4-pc-header h1 {
    font-size: 22px;
    font-weight: 800;
    background: var(--tp4-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Rank section */
.tp4-search-main {
    margin: 0;
}

.tp4-rank-box {
    margin-bottom: 16px;
}

.tp4-rank-list {
    display: none;
}

.tp4-rank-list.activeList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tp4-rank-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--tp4-bg-card);
    border: 1px solid var(--tp4-border);
    border-radius: var(--tp4-radius);
    padding: 10px;
    text-decoration: none;
    transition: var(--tp4-transition);
}

.tp4-rank-item:hover {
    background: var(--tp4-bg-card-hover);
    border-color: var(--tp4-border-hover);
    transform: translateX(4px);
}

.tp4-video-cover {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--tp4-radius-sm);
    flex-shrink: 0;
}

.tp4-rank-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

.tp4-rank-num.top0 { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.tp4-rank-num.top1 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.tp4-rank-num.top2 { background: linear-gradient(135deg, #667eea, #764ba2); }

.tp4-info-box {
    flex: 1;
    min-width: 0;
}

.tp4-work-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--tp4-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.tp4-tag-list {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.tp4-tag-list .tp4-tag-item {
    font-size: 11px;
    color: var(--tp4-accent);
    background: rgba(240, 147, 251, 0.1);
    padding: 1px 8px;
    border-radius: 10px;
    border: 1px solid rgba(240, 147, 251, 0.15);
}

.tp4-hot-box {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tp4-fire-icon {
    width: 14px;
    height: 14px;
}

.tp4-hot-value {
    font-size: 12px;
    color: var(--tp4-accent);
    font-weight: 600;
}

/* Date tab items */
.tp4-date-item {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    color: var(--tp4-text-secondary);
    background: var(--tp4-bg-card);
    border: 1px solid var(--tp4-border);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--tp4-transition);
}

.tp4-date-item.active {
    background: var(--tp4-gradient-primary);
    color: #fff;
    border-color: transparent;
}

/* Tab items for search */
.tp4-tab-item {
    font-size: 14px;
    color: var(--tp4-text-secondary);
    cursor: pointer;
    padding: 8px 16px;
    border-bottom: 2px solid transparent;
    transition: var(--tp4-transition);
}

.tp4-tab-item.tabActive {
    color: var(--tp4-text-primary);
    border-bottom-color: var(--tp4-accent-alt);
}

@media screen and (max-width: 824px) {
    .tp4-video-cover {
        width: 80px;
        height: 50px;
    }

    .tp4-rank-item {
        padding: 8px;
    }
}
