/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --max-width: 1200px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1d4ed8;
}

/* Header */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo a {
    display: flex;
    align-items: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.search-container {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    min-width: 250px;
}

#main-search {
    background: transparent;
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.95rem;
}

#search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.25rem;
    display: flex;
    align-items: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-search {
    display: flex;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-search input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
}

.hero-search button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.hero-search button:hover {
    background: #1d4ed8;
}

.popular-searches {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.popular-searches span {
    opacity: 0.9;
}

.popular-searches a {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.popular-searches a:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Content Sections */
.featured-section,
.content-section {
    padding: 3rem 0;
}

.featured-section {
    background: var(--bg-light);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.cast-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cast-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.cast-card a {
    display: block;
    color: inherit;
}

.card-image {
    width: 100%;
    height: 200px;
    background: var(--bg-light);
    position: relative;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.placeholder-img::before {
    content: attr(data-title);
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.card-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Content List */
.content-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.list-item {
    padding: 1.25rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.list-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.list-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.list-item p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* SEO Content Section */
.seo-content {
    padding: 4rem 0;
    background: var(--bg-light);
}

.seo-content h2 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.seo-content h3 {
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.seo-content ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Cast Page Specific Styles */
.cast-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.cast-hero-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
}

.movie-poster {
    width: 100%;
    height: 450px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.movie-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.movie-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.movie-description {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.95;
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.cast-member {
    text-align: center;
}

.cast-photo {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-light);
}

.cast-member h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.cast-member .character {
    color: var(--text-light);
    font-size: 0.95rem;
}

.cast-table {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 3rem;
}

.cast-table table {
    width: 100%;
    border-collapse: collapse;
}

.cast-table th {
    background: var(--bg-light);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
}

.cast-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.cast-table tr:hover {
    background: var(--bg-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .search-container {
        width: 100%;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-search {
        flex-direction: column;
        border-radius: 8px;
    }

    .hero-search button {
        width: 100%;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .cast-hero-content {
        grid-template-columns: 1fr;
    }

    .movie-poster {
        max-width: 300px;
        margin: 0 auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .content-list {
        grid-template-columns: 1fr;
    }

    .cast-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}