/* ============================================ */
/* BROWSE PAGE STYLES - Extracted from legacy  */
/* ============================================ */

.browse-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 32px;
    min-height: 60vh;
}

/* Tabs */
.browse-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0;
}
.browse-tab {
    padding: 12px 28px;
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.browse-tab:hover {
    color: #e50914;
    background: rgba(229,9,20,0.1);
}
.browse-tab.active {
    color: #e50914;
    border-bottom: 2px solid #e50914;
    background: transparent;
}
.tab-icon { font-size: 18px; }
.tab-badge {
    background: #e50914;
    color: white;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 11px;
    margin-left: 6px;
}

/* Tab Content */
.browse-tab-content {
    display: none;
}
.browse-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Filter Bar */
.browse-filters {
    background: #141414;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid #2a2a2a;
}
.filter-row {
    margin-bottom: 20px;
}
.filter-row:last-child {
    margin-bottom: 0;
}
.search-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
.search-wrapper {
    flex: 1;
    position: relative;
}
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}
.filter-input {
    width: 100%;
    padding: 14px 16px 14px 42px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 40px;
    color: white;
    font-size: 14px;
}
.filter-input:focus {
    outline: none;
    border-color: #e50914;
}
.clear-search {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
}
.dropdown-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}
.filter-group {
    flex: 1;
    min-width: 140px;
}
.filter-group label {
    display: block;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-select {
    width: 100%;
    padding: 10px 12px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    cursor: pointer;
}
.filter-btn {
    padding: 10px 24px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.filter-btn-primary {
    background: #e50914;
    color: white;
}
.filter-btn-primary:hover {
    background: #ff0a16;
}
.filter-btn-clear {
    background: #333;
    color: white;
}
.filter-btn-clear:hover {
    background: #444;
}
.filter-results-info {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #aaa;
}
.filter-active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-tag {
    background: rgba(229,9,20,0.15);
    color: #e50914;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-tag-remove {
    background: none;
    border: none;
    color: #e50914;
    cursor: pointer;
    font-size: 12px;
}

/* Content Grid & Cards */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.browse-card {
    background: #141414;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    border: 1px solid #2a2a2a;
}
.browse-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -10px rgba(0,0,0,0.5);
    border-color: #e50914;
}
.card-link {
    text-decoration: none;
    color: white;
    display: block;
}
.card-image {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #1a1a1a;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.browse-card:hover .card-image img {
    transform: scale(1.05);
}
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.browse-card:hover .card-overlay {
    opacity: 1;
}
.play-icon {
    width: 50px;
    height: 50px;
    background: rgba(229,9,14,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}
.card-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    flex-direction: column;
    align-items: flex-end;
}
.card-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-access-free { background: #4CAF50; }
.badge-access-basic { background: #ff9800; }
.badge-access-premium { background: #e50914; }
.badge-access-rent { background: #2196F3; }
.badge-access-buy { background: #9C27B0; }
.badge-hd { background: #333; color: #e50914; }
.badge-4k { background: #e50914; color: white; }
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0,0,0,0.5);
}
.progress-fill {
    height: 100%;
    background: #e50914;
    width: 0%;
}
.card-info {
    padding: 12px;
}
.card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 10px;
}
.card-year { color: #aaa; }
.card-runtime { color: #666; }
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.watchlist-btn {
    flex: 1;
    background: rgba(255,255,255,0.08);
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.watchlist-btn:hover {
    background: rgba(229,9,14,0.2);
    border-color: #e50914;
}
.watchlist-btn.in-watchlist {
    background: rgba(229,9,14,0.3);
    border-color: #e50914;
    color: #e50914;
}
.watchlist-btn.in-watchlist:hover {
    background: #e50914;
    color: white;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.pagination-link {
    padding: 8px 14px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.pagination-link:hover {
    background: #2a2a2a;
    color: white;
}
.pagination-link.active {
    background: #e50914;
    border-color: #e50914;
    color: white;
}
.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #141414;
    border-radius: 16px;
    grid-column: 1 / -1;
}
.empty-state h3 {
    color: #aaa;
    margin-bottom: 15px;
}
.empty-state p {
    color: #666;
    margin-bottom: 20px;
}
.empty-state .btn {
    background: #e50914;
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    text-decoration: none;
    display: inline-block;
}

/* Loading */
.loading-spinner {
    text-align: center;
    padding: 60px;
    color: #aaa;
    grid-column: 1 / -1;
}
.loading-spinner::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 2px solid #e50914;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .browse-container { padding: 24px 16px; }
    .browse-tab { padding: 8px 16px; font-size: 14px; }
    .dropdown-row { flex-direction: column; }
    .filter-group { width: 100%; }
    .search-row { flex-direction: column; }
    .filter-btn-primary { width: 100%; }
    .content-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
    .card-title { font-size: 12px; }
}

/* Style age rating badge like Library page */
.card-badge.badge-age {
    background: #ff9800 !important;
    color: #1a1a1a !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
}

/* Special style for UNRATED */
.card-badge.badge-age:contains("UNRATED") {
    background: #666 !important;
    color: white !important;
}

/**
 * Browse Page Tabs - Mobile Stacked Layout
 * Version: 1.0
 * File: style.css
 * Placement: Add at end of file
 */

/* Mobile specific (max-width: 768px) */
@media (max-width: 768px) {
    .browse-tabs,
    .satori-browse-tabs,
    .browse-filters-tabs {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .browse-tab,
    .satori-browse-tab,
    .browse-filters-tab {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Small mobile (max-width: 480px) - even larger tap targets */
@media (max-width: 480px) {
    .browse-tab,
    .satori-browse-tab,
    .browse-filters-tab {
        padding: 14px 16px;
        font-size: 15px;
    }
}
