/**
 * TMDB Plugin Frontend Styles
 * 
 * Comprehensive styling untuk:
 * - Detail pages (film, series, season, episode)
 * - Shortcode templates (movie list, tv list)
 * - General components (breadcrumbs, buttons, etc)
 */

:root {
    --tmdb-primary: #667eea;
    --tmdb-primary-dark: #764ba2;
    --tmdb-success: #51cf66;
    --tmdb-warning: #ff6b6b;
    --tmdb-info: #e7f5ff;
    --tmdb-text: #23282d;
    --tmdb-text-light: #666;
    --tmdb-border: #ddd;
    --tmdb-bg: #f9f9f9;
}

/* Global Styles */
.tmdb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
.tmdb-section h2,
.tmdb-detail-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Links */
.tmdb-breadcrumbs a,
.tmdb-genre-tag,
.tmdb-similar-item {
    transition: all 0.3s ease;
}

/* Buttons */
.tmdb-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.tmdb-btn-primary {
    background: linear-gradient(135deg, var(--tmdb-primary) 0%, var(--tmdb-primary-dark) 100%);
    color: white;
}

.tmdb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.tmdb-btn-secondary {
    background: var(--tmdb-bg);
    color: var(--tmdb-text);
    border: 1px solid var(--tmdb-border);
}

.tmdb-btn-secondary:hover {
    background: #e7e7e7;
    border-color: #999;
}

/* Detail Pages */
.tmdb-detail-page {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Breadcrumbs */
.tmdb-breadcrumbs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    font-size: 14px;
    flex-wrap: wrap;
}

.tmdb-breadcrumbs a {
    color: var(--tmdb-primary);
    text-decoration: none;
}

.tmdb-breadcrumbs a:hover {
    text-decoration: underline;
}

.tmdb-breadcrumbs .separator {
    color: var(--tmdb-border);
}

.tmdb-breadcrumbs .current {
    color: var(--tmdb-text-light);
}

/* Detail Wrapper */
.tmdb-detail-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.tmdb-detail-sidebar {
    position: sticky;
    top: 20px;
}

.tmdb-poster-wrapper {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.tmdb-poster {
    width: 100%;
    height: auto;
    display: block;
}

/* Quick Info Box */
.tmdb-quick-info {
    background: var(--tmdb-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--tmdb-border);
}

.tmdb-quick-info-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--tmdb-border);
}

.tmdb-quick-info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.tmdb-quick-info-item .label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--tmdb-text-light);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.tmdb-quick-info-item .value {
    font-size: 15px;
    color: var(--tmdb-text);
    font-weight: 500;
}

/* Ratings Colors */
.text-green-600 {
    color: var(--tmdb-success) !important;
}

.text-yellow-600 {
    color: #f39c12 !important;
}

.text-orange-600 {
    color: #e67e22 !important;
}

.text-red-600 {
    color: var(--tmdb-warning) !important;
}

.text-gray-500 {
    color: #999 !important;
}

/* Main Content */
.tmdb-detail-main {
    padding-top: 10px;
}

.tmdb-detail-title {
    font-size: 36px;
    margin: 0 0 10px 0;
    color: var(--tmdb-text);
    font-weight: 700;
}

.tmdb-detail-title .year {
    font-size: 24px;
    color: #999;
    font-weight: 400;
    margin-left: 10px;
}

/* Genres */
.tmdb-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0 20px 0;
}

.tmdb-genre-tag {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--tmdb-primary) 0%, var(--tmdb-primary-dark) 100%);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.tmdb-genre-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Tagline */
.tmdb-tagline {
    font-size: 16px;
    color: var(--tmdb-text-light);
    font-style: italic;
    margin: 15px 0 30px 0;
    border-left: 3px solid var(--tmdb-primary);
    padding-left: 15px;
}

/* Sections */
.tmdb-section {
    margin-bottom: 50px;
}

