* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #fff;
    color: #202124;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    border-bottom: 1px solid #e8eaed;
    padding: 16px 24px;
    background: #fff;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 22px;
    color: #ea4335;
    font-weight: 500;
}

.nav-right {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: #5f6368;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #202124;
    text-decoration: underline;
}

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Hero Section */
.hero-section {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 20px;
    text-align: center;
    margin-bottom: 20px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    animation: fadeInUp 0.6s ease-out;
}

.hero-subtitle {
    font-size: 14px;
    font-weight: 300;
    opacity: 0.95;
    margin-bottom: 16px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.stat-item span {
    font-size: 12px;
    font-weight: 500;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Container */
.search-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
    padding: 0 20px;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(32,33,36,.28);
    border-radius: 24px;
    transition: box-shadow 0.2s;
}

.search-box:hover {
    box-shadow: 0 1px 6px rgba(32,33,36,.38);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa0a6;
    font-size:16px;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 120px;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    outline: none;
    background: #fff;
}

.search-input::placeholder {
    color: #9aa0a6;
}

.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #70757a;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.clear-btn:hover {
    background-color: #f8f9fa;
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #4285f4;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-btn:hover {
    background-color: #f8f9fa;
}

/* Search Options */
.search-options {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 12px 0;
}

.search-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #5f6368;
}

.search-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.search-option input[type="radio"]:checked + span {
    color: #1a73e8;
    font-weight: 500;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 40px 0;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results Container */
.results-container {
    width: 100%;
    max-width: 1200px;
    margin-top: 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #e8eaed;
    margin-bottom: 20px;
}

.results-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#resultsCount {
    color: #70757a;
    font-size: 14px;
}

.streaming-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1a73e8;
    font-size: 12px;
    font-weight: 500;
}

.streaming-notice i {
    opacity: 0.7;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: #fff;
    color: #5f6368;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

/* Search Results */
.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 0 20px;
}

.movie-card {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    animation: fadeIn 0.5s ease-out;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(32,33,36,.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movie-poster {
    width: 100%;
    height: 320px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 48px;
}

.movie-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster-img {
    transform: scale(1.05);
}

.movie-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.movie-title {
    font-size: 18px;
    font-weight: 600;
    color: #202124;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    margin-bottom: 4px;
}

.movie-title:hover {
    color: #1a73e8;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #70757a;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f3f4;
}

.movie-year {
    font-weight: 500;
    color: #5f6368;
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fbbc04;
    font-weight: 600;
}

.movie-description {
    color: #5f6368;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.streaming-options {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f3f4;
}

.streaming-title {
    font-size: 11px;
    color: #70757a;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.streaming-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.streaming-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.streaming-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.streaming-quality {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #5f6368;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 8px;
    color: #202124;
}

.no-results p {
    font-size: 14px;
}

/* Streaming Services Section */
.streaming-services-section {
    width: 100%;
    padding: 30px 20px;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 20px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.service-card {
    background: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #e8eaed;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(32,33,36,.1);
    border-color: #667eea;
}

.service-card i {
    font-size: 28px;
    color: #667eea;
    margin-bottom: 8px;
}

.service-card h3 {
    font-size: 13px;
    font-weight: 600;
    color: #202124;
}

/* Features Section */
.features-section {
    width: 100%;
    padding: 30px 20px 20px;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 16px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon i {
    font-size: 22px;
    color: white;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    color: #5f6368;
    line-height: 1.4;
}

/* Suggestions */
.suggestions {
    width: 100%;
    max-width: 800px;
    text-align: center;
    padding: 20px 20px 30px;
}

.suggestions h3 {
    color: #5f6368;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.suggestion-tag {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e8eaed;
    border-radius: 20px;
    font-size: 13px;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.suggestion-tag:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Footer */
.footer {
    border-top: 1px solid #e8eaed;
    background: #f2f2f2;
    padding: 24px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-content p {
    color: #70757a;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #70757a;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #1a73e8;
    text-decoration: underline;
}

/* Results Container Updates */
.results-container {
    width: 100%;
    max-width: 1400px;
    margin-top: 20px;
}

.results-header {
    padding: 16px 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .search-results {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
    }

    .nav-right {
        gap: 16px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .hero-stats {
        gap: 20px;
    }

    .hero-section {
        padding: 30px 20px;
    }

    .search-options {
        gap: 16px;
    }

    .search-results {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .movie-poster {
        height: 280px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 13px;
    }

    .hero-section {
        padding: 24px 20px;
    }

    .stat-item i {
        font-size: 20px;
    }

    .stat-item span {
        font-size: 12px;
    }

    .search-options {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .search-results {
        grid-template-columns: 1fr;
    }

    .movie-poster {
        height: 360px;
    }

    .movie-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title {
        font-size: 24px;
    }
}
