/*
Theme Name: OTT Book
Theme URI: http://example.com/ottbook
Author: Antigravity
Author URI: http://example.com
Description: A minimal, fast theme for OTT movie and show reviews.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ottbook
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* Core Reset */
:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --primary-color: #e50914;
    /* OTT red */
    --secondary-bg: #1e1e1e;
    --border-color: #333;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #ff3b30;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: var(--secondary-bg);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.site-title a {
    color: #fff;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.main-navigation a {
    color: var(--text-color);
    font-weight: 500;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

/* Grid Layout for Posts */
.site-main {
    padding: 40px 0;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.post-card {
    background-color: var(--secondary-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-thumbnail img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.post-info {
    padding: 15px;
}

.post-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.post-title a {
    color: #fff;
}

.post-meta {
    font-size: 0.85rem;
    color: #aaa;
}

/* Footer */
.site-footer {
    background-color: var(--secondary-bg);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

/* Single Movie Layout */
.movie-content-grid {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.movie-poster {
    flex: 0 0 350px;
}

.movie-poster img {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.movie-details {
    flex: 1;
    min-width: 300px;
}

.movie-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.movie-title-row h1 {
    font-size: 3rem;
    margin: 0;
    font-weight: 700;
}

.play-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #a3e635;
    /* Yellow-green from design */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a3e635;
    transition: all 0.2s ease;
}

.play-btn:hover {
    background: #a3e635;
    color: #000;
}

.play-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    margin-left: 4px;
    /* optical center */
}

.movie-meta-line {
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-sep {
    color: #666;
}

.movie-taxonomies {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.genre-pill {
    border: 1px solid #fff;
    color: #fff;
    padding: 4px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.movie-languages {
    font-size: 0.85rem;
    font-weight: bold;
}

.movie-ratings {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.imdb-logo {
    background: #f5c518;
    color: #000;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.binged-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #aaa;
}

.rating-badge {
    background: #a3e635;
    /* Good rating color */
    color: #000;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.8rem;
}

.streaming-box {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.95rem;
}

.streaming-platform {
    border: 1px solid var(--border-color);
    padding: 5px 20px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.movie-crew {
    font-size: 0.95rem;
    color: #aaa;
    margin-bottom: 20px;
}

.movie-crew p {
    margin: 5px 0;
}

.movie-crew strong {
    color: #fff;
    margin-right: 5px;
}

.view-all-link {
    color: #a3e635;
    font-weight: bold;
    font-size: 0.85rem;
    margin-left: 10px;
}

.movie-synopsis {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
}

/* --- Single Movie / TV Show --- */
.single-movie-layout {
    background: #111;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
}

.movie-content-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
}

.movie-poster-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.poster-trailer-link:hover .play-overlay {
    opacity: 1;
}

.play-overlay svg {
    transition: transform 0.3s ease;
}

.poster-trailer-link:hover .play-overlay svg {
    transform: scale(1.1);
}

/* Trailer Lightbox Modal */
.trailer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.trailer-modal.active {
    opacity: 1;
    visibility: visible;
}

.trailer-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.trailer-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.trailer-modal-content iframe {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Top Cast Grid */
.top-cast-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.cast-member {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cast-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.cast-info {
    display: flex;
    flex-direction: column;
}

.cast-name {
    font-weight: bold;
    color: #fff;
    font-size: 0.95rem;
}

.cast-role {
    font-size: 0.85rem;
    color: #aaa;
}

/* Responsive */
@media (max-width: 768px) {
    .movie-content-grid {
        flex-direction: column;
    }

    .movie-poster {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .cast-grid {
        grid-template-columns: 1fr;
    }

    .streaming-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Single Person Layout */
.person-content-grid {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 50px;
}

.person-photo {
    flex: 0 0 300px;
}

.person-photo img {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.person-details {
    flex: 1;
}

.person-name {
    font-size: 3rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.person-meta {
    font-size: 0.95rem;
    color: #aaa;
    margin-bottom: 20px;
}

.person-meta strong {
    color: #fff;
}

.person-bio {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.6;
}

/* Filmography Table */
.filmography-section {
    margin-top: 50px;
}

.filmography-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.filmography-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.filmography-table th {
    padding: 15px 0;
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

.filmography-table td {
    padding: 15px 0;
    border-bottom: 1px solid #222;
}

.filmography-table tr:last-child td {
    border-bottom: none;
}

/* OTT Releases Shortcode */
.ott-releases-container {
    max-width: 1000px;
    margin: 0 auto;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
}

/* Tabs */
.releases-filter-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.releases-filter-tabs span {
    color: #aaa;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 500;
}

.releases-filter-tabs span.active {
    color: #a3e635;
    /* Active green color */
    font-weight: bold;
}

.releases-filter-tabs .check-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    background: #a3e635;
    color: #000;
    border-radius: 50%;
    font-size: 0.7rem;
    margin-left: 5px;
}

/* Filters Row 1 (Pills & Icons) */
.releases-filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: #252525;
    padding: 10px 15px;
    border-radius: 8px;
}

.filter-pills {
    display: flex;
    gap: 10px;
}

.filter-pills .pill {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    background: #333;
    color: #fff;
    cursor: pointer;
    border: 1px solid #444;
    transition: all 0.3s ease;
}

.filter-pills .pill:hover {
    background: #444;
}

.filter-pills .pill.active {
    background: #fff;
    color: #000;
    font-weight: bold;
    border-color: #fff;
}

.platform-icons {
    display: flex;
    gap: 10px;
}

.platform-icons .p-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 0.6rem;
    font-weight: bold;
    cursor: pointer;
}

/* Dropdowns Row */
.releases-dropdowns {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.dropdown-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dropdown-group label {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 5px;
}

.dropdown-group select {
    background: transparent;
    border: none;
    border-bottom: 1px solid #a3e635;
    color: #a3e635;
    font-size: 0.95rem;
    padding: 5px 0;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.dropdown-group select option {
    background: #1a1a1a;
    color: #fff;
}

/* Search Bar */
.search-bar-row {
    margin-bottom: 20px;
}

.search-bar-row input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    color: #fff;
    padding: 10px 0;
    font-size: 0.95rem;
    outline: none;
}

.search-bar-row input::placeholder {
    color: #666;
}

/* Releases Table */
.releases-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.releases-table th {
    padding: 15px 0;
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
    border-bottom: 1px solid #333;
}

.releases-table td {
    padding: 15px 0;
    border-bottom: 1px solid #222;
    vertical-align: middle;
}

.releases-table tr:last-child td {
    border-bottom: none;
}

.release-item-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #fff;
}

.release-item-link img {
    width: 60px;
    height: 90px;
    border-radius: 4px;
    object-fit: cover;
}

.release-item-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: bold;
}

.rating-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    color: #000;
}

/* Rating colors based on text */
.rating-badge.must-watch {
    background: #34d399;
}

.rating-badge.good {
    background: #a3e635;
}

.rating-badge.satisfactory {
    background: #facc15;
}

.rating-badge.passable {
    background: #fb923c;
}

.rating-badge.poor {
    background: #f87171;
}

.rating-badge.skip {
    background: #52525b;
    color: #fff;
}

.date-col {
    color: #aaa;
    font-size: 0.9rem;
}

.platform-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    min-width: 120px;
    transition: background 0.3s ease;
}

.platform-btn:hover {
    background: #333;
}

.platform-btn span {
    margin-left: 10px;
}

.no-platform {
    color: #666;
    font-size: 0.85rem;
}

/* Responsive Releases Table */
@media (max-width: 768px) {
    .releases-filter-tabs {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .releases-filters-row {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .filter-pills {
        flex-wrap: wrap;
    }

    .releases-dropdowns {
        flex-direction: column;
    }

    .releases-table,
    .releases-table thead,
    .releases-table tbody,
    .releases-table th,
    .releases-table td,
    .releases-table tr {
        display: block;
    }

    .releases-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .releases-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 0;
    }

    .releases-table td.date-col,
    .releases-table td.platform-col {
        padding-left: 75px;
        margin-top: -10px;
    }

    .platform-btn {
        margin-top: 10px;
    }
}