/* ── DISCOVER PAGE STYLES ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

/* Discover Content Area */
.discover-main-container {
    flex: 1;
    min-height: 100vh;
    padding: 24px 32px 100px;
    background: #000;
    max-width: 1400px;
    overflow-y: auto;
}

/* Search Header */
.discover-search-header {
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(16px);
    padding: 10px 0;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    padding: 12px 20px;
    transition: all 0.2s ease;
}

.search-input-wrapper:focus-within {
    border-color: #ff2c55;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 16px rgba(255, 44, 85, 0.25);
}

.search-icon {
    font-size: 18px;
    margin-right: 12px;
    opacity: 0.8;
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.search-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.clear-btn {
    cursor: pointer;
    font-size: 14px;
    opacity: 0.6;
    padding: 4px 8px;
    transition: opacity 0.15s;
    user-select: none;
}

.clear-btn:hover {
    opacity: 1;
}

.clear-btn.hidden {
    display: none;
}

/* Category Filter Pills */
.categories-scroll-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 12px;
    margin-bottom: 24px;
}

.categories-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.category-chip {
    flex-shrink: 0;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.category-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.category-chip.active {
    background: #ff2c55;
    border-color: #ff2c55;
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 44, 85, 0.4);
}

/* Section Headings */
.section-heading {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 14px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Trending Tags Grid */
.trending-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.trending-tag-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.trending-tag-card:hover {
    background: rgba(255, 44, 85, 0.12);
    border-color: #ff2c55;
    transform: translateY(-2px);
}

.tag-card-icon {
    font-size: 20px;
}

.tag-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.tag-card-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* Discover Cards Grid */
.discover-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.video-card {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease;
}

.video-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 44, 85, 0.4);
}

.video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.15) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
}

.video-card-stats {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.video-card-creator {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-card-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

/* User search results */
.user-results-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 24px;
    scrollbar-width: none;
}

.user-results-row::-webkit-scrollbar {
    display: none;
}

.user-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    min-width: 130px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.user-card-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.user-card-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff2c55;
    background: #222;
}

.user-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-card-sub {
    font-size: 11px;
    color: #1d9bf0;
}

/* Loading & Empty states */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state p {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.hidden {
    display: none !important;
}

/* Responsive Layout */
@media (max-width: 1023px) {
    .discover-main-container {
        padding: 16px 16px 80px;
    }
    .discover-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .discover-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .video-card-overlay {
        padding: 8px;
    }
}