.tmdb-section h2 {
    font-size: 22px;
    color: var(--tmdb-text);
    margin: 0 0 20px 0;
    border-bottom: 2px solid var(--tmdb-primary);
    padding-bottom: 10px;
    font-weight: 600;
}

/* Overview */
.tmdb-overview {
    font-size: 15px;
    line-height: 1.8;
    color: var(--tmdb-text-light);
}

/* Cast Grid */
.tmdb-cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.tmdb-cast-item {
    text-align: center;
}

.tmdb-cast-image,
.tmdb-cast-placeholder {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
    background: var(--tmdb-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tmdb-cast-placeholder {
    font-size: 40px;
    color: #ddd;
}

.tmdb-cast-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--tmdb-text);
    margin: 0 0 5px 0;
}

.tmdb-cast-item .role {
    font-size: 12px;
    color: var(--tmdb-text-light);
    margin: 0;
}

/* Similar Items */
.tmdb-similar-grid,
.tmdb-similar-item {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.tmdb-similar-item {
    grid-column: auto;
    text-decoration: none;
    color: var(--tmdb-text);
    transition: all 0.3s ease;
}

.tmdb-similar-item:hover {
    transform: translateY(-5px);
}

.tmdb-similar-poster {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 10px;
}

.tmdb-similar-poster img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.tmdb-similar-poster .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tmdb-similar-item:hover .overlay {
    opacity: 1;
}

.tmdb-similar-poster .overlay .dashicons {
    color: white;
    font-size: 40px;
}

.tmdb-similar-item h3 {
    font-size: 14px;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.tmdb-similar-item .year {
    font-size: 12px;
    color: var(--tmdb-text-light);
    margin: 0;
}

/* 404 Page */
.tmdb-404-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--tmdb-primary) 0%, var(--tmdb-primary-dark) 100%);
}

.tmdb-404-content {
    text-align: center;
    background: white;
    padding: 60px 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .tmdb-detail-wrapper {
        grid-template-columns: 1fr;
    }

    .tmdb-detail-sidebar {
        position: static;
    }

    .tmdb-detail-title {
        font-size: 28px;
    }

    .tmdb-cast-grid,
    .tmdb-similar-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 600px) {
    .tmdb-detail-page {
        padding: 15px 10px;
    }

    .tmdb-detail-title {
        font-size: 22px;
    }

    .tmdb-detail-title .year {
        font-size: 16px;
    }

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

    .tmdb-404-content {
        padding: 40px 20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --tmdb-text: #e1e1e1;
        --tmdb-text-light: #999;
        --tmdb-border: #555;
        --tmdb-bg: #2d3237;
    }

    .tmdb-quick-info {
        background: #40454a;
        border-color: var(--tmdb-border);
    }

    .tmdb-breadcrumbs .current {
        color: #999;
    }

    .tmdb-overview {
        color: #ccc;
    }

    .tmdb-cast-image,
    .tmdb-cast-placeholder {
        background: #40454a;
    }

    .tmdb-btn-secondary {
        background: #40454a;
        border-color: var(--tmdb-border);
        color: var(--tmdb-text);
    }

    .tmdb-btn-secondary:hover {
        background: #555;
    }
}

/* ============================================================
   TMDB Plugin v2 — Additional Styles
   ============================================================ */

/* Backdrop */
.tmdb-backdrop {
    position: relative;
    height: 320px;
    background-size: cover;
    background-position: center top;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}
.tmdb-backdrop-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.3) 0%, rgba(0,0,0,.85) 100%);
}

