/* lrdflm Theme — Lordfilm-inspired dark cinema style */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Oswald:wght@700&display=swap');

:root {
    --bg: #141821;
    --surface: #1b2030;
    --surface-strong: #232940;
    --surface-hover: #2a3150;
    --text: #e0e3ec;
    --muted: #8a90a4;
    --line: rgba(255, 255, 255, 0.06);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --accent-blue: #3d8bfd;
    --accent-green: #4caf50;
    --kp-color: #f50;
    --imdb-color: #f5c518;
    --radius: 8px;
    --radius-lg: 12px;
    --header-bg: #0f1219;
    --footer-bg: #0c0f15;
}

body {
    margin: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; }

/* ===== Header ===== */
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    padding: 0;
    gap: 0;
}

.lf-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.site-logo {
    font-family: 'Oswald', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    flex-shrink: 0;
}

.site-logo .logo-accent {
    color: var(--accent-blue);
}

/* ===== Nav ===== */
.site-nav {
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.site-nav a {
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.site-nav a:hover {
    background: var(--surface-hover);
    color: #fff;
}

.site-nav .is-active {
    background: var(--accent-blue);
    color: #fff;
}

/* ===== Search box in header ===== */
.lf-search {
    margin-left: auto;
    display: flex;
    gap: 0;
    flex-shrink: 0;
}

.lf-search input {
    width: 220px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.lf-search input:focus {
    border-color: var(--accent-blue);
    box-shadow: none;
}

.lf-search button {
    padding: 8px 16px;
    background: var(--accent-blue);
    border: 1px solid var(--accent-blue);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background 0.2s;
}

.lf-search button:hover {
    background: #5a9dff;
    box-shadow: none;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--line);
    border-bottom: 0;
    font-size: 13px;
    color: var(--muted);
}

.site-footer__inner {
    padding: 20px 0;
}

/* ===== Breadcrumbs ===== */
.lf-breadcrumb {
    display: flex;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.lf-breadcrumb a { color: var(--accent-blue); }
.lf-breadcrumb a:hover { color: #fff; }
.lf-breadcrumb .sep { opacity: 0.5; }

/* ===== Hero / Home ===== */
.hero {
    grid-template-columns: 1fr;
    margin-bottom: 32px;
}

.hero__content {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
}

.hero__content h1 {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    color: #fff;
    margin: 0 0 12px;
}

.hero__meta {
    display: none;
}

.eyebrow {
    background: rgba(61, 139, 253, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(61, 139, 253, 0.2);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 12px;
    border-radius: 4px;
}

/* ===== Sections ===== */
.section__header h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    text-transform: uppercase;
    color: #fff;
}

.section__header p {
    color: var(--muted);
    font-size: 13px;
}

/* ===== Cards ===== */
.card-grid {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 14px;
}

.catalog-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.catalog-card__poster {
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #2a3150, #1b2030);
    position: relative;
    overflow: hidden;
}

.catalog-card__poster span {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    opacity: 0.3;
}

/* Play overlay mask on hover */
.catalog-card::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 2.5rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: var(--radius);
    z-index: 2;
}

.catalog-card:hover::after {
    opacity: 1;
}

.catalog-card__body {
    padding: 12px;
}

.catalog-card h3 {
    font-size: 0.9rem;
    margin: 6px 0 4px;
    color: #fff;
    line-height: 1.3;
}

.catalog-card p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.catalog-card__topline {
    gap: 6px;
}

.badge {
    background: rgba(61, 139, 253, 0.12);
    color: var(--accent-blue);
    border: 1px solid rgba(61, 139, 253, 0.15);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
}

.rating-line {
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
}

.rating-line span:first-child {
    color: var(--kp-color);
}

.rating-line span:last-child {
    color: var(--imdb-color);
}

/* ===== Content / Item page ===== */
.content-hero {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 0;
}

.content-poster {
    min-height: 340px;
    border-radius: var(--radius-lg);
    font-size: 5rem;
    background: linear-gradient(160deg, #2a3150, #1b2030);
    position: relative;
}

.content-main h1 {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    color: #fff;
    margin: 0 0 4px;
}

.content-subtitle {
    font-size: 0.95rem;
    color: var(--muted);
    margin: 0 0 12px;
}

.content-description {
    font-size: 14px;
    color: #bcc0d0;
    line-height: 1.7;
    margin: 0 0 16px;
}

/* ===== Meta info (Lordfilm-style list) ===== */
.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 14px;
}

.meta-chip {
    background: transparent;
    border-radius: 0;
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    font-size: 13px;
}

.meta-chip strong {
    color: var(--muted);
    font-weight: 600;
    min-width: 90px;
    flex-shrink: 0;
}

.meta-chip span {
    color: var(--text);
}

/* KP / IMDB rating badges (Lordfilm style) */
.lf-ratings {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.lf-rate {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
}

.lf-rate-kp {
    background: rgba(255, 85, 0, 0.12);
    color: var(--kp-color);
    border: 1px solid rgba(255, 85, 0, 0.2);
}

.lf-rate-kp::before {
    content: 'КП';
    font-size: 10px;
    font-weight: 600;
    opacity: 0.7;
    text-transform: uppercase;
}

.lf-rate-imdb {
    background: rgba(245, 197, 24, 0.1);
    color: var(--imdb-color);
    border: 1px solid rgba(245, 197, 24, 0.15);
}

.lf-rate-imdb::before {
    content: 'IMDb';
    font-size: 10px;
    font-weight: 600;
    opacity: 0.7;
}

/* ===== Info list (Lordfilm two-column style) ===== */
.lf-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
    margin-top: 16px;
}

.lf-info-row {
    display: flex;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.lf-info-row .label {
    color: var(--muted);
    flex-shrink: 0;
    min-width: 80px;
}

.lf-info-row .value {
    color: var(--text);
}

.lf-info-wide {
    grid-column: 1 / -1;
}

/* ===== Player section ===== */
.lf-player-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    margin: 24px 0;
    overflow: hidden;
}

.lf-player-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 16px;
    background: var(--surface-strong);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
}

.lf-player-tab {
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
}

.lf-player-tab:hover {
    color: #fff;
    background: none;
    box-shadow: none;
}

.lf-player-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
    background: none;
    box-shadow: none;
}

.lf-player-pane {
    display: none;
}

.lf-player-pane.active {
    display: block;
}

.lf-player-frame {
    aspect-ratio: 16 / 9;
    background: #000;
}

.lf-player-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.lf-player-frame .rendex-player,
.lf-player-frame .rendex-player iframe,
.lf-player-frame .rendex-player video,
.lf-player-frame .rendex-player div {
    display: block;
    width: 100%;
    height: 100%;
}

/* ===== Fallback: hide default player-card if item.php overrides it ===== */
.player-card { display: block; }

.player-tabs details {
    background: var(--surface);
    border-color: var(--line);
}

/* ===== Comments ===== */
.lf-comments {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0;
}

.lf-comments-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-item {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--line);
    border-radius: var(--radius);
    padding: 14px;
}

