/* ======================================================= */
/* === DISCOVER COLLECTIONS PAGE === */
/* ======================================================= */

.discover-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* --- Header --- */
.discover-header {
    text-align: center;
    margin-bottom: 40px;
}

.discover-title {
    font-size: 3rem;
    font-weight: 700;
    color: #E8BD2C;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(232, 189, 44, 0.3);
}

.discover-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* --- Filters --- */
.discover-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* Search */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper i {
    position: absolute;
    left: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

.search-input {
    padding: 12px 15px 12px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    color: #fff;
    font-size: 0.95rem;
    width: 300px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #E8BD2C;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(232, 189, 44, 0.1);
}

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

/* Filter Buttons */
.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #E8BD2C 0%, #d4a91e 100%);
    border-color: #E8BD2C;
    color: #000;
    font-weight: 600;
}

.filter-btn i {
    font-size: 0.9rem;
}

/* Active Tag Filter */
.active-tag-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(232, 189, 44, 0.1);
    border: 1px solid rgba(232, 189, 44, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
    color: #E8BD2C;
}

.clear-tag-btn {
    background: rgba(232, 189, 44, 0.2);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #E8BD2C;
    transition: all 0.3s ease;
}

.clear-tag-btn:hover {
    background: rgba(232, 189, 44, 0.4);
    transform: rotate(90deg);
}

/* --- Collections Grid --- */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.collection-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
}

.collection-card:hover {
    transform: translateY(-5px);
    border-color: #E8BD2C;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(232, 189, 44, 0.2);
}

.collection-cover {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.collection-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.collection-card:hover .collection-cover img {
    transform: scale(1.05);
}

.collection-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
}

.collection-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Featured Badge - uses universal .stills-badge-base from styles.css */
/* No additional styles needed - all inherited from .stills-badge-base */

/* Collection Info */
.collection-info {
    padding: 20px;
}

.collection-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.collection-curator {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.collection-curator a {
    color: #E8BD2C;
    text-decoration: none;
    transition: color 0.3s ease;
}

.collection-curator a:hover {
    color: #fff;
    text-decoration: underline;
}

.verified-icon {
    color: #E8BD2C;
    font-size: 0.8rem;
}

.collection-description {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

.collection-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.tag {
    padding: 4px 10px;
    background: rgba(232, 189, 44, 0.15);
    border: 1px solid rgba(232, 189, 44, 0.3);
    border-radius: 12px;
    color: #E8BD2C;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tag:hover {
    background: rgba(232, 189, 44, 0.25);
    border-color: #E8BD2C;
}

.collection-stats {
    display: flex;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.stat i {
    color: #E8BD2C;
    font-size: 0.9rem;
}

.stat strong {
    color: #fff;
    font-weight: 600;
}

/* Fork Badge */
.fork-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    margin-bottom: 10px;
}

.fork-badge i {
    font-size: 0.7rem;
}

/* Loading Spinner */
.collections-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.collections-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(232, 189, 44, 0.2);
    border-top-color: #E8BD2C;
    border-radius: 50%;
    animation: collections-spinner-rotate 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes collections-spinner-rotate {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

/* === Responsive === */
@media (max-width: 768px) {
    .discover-title {
        font-size: 2rem;
    }

    .discover-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
        justify-content: center;
    }

    .search-input {
        width: 100%;
    }

    .collections-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .collection-cover {
        height: 200px;
    }
}

/* --- Pagination (styled like admin) --- */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 40px 0 20px;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
    background: rgba(232, 189, 44, 0.1);
    border: 2px solid #E8BD2C;
    border-radius: 50px;
    color: #E8BD2C;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: #E8BD2C;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 189, 44, 0.3);
}

.btn-load-more:active {
    transform: translateY(0);
}

.btn-load-more i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-load-more:hover i {
    transform: translateY(3px);
}

/* --- Search Autocomplete Suggestions --- */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: rgba(20, 20, 20, 0.98);
    border: 1px solid rgba(232, 189, 44, 0.3);
    border-radius: 12px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(232, 189, 44, 0.1);
}

.suggestion-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.suggestion-icon.collection {
    background: rgba(100, 149, 237, 0.2);
    color: #6495ED;
}

.suggestion-icon.tag {
    background: rgba(255, 99, 71, 0.2);
    color: #FF6347;
}

.suggestion-icon.curator {
    background: rgba(144, 238, 144, 0.2);
    color: #90EE90;
}

.suggestion-content {
    flex: 1;
    min-width: 0;
}

.suggestion-text {
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.suggestion-empty {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.suggestion-loading {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.suggestion-loading::after {
    content: '...';
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
