/* Search Container */
.search_tap_time_container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    width: 100%;
}

/* Category Tab Navigation */
.popular-tab-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
    width: 100%;
    background: linear-gradient(145deg, #0f0f0f, #1a1a1a);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease-out;
}

.popular-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(145deg, #2a2a2a, #1f1f1f);
    color: #b0b0b0;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    justify-content: center;
}

.popular-tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.popular-tab-btn:hover::before {
    left: 100%;
}

.popular-tab-btn:hover {
    background: linear-gradient(145deg, #3a3a3a, #2f2f2f);
    color: #e0e0e0;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

.popular-tab-btn.active {
    background: linear-gradient(145deg, #ff8c00, #ff6b00);
    color: #ffffff;
    transform: translateY(-1px);
}

.popular-tab-btn.active:hover {
    background: linear-gradient(145deg, #ffa500, #ff7f00);
}

.popular-tab-btn i {
    font-size: 16px;
    opacity: 0.8;
}

.popular-tab-btn.active i {
    opacity: 1;
}

.popular-tab-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Time Period Filter */
.ranking-period-filter {
    display: flex;
    justify-content: center;
    padding: 0 16px;
    animation: fadeInUp 0.6s ease-out;
}

.period-filter-buttons {
    display: flex;
    gap: 8px;
    background: #0f0f0f;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.period-btn {
    padding: 10px 18px;
    background: transparent;
    color: #999;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 70px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.period-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff8c00, #ff6b00);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.period-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #d0d0d0;
}

.period-btn:hover::after {
    width: 80%;
}

.period-btn.active {
    background: linear-gradient(145deg, #ff8c00, #ff6b00);
    color: #ffffff;
    box-shadow: 
        0 2px 12px rgba(255, 140, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.period-btn.active::after {
    width: 0;
}

.period-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.period-btn i {
    font-size: 14px;
}

/* Search Results Title */
.search-results-title i {
    color: #ffd700;
    animation: pulse 2s infinite;
}

/* Loading Indicator */
.loading-indicator {
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #ff8c00;
    background: linear-gradient(145deg, #0f0f0f, #1a1a1a);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 140, 0, 0.3);
    border-top: 4px solid #ff8c00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-indicator p {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* Results Container - Ranking Items */
.search-result-item {
    position: relative;
}

.ranking-number {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
}

.rank-badge {
    display: inline-block;
    background: var(--primary-color);
    color: #000;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 0 15px 15px 0;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 140, 0, 0.8);
    min-width: 40px;
    text-align: center;
}

/* Time Section Headers */
.popular-time-header {
    color: var(--text-color);
    text-wrap: nowrap;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
}

.daily-section-header {
    border-left: 4px solid #ff4500;
    background: rgba(255, 69, 0, 0.05);
}

.daily-section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 69, 0, 0.1), transparent);
    border-radius: 12px;
    pointer-events: none;
}

.daily-section-header i {
    color: #ff4500;
    font-size: 1.4rem;
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
}

.weekly-section-header {
    border-left: 4px solid #ff8c00;
    background: rgba(255, 140, 0, 0.05);
}

.weekly-section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.1), transparent);
    border-radius: 12px;
    pointer-events: none;
}

.weekly-section-header i {
    color: #ff8c00;
    font-size: 1.4rem;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

.monthly-section-header {
    border-left: 4px solid #ffa500;
    background: rgba(255, 165, 0, 0.05);
}

.monthly-section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.1), transparent);
    border-radius: 12px;
    pointer-events: none;
}

.monthly-section-header i {
    color: #ffa500;
    font-size: 1.4rem;
    text-shadow: 0 0 10px rgba(255, 165, 0, 0.5);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .popular-tab-navigation {
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
        scrollbar-color: #ff8c00 rgba(255, 255, 255, 0.1);
        padding: 12px;
        gap: 0.5rem;
    }
    
    .popular-tab-navigation::-webkit-scrollbar {
        height: 6px;
    }
    
    .popular-tab-navigation::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
    }
    
    .popular-tab-navigation::-webkit-scrollbar-thumb {
        background: linear-gradient(90deg, #ff8c00, #ff6b00);
        border-radius: 3px;
    }
    
    .popular-tab-navigation::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(90deg, #ffa500, #ff7f00);
    }
    
    .popular-tab-btn {
        flex-shrink: 0;
        min-width: 140px;
        padding: 14px 20px;
    }
    
    .period-filter-container {
        flex-direction: column;
        gap: 12px;
        padding: 16px 20px;
        text-align: center;
    }
    
    .period-filter-label {
        font-size: 14px;
    }
    
    .popular-time-header {
        font-size: 1.1rem;
    }
    
    .rank-badge {
        font-size: 12px;
        padding: 4px 8px;
        min-width: 35px;
    }
}

@media (max-width: 480px) {
    .popular-tab-navigation {
        padding: 8px;
    }
    
    .popular-tab-btn {
        padding: 12px 16px;
        font-size: 13px;
        min-width: 120px;
    }
    
    .period-filter-container {
        padding: 14px 16px;
    }
    
    .period-filter-label {
        font-size: 13px;
    }

    .popular-time-header {
        font-size: 1rem;
    }
}