/* src/css/styles.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0066ff;        /* Changed from red to blue */
    --primary-dark: #0052cc;   /* Darker blue for hover states */
    --primary-light: #3385ff;  /* Lighter blue for accents */
    --secondary: #141414;
    --accent: #f5f5f5;
    --card-bg: #1f1f1f;
    --text: #ffffff;
    --text-secondary: #b3b3b3;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--secondary);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.header {
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    padding: 20px 50px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(20, 20, 20, 0.95);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 100px 50px;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(0, 102, 255, 0.2) 0%, transparent 70%);
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.2s;
    animation-fill-mode: both;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto 60px;
    position: relative;
    animation: fadeInUp 0.8s ease 0.4s;
    animation-fill-mode: both;
}

.search-bar {
    width: 100%;
    padding: 20px 60px 20px 25px;
    font-size: 18px;
    border: none;
    border-radius: 50px;
    background: var(--card-bg);
    color: var(--text);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-bar:focus {
    outline: none;
    box-shadow: 0 4px 30px rgba(0, 102, 255, 0.3);
    transform: translateY(-2px);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

/* Filter Buttons */
.filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--text);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.filter-btn.active {
    background: var(--primary);
    transform: scale(1.05);
}

.filter-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* Content Grid - OPTIMIZED for Home Page Curated Experience */
.content-section {
    padding: 0 50px 50px;
    max-width: 1400px; /* Reduced from 1600px for better layout */
    margin: 0 auto;
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    position: relative;
    padding-left: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: var(--primary);
}

/* Browse All Button */
.browse-all-btn {
    font-size: 14px;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--primary);
    padding: 8px 16px;
    border-radius: 20px;
    background: transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.browse-all-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* All sections use 4×2 grid (8 items each) */
#trending-grid,
#recommendations-grid,
#new-releases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns for all sections (8 items = 2 rows) */
    gap: 25px;
    margin-bottom: 60px;
}

/* ENHANCED content card for home page */
.content-card {
    background: var(--card-bg);
    border-radius: 15px; /* Increased from 10px */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); /* Enhanced shadow */
    height: fit-content;
}

.content-card:hover {
    transform: translateY(-12px) scale(1.02); /* Enhanced hover effect */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.content-card img {
    width: 100%;
    height: 300px; /* Consistent height */
    object-fit: cover;
    transition: transform 0.3s ease;
}

.content-card:hover img {
    transform: scale(1.05); /* Subtle zoom on hover */
}

.content-info {
    padding: 15px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
}

.content-title {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: bold;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
}

.content-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
    color: var(--primary-light);
    background: rgba(0, 102, 255, 0.1);
    padding: 4px 8px;
    border-radius: 10px;
}

.rating::before {
    content: '⭐';
}

.trending-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, var(--primary), var(--primary-light));
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
    animation: pulse 2s infinite;
}

/* Pulse animation for trending badge */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive Design for Home Page */
@media (max-width: 1200px) {
    .content-section {
        max-width: 1200px;
        padding: 0 40px 50px;
    }
    
    #trending-grid,
    #recommendations-grid,
    #new-releases-grid {
        grid-template-columns: repeat(3, 1fr); /* Reduce to 3 columns (show 6 items in 2 rows) */
        gap: 20px;
    }
}

@media (max-width: 992px) {
    #trending-grid,
    #recommendations-grid,
    #new-releases-grid {
        grid-template-columns: repeat(3, 1fr); /* All sections 3 columns */
        gap: 18px;
    }
    
    .content-card img {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .content-section {
        padding: 0 20px 50px;
    }
    
    #trending-grid,
    #recommendations-grid,
    #new-releases-grid {
        grid-template-columns: repeat(2, 1fr); /* All sections 2 columns on mobile (show 4 items in 2 rows) */
        gap: 16px;
    }
    
    .content-card img {
        height: 220px;
    }
    
    .content-info {
        padding: 12px;
    }
    
    .content-title {
        font-size: 15px;
    }
    
    .content-meta {
        font-size: 13px;
    }
    
    .section-title {
        font-size: 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .browse-all-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    #trending-grid,
    #recommendations-grid,
    #new-releases-grid {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 columns */
        gap: 12px;
    }
    
    .content-card img {
        height: 180px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .search-bar {
        font-size: 16px;
        padding: 15px 50px 15px 20px;
    }
    
    .search-btn {
        padding: 12px 20px;
    }
}