.comment-item__meta strong { color: #fff; }
.comment-item__meta span { color: var(--muted); font-size: 12px; }

/* ===== Related section ===== */
.lf-related {
    margin: 24px 0 0;
}

.lf-related-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 16px;
}

/* ===== Form inputs ===== */
input[type="search"],
input[type="text"],
input[type="password"],
select,
textarea {
    background: var(--surface);
    border-color: var(--line);
    color: var(--text);
    border-radius: var(--radius);
}

input[type="search"]:focus,
input[type="text"]:focus,
textarea:focus {
    border-color: var(--accent-blue);
    outline: none;
    box-shadow: 0 0 0 2px rgba(61, 139, 253, 0.15);
}

button {
    background: var(--accent-blue);
    border-radius: var(--radius);
}

button:hover {
    background: #5a9dff;
    box-shadow: 0 4px 16px rgba(61, 139, 253, 0.3);
}

/* ===== Misc overrides ===== */
.card {
    background: var(--surface);
    border-color: var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.search-inline input[type="search"] {
    border-radius: var(--radius) 0 0 var(--radius);
}

.search-inline button {
    border-radius: 0 var(--radius) var(--radius) 0;
}

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

.sidebar-stack { display: none; }

.flash--success {
    background: rgba(76, 175, 80, 0.12);
    color: #81c784;
}

.flash--error {
    background: rgba(239, 83, 80, 0.12);
    color: #ef5350;
}

.site-tagline {
    color: var(--muted);
}

/* ===== Age rating badge ===== */
.lf-age {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(239, 83, 80, 0.15);
    color: #ef5350;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
    .content-hero {
        grid-template-columns: 1fr;
    }

    .content-poster {
        min-height: 200px;
        max-width: 200px;
        margin: 0 auto;
    }

    .lf-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .lf-search {
        width: 100%;
        margin-left: 0;
    }

    .lf-search input {
        width: 100%;
    }

    .lf-info {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 480px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .lf-player-tab {
        padding: 10px 12px;
        font-size: 12px;
    }
}