/* Detail page layout */
.tmdb-detail-page { padding: 0 0 40px; max-width: 1200px; margin: 0 auto; }
.tmdb-breadcrumbs { display: flex; gap: 8px; padding: 20px 20px 10px; font-size: 14px; flex-wrap: wrap; }
.tmdb-breadcrumbs a { color: #667eea; text-decoration: none; }
.tmdb-breadcrumbs a:hover { text-decoration: underline; }
.tmdb-breadcrumbs span { color: #999; }
.tmdb-detail-wrapper { display: grid; grid-template-columns: 260px 1fr; gap: 40px; padding: 20px; }
.tmdb-detail-sidebar { position: sticky; top: 20px; align-self: start; }
.tmdb-poster-wrapper { border-radius: 8px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,.2); margin-bottom: 20px; }
.tmdb-poster { width: 100%; height: auto; display: block; }

/* Quick info */
.tmdb-quick-info { background: #f9f9f9; border: 1px solid #e5e5e5; border-radius: 8px; padding: 16px; }
.tmdb-quick-info-item { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #eee; }
.tmdb-quick-info-item:last-child { margin-bottom:0; padding-bottom:0; border-bottom:none; }
.tmdb-quick-info-item .label { display: block; font-size: 11px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.tmdb-quick-info-item .value { font-size: 14px; color: #23282d; font-weight: 500; }
.tmdb-quick-info-item .value small { display: block; font-size: 11px; color: #999; font-weight: 400; }
.rating-val { font-size: 16px !important; font-weight: 700 !important; color: #f59e0b !important; }

/* Main content */
.tmdb-detail-main { padding-top: 0; }
.tmdb-detail-title { font-size: 32px; font-weight: 800; margin: 0 0 12px; color: #111; line-height: 1.2; }
.tmdb-detail-title .year { font-size: 22px; color: #888; font-weight: 400; margin-left: 8px; }
.tmdb-genres { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.tmdb-genre-tag { display: inline-block; padding: 5px 14px; background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; border-radius: 20px; font-size: 13px; font-weight: 600; text-decoration: none; transition: transform .2s,box-shadow .2s; }
.tmdb-genre-tag:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102,126,234,.4); color: #fff; }
.tmdb-tagline { font-size: 16px; color: #666; font-style: italic; border-left: 3px solid #667eea; padding-left: 14px; margin: 0 0 28px; }

/* Sections */
.tmdb-section { margin-bottom: 44px; }
.tmdb-section h2 { font-size: 20px; font-weight: 700; color: #111; border-bottom: 2px solid #667eea; padding-bottom: 10px; margin: 0 0 20px; }
.tmdb-overview { font-size: 15px; line-height: 1.85; color: #444; }

/* Crew */
.tmdb-crew-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.tmdb-crew-item { display: flex; flex-direction: column; gap: 4px; }
.crew-role { font-size: 11px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .5px; }
.crew-name { font-size: 15px; font-weight: 600; color: #23282d; }

/* Cast */
.tmdb-cast-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(130px,1fr)); gap: 16px; }
.tmdb-cast-item { text-align: center; }
.tmdb-cast-image, .tmdb-cast-placeholder { width: 100%; height: 180px; object-fit: cover; border-radius: 6px; margin-bottom: 8px; background: #eee; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.tmdb-cast-item h4 { font-size: 13px; font-weight: 600; margin: 0 0 3px; color: #23282d; }
.tmdb-cast-item .role { font-size: 11px; color: #999; margin: 0; }

/* Similar */
.tmdb-similar-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); gap: 16px; }
.tmdb-similar-item { text-decoration: none; color: #23282d; transition: transform .25s; display: block; }
.tmdb-similar-item:hover { transform: translateY(-4px); }
.tmdb-similar-poster { position: relative; border-radius: 6px; overflow: hidden; margin-bottom: 8px; }
.tmdb-similar-poster img { width: 100%; height: 200px; object-fit: cover; display: block; }
.tmdb-similar-poster .overlay { position: absolute; inset: 0; background: rgba(102,126,234,.7); display: flex; align-items: center; justify-content: center; font-size: 28px; opacity: 0; transition: opacity .25s; }
.tmdb-similar-item:hover .overlay { opacity: 1; }
.tmdb-similar-item h3 { font-size: 13px; font-weight: 600; margin: 0 0 3px; }
.tmdb-similar-item .year { font-size: 11px; color: #999; margin: 0; }

/* Seasons */
.tmdb-seasons-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); gap: 16px; }
.tmdb-season-card { text-decoration: none; color: #23282d; display: flex; flex-direction: column; border: 1px solid #eee; border-radius: 8px; overflow: hidden; transition: box-shadow .2s,transform .2s; }
.tmdb-season-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); transform: translateY(-3px); }
.tmdb-season-poster img { width: 100%; height: 200px; object-fit: cover; display: block; }
.tmdb-season-poster-placeholder { width: 100%; height: 200px; background: linear-gradient(135deg,#667eea,#764ba2); display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 800; color: #fff; }
.tmdb-season-info { padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.tmdb-season-info strong { font-size: 14px; }
.tmdb-season-info span { font-size: 12px; color: #888; }

/* Video Player */
.tmdb-video-section {}
.tmdb-player-wrapper { overflow: hidden; background: #000; }
.tmdb-player-wrapper .plyr { --plyr-color-main: #667eea; border-radius: 8px; }

/* FAQ */
.tmdb-faq-list { display: flex; flex-direction: column; gap: 0; border: 1px solid #e5e5e5; border-radius: 8px; overflow: hidden; }
.tmdb-faq-item { border-bottom: 1px solid #e5e5e5; }
.tmdb-faq-item:last-child { border-bottom: none; }
.tmdb-faq-q { width: 100%; background: #fff; border: none; padding: 16px 20px; font-size: 15px; font-weight: 600; color: #23282d; cursor: pointer; display: flex; justify-content: space-between; align-items: center; text-align: left; transition: background .15s; }
.tmdb-faq-q:hover { background: #f5f5f5; }
.tmdb-faq-q[aria-expanded="true"] { background: #f0f4ff; color: #667eea; }
.faq-icon { font-size: 20px; font-weight: 400; transition: transform .25s; flex-shrink: 0; margin-left: 12px; }
.tmdb-faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.tmdb-faq-a { padding: 0 20px 16px; background: #f9f9f9; }
.tmdb-faq-a p { font-size: 14px; line-height: 1.7; color: #555; margin: 0; }

/* Modal */
.tmdb-modal { display: none; position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.75); align-items: center; justify-content: center; }
.tmdb-modal[style*="flex"] { display: flex !important; }
.tmdb-modal-box { background: #fff; border-radius: 12px; padding: 36px 32px; max-width: 460px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,.3); text-align: center; }
.tmdb-modal-box h3 { font-size: 22px; font-weight: 800; margin: 0 0 12px; color: #111; }
.tmdb-modal-body { font-size: 15px; color: #555; line-height: 1.6; margin-bottom: 24px; }
.tmdb-modal-close { background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; border: none; padding: 12px 32px; border-radius: 6px; font-size: 15px; font-weight: 700; cursor: pointer; transition: opacity .2s; }
.tmdb-modal-close:hover { opacity: .85; }

/* Genre page */
.tmdb-genre-page { padding: 20px; max-width: 1200px; margin: 0 auto; }
.tmdb-page-heading { font-size: 28px; font-weight: 800; margin: 0 0 28px; color: #111; }

/* Pagination */
.tmdb-pagination { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 24px 0 0; flex-wrap: wrap; }
.tmdb-pagination-info { font-size: 14px; color: #888; }
.tmdb-pagination-buttons { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tmdb-pagination-btn { padding: 8px 16px; background: #f3f4f6; border: 1px solid #ddd; border-radius: 6px; text-decoration: none; font-size: 14px; font-weight: 600; color: #23282d; transition: all .2s; }
.tmdb-pagination-btn:hover { background: #e5e7eb; }
.tmdb-pagination-number { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: #f3f4f6; border: 1px solid #ddd; border-radius: 6px; text-decoration: none; font-size: 14px; font-weight: 600; color: #23282d; transition: all .2s; }
.tmdb-pagination-number:hover { background: #e5e7eb; }
.tmdb-pagination-number.active { background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; border-color: #667eea; }

/* Responsive */
@media (max-width: 768px) {
    .tmdb-detail-wrapper { grid-template-columns: 1fr; }
    .tmdb-detail-sidebar { position: static; }
    .tmdb-backdrop { height: 200px; }
    .tmdb-detail-title { font-size: 24px; }
    .tmdb-cast-grid { grid-template-columns: repeat(auto-fill,minmax(100px,1fr)); }
    .tmdb-seasons-grid { grid-template-columns: repeat(auto-fill,minmax(120px,1fr)); }
}
@media (max-width: 480px) {
    .tmdb-detail-title { font-size: 20px; }
    .tmdb-similar-grid { grid-template-columns: repeat(2,1fr); }
    .tmdb-cast-grid { grid-template-columns: repeat(2,1fr); }
}

/* Episode list */
.tmdb-episodes-list { display: flex; flex-direction: column; gap: 2px; }
.tmdb-episode-row { display: grid; grid-template-columns: 160px 1fr auto; gap: 16px; align-items: center; padding: 12px; background: #fff; border: 1px solid #eee; border-radius: 8px; text-decoration: none; color: #23282d; transition: box-shadow .2s, border-color .2s; }
.tmdb-episode-row:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); border-color: #667eea; }
.ep-thumb img { width: 160px; height: 90px; object-fit: cover; border-radius: 6px; display: block; }
.ep-thumb-placeholder { width: 160px; height: 90px; background: linear-gradient(135deg,#667eea,#764ba2); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 700; }
.ep-info { display: flex; flex-direction: column; gap: 3px; }
.ep-num { font-size: 12px; font-weight: 700; color: #667eea; text-transform: uppercase; }
.ep-name { font-size: 15px; font-weight: 600; }
.ep-date { font-size: 12px; color: #999; }
.ep-overview { font-size: 13px; color: #666; margin: 0; line-height: 1.5; }
.ep-rating { font-size: 14px; font-weight: 700; color: #f59e0b; white-space: nowrap; }
.tmdb-ep-nav { display: flex; gap: 12px; justify-content: space-between; margin-top: 24px; padding-top: 24px; border-top: 1px solid #eee; }
.tmdb-ep-nav-btn { display: inline-flex; align-items: center; padding: 10px 20px; background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; text-decoration: none; border-radius: 6px; font-weight: 600; font-size: 14px; transition: opacity .2s; }
.tmdb-ep-nav-btn:hover { opacity: .85; color: #fff; }

/* Shortcode list items */
.tmdb-items-container { display: grid; gap: 20px; margin-bottom: 30px; }
.tmdb-layout-grid { grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); }
.tmdb-layout-list { grid-template-columns: 1fr; }
.tmdb-item-card { border-radius: 8px; overflow: hidden; background: #fff; transition: all .3s; }
.tmdb-layout-grid .tmdb-item-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.tmdb-layout-list .tmdb-item-card { display: grid; grid-template-columns: 150px 1fr; border: 1px solid #ddd; }
.tmdb-item-link { display: block; text-decoration: none; color: #23282d; height: 100%; }
.tmdb-layout-list .tmdb-item-link { display: grid; grid-template-columns: inherit; }
.tmdb-item-poster { position: relative; overflow: hidden; background: #f0f0f0; }
.tmdb-layout-grid .tmdb-item-poster { aspect-ratio: 2/3; }
.tmdb-item-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.tmdb-item-overlay { position: absolute; inset: 0; background: rgba(102,126,234,.7); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s; }
.tmdb-item-card:hover .tmdb-item-overlay { opacity: 1; }
.tmdb-item-info-overlay { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tmdb-item-rating { font-size: 16px; font-weight: 700; color: #fff; background: rgba(0,0,0,.3); padding: 4px 10px; border-radius: 4px; position:absolute; top:0; left:0;}
.tmdb-item-icon { font-size: 36px; color: #fff; }
.tmdb-item-content { padding: 12px; }
.tmdb-item-title { font-size: 14px; font-weight: 600; margin: 0 0 4px; color: #23282d; }
.tmdb-item-year { font-size: 12px; color: #999; margin: 0; }
.tmdb-no-results { padding: 40px; text-align: center; color: #666; font-size: 16px; }

@media (max-width: 600px) {
    .tmdb-episode-row { grid-template-columns: 100px 1fr; }
    .ep-thumb img, .ep-thumb-placeholder { width: 100px; height: 60px; }
    .ep-rating { display: none; }
}

/* ============================================================
   TMDB Plugin v3 — Watch Providers, Search, Year, Keywords
   ============================================================ */

/* Watch Providers */
.tmdb-watch-providers { margin: 0; }
.tmdb-providers-heading { font-size: 16px; font-weight: 700; margin: 0 0 6px; color: #111; }
.tmdb-providers-note { font-size: 12px; color: #999; margin: 0 0 14px; }
.tmdb-providers-group { margin-bottom: 16px; }
.tmdb-providers-type { display: block; font-size: 11px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.tmdb-providers-logos { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tmdb-provider-logo { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.tmdb-provider-logo img { width: 44px; height: 44px; object-fit: cover; display: block; }
.tmdb-provider-logo:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.tmdb-provider-name { display: inline-block; background: #f0f4ff; color: #667eea; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 6px; }

/* Search page */
.tmdb-search-page { max-width: 1100px; margin: 0 auto; padding: 20px; }
.tmdb-search-form { margin-bottom: 28px; }
.tmdb-search-input-wrap { display: flex; gap: 0; max-width: 600px; }
.tmdb-search-input { flex: 1; padding: 12px 16px; font-size: 16px; border: 2px solid #ddd; border-right: none; border-radius: 8px 0 0 8px; outline: none; transition: border-color .2s; }
.tmdb-search-input:focus { border-color: #667eea; }
.tmdb-search-btn { padding: 12px 20px; background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; border: none; border-radius: 0 8px 8px 0; font-size: 18px; cursor: pointer; transition: opacity .2s; }
.tmdb-search-btn:hover { opacity: .85; }
.tmdb-search-info { margin-bottom: 20px; }
.tmdb-search-info p { font-size: 14px; color: #666; }
.tmdb-search-section { margin-bottom: 40px; }
.tmdb-search-section h2 { font-size: 20px; font-weight: 700; color: #111; border-bottom: 2px solid #667eea; padding-bottom: 10px; margin: 0 0 20px; }
.tmdb-search-popular h3 { font-size: 18px; font-weight: 700; color: #111; margin: 0 0 16px; }
.tmdb-search-notice { background: #fff8ed; border: 1px solid #fcd34d; border-radius: 6px; padding: 14px 18px; color: #92400e; font-size: 14px; }

/* Search Keywords Widget */
.tmdb-search-keywords-widget { margin: 12px 0; }
.tmdb-widget-title { font-size: 16px; font-weight: 700; color: #111; margin: 0 0 12px; }
.tmdb-keywords-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tmdb-keyword-tag { display: inline-block; padding: 6px 14px; background: #f0f4ff; color: #667eea; border-radius: 20px; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid #c7d4ff; transition: all .2s; }
.tmdb-keyword-tag:hover { background: #667eea; color: #fff; border-color: #667eea; transform: translateY(-1px); }

/* Year page */
.tmdb-year-page { max-width: 1200px; margin: 0 auto; padding: 20px; }
.tmdb-year-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tmdb-year-link { display: inline-block; padding: 6px 14px; background: #f3f4f6; border: 1px solid #ddd; border-radius: 6px; color: #23282d; font-weight: 600; font-size: 14px; text-decoration: none; transition: all .2s; }
.tmdb-year-link:hover { background: #e5e7eb; }
.tmdb-year-link.active { background: linear-gradient(135deg,#667eea,#764ba2); color: #fff; border-color: #667eea; }

/* FAQ providers answer override: if no {providers} available, hide that FAQ item */
.tmdb-faq-item:empty { display: none; }