/* Loading Animation */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.active {
    display: block;
}

.loading-spinner {
    border: 3px solid var(--card-bg);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* AI Update Status */
.ai-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--card-bg);
    padding: 15px 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease;
}

.ai-status.updating::before {
    content: '';
    width: 10px;
    height: 10px;
    background: #00ff00;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* AI Settings Modal */
.ai-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.ai-settings-content {
    background: var(--card-bg);
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 15px;
    position: relative;
    animation: slideInModal 0.3s ease;
}

.ai-settings-content h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.setting-group select,
.setting-group input {
    width: 100%;
    padding: 10px;
    background: var(--secondary);
    border: 1px solid #333;
    border-radius: 5px;
    color: var(--text);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-secondary);
}

.close-modal:hover {
    color: var(--text);
}

/* Ad Containers */
.ad-container {
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    min-height: 90px;
}

.ad-top {
    max-width: 728px;
    margin-bottom: 0;
}

.ad-middle {
    max-width: 336px;
    margin: 40px auto;
}

.ad-footer {
    max-width: 970px;
    margin-top: 40px;
}

/* ENHANCED SEO Content Section */
.seo-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    padding: 80px 20px;
    margin: 40px 0;
    position: relative;
    overflow: hidden;
}

/* Add animated background effect */
.seo-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.seo-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.seo-content h2 {
    font-size: 42px;
    margin-bottom: 30px;
    font-weight: bold;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

.seo-content p {
    font-size: 20px;
    line-height: 1.8;
    color: #e0e0e0;
    max-width: 800px;
    margin: 0 auto 50px;
    opacity: 0.9;
}

/* Enhanced Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature {
    background: linear-gradient(135deg, rgba(31, 31, 31, 0.9) 0%, rgba(20, 20, 20, 0.9) 100%);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 102, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.feature:hover::before {
    transform: translateX(100%);
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 102, 255, 0.3);
    border-color: var(--primary);
}

.feature h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature p {
    font-size: 17px;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* FAQ Section */
.faq-section {
    background: linear-gradient(180deg, var(--card-bg) 0%, var(--secondary) 100%);
    padding: 80px 20px;
    margin-top: 60px;
}

.faq-container {
    max-width: 1000px;
    margin: 0 auto;
}

.faq-section h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--primary);
}

.faq-item {
    margin-bottom: 25px;
    padding: 25px;
    background: rgba(20, 20, 20, 0.8);
    border-radius: 15px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0, 102, 255, 0.2);
}

.faq-item h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 16px;
}

/* Footer */
.footer {
    background: #0a0a0a;
    padding: 50px 20px;
    text-align: center;
    border-top: 1px solid #333;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-nav {
    margin-top: 25px;
}

.footer-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 20px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.footer-nav a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.watchlist-nav {
    position: relative;
    background: transparent;
    border: 2px solid var(--primary);
}

.watchlist-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    display: none;
}

.watchlist-badge.active {
    display: block;
}

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInModal {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ENHANCED Responsive Design */
@media (max-width: 1200px) {
    .content-section {
        max-width: 1400px;
        padding: 0 40px 50px;
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
    
    .content-card img {
        height: 240px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .content-section {
        padding: 0 20px 50px;
    }

    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .content-card img {
        height: 210px;
    }
    
    .content-info {
        padding: 10px;
    }
    
    .content-title {
        font-size: 14px;
    }
    
    .content-meta {
        font-size: 12px;
    }

    .ad-container {
        padding: 5px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .seo-content {
        padding: 60px 20px;
    }
    
    .seo-content h2 {
        font-size: 32px;
    }
    
    .seo-content p {
        font-size: 18px;
    }
    
    .feature {
        padding: 30px 20px;
    }
    
    .feature h3 {
        font-size: 24px;
    }
    
    .faq-section h2 {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .content-card img {
        height: 180px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .search-bar {
        font-size: 16px;
        padding: 15px 50px 15px 20px;
    }
    
    .search-btn {
        padding: 12px 20px;
    }
}