/* Search Results Specific Styles */

.search-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
}

.search-section .search-container {
    max-width: 800px;
    margin: 0 auto;
}

.discover-header {
    text-align: center;
    margin-bottom: 2rem;
}

.discover-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.discover-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.search-form {
    width: 100%;
}

.search-box {
    position: relative;
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    color: #2d3748;
    outline: none;
    font-weight: 500;
}

.search-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.search-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border: none;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.search-btn:hover {
    background: linear-gradient(45deg, #ff5252, #ff7979);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

.results-section {
    padding: 2rem 0;
}

.results-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

/* Filters Sidebar */
.filters-sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
}

.filters-sidebar h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: white;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h4 {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    margin-bottom: 0.5rem;
}

.filter-option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff6b6b;
    cursor: pointer;
}

.filter-option span {
    font-size: 0.95rem;
    color: white;
    user-select: none;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.95rem;
    backdrop-filter: blur(5px);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.filter-select option {
    background: #2d3748;
    color: white;
    padding: 0.5rem;
}

.clear-filters, .apply-filters {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    border: none;
    font-size: 0.95rem;
}

.clear-filters {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.clear-filters:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.apply-filters {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.apply-filters:hover {
    background: linear-gradient(45deg, #ff5252, #ff7979);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* Results Content */
.results-content {
    min-width: 0;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.results-info h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.result-count {
    color: var(--accent);
}

.search-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.sort-options label {
    color: var(--text-secondary);
}

.sort-select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Results Grid */
.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.result-item {
    display: flex;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.2s;
    cursor: pointer;
}

.result-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-poster {
    position: relative;
    flex-shrink: 0;
    width: 80px;
}

.result-poster img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 6px;
}

.result-rating {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.result-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.result-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.result-meta .year {
    color: var(--text-muted);
}

.result-meta .duration {
    color: var(--text-muted);
}

.result-meta .genre {
    color: var(--accent);
}

.result-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.result-cast {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.result-cast strong {
    color: var(--text-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    color: var(--text-muted);
    padding: 0 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .results-layout {
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .results-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .filters-sidebar {
        position: static;
        order: 2;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .result-item {
        flex-direction: column;
        text-align: center;
    }

    .result-poster {
        align-self: center;
        width: 120px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .result-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .pagination {
        gap: 0.25rem;
    }

    .page-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}
