/* ── Theme variables ── */
:root {
    --bg: #f9f9f9;
    --bg-card: #ffffff;
    --text: #333333;
    --text-strong: #1c1c1c;
    --text-muted: #555555;
    --border: #e0e0e0;
    --border-dim: #dddddd;
    --input-bg: #ffffff;
    --dl-bg: #f5f5f5;
    --dl-hover: #e8e8e8;
    --focus: #1c1c1c;
}

[data-theme="dark"] {
    --bg: #121212;
    --bg-card: #1e1e1e;
    --text: #dddddd;
    --text-strong: #f0f0f0;
    --text-muted: #999999;
    --border: #333333;
    --border-dim: #3a3a3a;
    --input-bg: #252525;
    --dl-bg: #1e1e1e;
    --dl-hover: #2a2a2a;
    --focus: #aaaaaa;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Georgia', serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ── */
header {
    background-color: #1c1c1c;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-name {
    font-size: 1.4rem;
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ffffff;
    text-decoration: none;
    flex-shrink: 0;
}

nav {
    display: flex;
    gap: 28px;
    align-items: center;
    flex: 1;
}

nav > a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.2s;
    white-space: nowrap;
}

nav > a:hover,
nav > a.active { color: #ffffff; }

nav > a.active {
    border-bottom: 2px solid #ffffff;
    padding-bottom: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    margin-left: auto;
}

/* ── Language dropdown ── */
.lang-drop { position: relative; }

.lang-drop-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.65;
    transition: opacity 0.2s;
}

.lang-drop-btn:hover { opacity: 1; }

.lang-drop-btn .lang-flag { width: 24px; height: 16px; border-radius: 2px; display: block; }
.lang-drop-btn .lang-chevron { color: #aaa; transition: transform 0.15s; }
.lang-drop-btn[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }

.lang-drop-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #1c1c1c;
    border: 1px solid #333;
    border-radius: 4px;
    min-width: 128px;
    z-index: 200;
    overflow: hidden;
}

.lang-drop-menu.open { display: block; }

.lang-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #aaa;
    text-decoration: none;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    font-family: inherit;
}

.lang-opt:hover { background: #2a2a2a; color: #fff; }
.lang-opt.lang-current { color: #fff; }
.lang-opt svg { width: 22px; height: 15px; border-radius: 1px; flex-shrink: 0; }

/* ── Theme toggle ── */
.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: #aaaaaa;
    transition: color 0.2s;
}

.theme-btn:hover { color: #ffffff; }
.theme-btn svg { display: block; }

[data-theme="light"] .icon-moon,
[data-theme="dark"]  .icon-sun { display: none; }

/* ── Account icon ── */
.account-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: #aaaaaa;
    text-decoration: none;
    transition: color 0.2s;
}

.account-btn:hover { color: #ffffff; }
.account-btn-active { color: #ffffff; }
.account-btn svg { width: 22px; height: 22px; display: block; }

/* ── Hamburger ── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
    border-radius: 4px;
    transition: background 0.15s;
}

.hamburger:hover { background: rgba(255,255,255,0.08); }
.hamburger.open  { background: rgba(255,255,255,0.12); }

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 0.22s ease, opacity 0.22s ease, width 0.22s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Content area ── */
.content {
    flex: 1;
    width: 100%;          /* prevents flex column from shrink-to-content */
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 32px;
}

.content--wide {
    max-width: 1100px;
}

.content a:not([class]) {
    color: var(--text-strong);
    text-underline-offset: 3px;
}

.content h1 {
    font-size: 2.2rem;
    color: var(--text-strong);
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.content p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 680px;
    margin-bottom: 16px;
}

.content .placeholder { color: #aaa; font-style: italic; }

/* ── Footer ── */
footer {
    background-color: #1c1c1c;
    color: #888;
    padding: 24px 32px;
    font-size: 0.78rem;
    letter-spacing: 1px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-social { display: flex; align-items: center; gap: 18px; }
.footer-social a { color: #888; display: flex; align-items: center; transition: color 0.2s; }
.footer-social a:hover { color: #ccc; }

/* ── Mobile ── */
@media (max-width: 860px) {
    .hamburger { display: flex; }

    nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background-color: #1c1c1c;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.28s ease;
        box-shadow: 0 6px 16px rgba(0,0,0,0.35);
    }

    nav.open { max-height: 400px; }

    nav > a {
        padding: 14px 32px;
        border-bottom: 1px solid #2e2e2e;
        border-left: 3px solid transparent;
        width: 100%;
        transition: background 0.15s, color 0.15s;
    }

    nav > a:hover { background: rgba(255,255,255,0.06); color: #fff; }
    nav > a.active { border-left-color: #ffffff; color: #fff; border-bottom: 1px solid #2e2e2e; padding-bottom: 14px; }

    .content { padding: 40px 20px; }

    .film-item { margin-bottom: 40px; }
}

/* ── About page ── */
.about-intro {
    font-size: 1.15rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-strong);
    margin-bottom: 48px;
}

.person {
    display: flex;
    gap: 36px;
    align-items: flex-start;
    margin-bottom: 56px;
}

.person-photo { flex-shrink: 0; width: 180px; }

.person-photo img { width: 100%; height: auto; display: block; border-radius: 2px; }

.person-text h2 {
    font-size: 1.2rem;
    color: var(--text-strong);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

@media (max-width: 600px) {
    .person { flex-direction: column; }
    .person-photo { width: 140px; }
}

/* ── Account page ── */
.account-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 32px;
    max-width: 480px;
    margin-bottom: 32px;
}

.account-info p { margin-bottom: 8px; }
.account-info .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: #999; }
.account-info .value { font-size: 1rem; color: var(--text-strong); }

.btn-logout {
    background: #1c1c1c;
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s;
}

.btn-logout:hover { background: #333; }

.btn-close-account {
    background: none;
    color: #c00;
    border: 1px solid #c00;
    padding: 10px 24px;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
    margin-top: 12px;
}

.btn-close-account:hover { background: #c00; color: #fff; }

.btn-link {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    font-size: inherit;
    font-family: inherit;
}

/* ── Auth forms ── */
.auth-box { max-width: 420px; }

.auth-tabs {
    display: flex;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--border);
}

.auth-tab {
    background: none;
    border: none;
    padding: 10px 24px 10px 0;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    color: #aaa;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.auth-tab.active { color: var(--text-strong); border-bottom-color: var(--focus); }

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-form .field { margin-bottom: 18px; }

.auth-form label {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 6px;
}

.auth-form input {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1px solid var(--border-dim);
    border-radius: 2px;
    background: var(--input-bg);
    color: var(--text-strong);
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.auth-form input:focus { border-color: var(--focus); }

.btn-submit {
    background: #1c1c1c;
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s;
    margin-top: 8px;
}

.btn-submit:hover { background: #333; }

.auth-msg { margin-top: 14px; font-size: 0.88rem; color: #c00; }
.auth-msg.ok { color: #080; }

.auth-hint {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-note {
    margin-bottom: 14px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ── Contact ── */
.contact-rows {
    margin-top: 8px;
    border-top: 1px solid var(--border);
}

.contact-row {
    display: flex;
    align-items: baseline;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.contact-row-label {
    font-size: 0.68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    flex-shrink: 0;
    width: 120px;
}

.contact-row-value {
    font-size: 1rem;
    color: var(--text-strong);
}

.contact-row-value a {
    color: var(--text-strong);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1px;
    transition: border-color 0.15s;
}

.contact-row-value a:hover { border-bottom-color: var(--text-strong); }

@media (max-width: 500px) {
    .contact-row { flex-direction: column; gap: 4px; }
    .contact-row-label { width: auto; }
}

/* ── Support / donation ── */
.qr-wrap { margin: 32px 0; }

.qr-wrap img {
    display: block;
    width: 220px;
    height: 220px;
    border: 1px solid var(--border);
    border-radius: 2px;
}

.bank-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 24px 28px;
    max-width: 480px;
    margin-bottom: 28px;
}

.bank-info p { margin-bottom: 6px; }

/* ── Films page ── */

.film-item { margin-bottom: 64px; }
.film-item:last-child { margin-bottom: 0; }

.film-item h2 {
    font-size: 1rem;
    color: var(--text-strong);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.film-item h2 a { color: inherit; text-decoration: none; }
.film-item h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Responsive 16:9 embed */
.film-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 18px;
}

.film-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.film-item-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-family: inherit;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-strong);
    text-decoration: none;
    border: 1.5px solid var(--border);
    border-radius: 40px;
    padding: 10px 22px;
    margin-top: 16px;
    transition: background 0.15s, border-color 0.15s;
}

.film-item-link:hover { background: var(--border); border-color: transparent; }

/* ── Homepage production section ── */
.production-section {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.production-label {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.production-links { display: flex; flex-direction: column; gap: 8px; }

.production-item { display: flex; align-items: baseline; gap: 8px; }

.production-item a {
    color: var(--text-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.production-item .production-year { color: var(--text-muted); font-size: 0.9rem; }

/* ── Film detail page ── */
.film-detail-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 32px;
}

.film-detail-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.film-detail-meta { margin-bottom: 32px; }
.film-detail-meta h1 { margin-bottom: 6px; }

.film-status-badge {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: #1c1c1c;
    color: #fff;
    border-radius: 20px;
    padding: 4px 12px;
    margin-bottom: 20px;
}

[data-theme="dark"] .film-status-badge { background: #f0f0f0; color: #1c1c1c; }

.film-detail-desc {
    max-width: 680px;
    color: var(--text);
    line-height: 1.75;
    font-size: 0.97rem;
}

.film-detail-desc p + p { margin-top: 14px; }

.film-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    margin-top: 40px;
}

.film-gallery img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: 3px;
}

/* ── Film detail two-column layout ── */
.film-detail-body {
    display: flex;
    gap: 48px;
    align-items: start;
    margin-bottom: 0;
}

.film-detail-info {
    flex: 1;
    min-width: 0;
}

.film-detail-info .film-detail-hero { margin-bottom: 28px; }

.film-detail-info .film-detail-meta h1 {
    font-size: 2.6rem;
    line-height: 1.15;
}

.film-detail-info .film-detail-desc {
    font-size: 1.05rem;
    max-width: none;
    line-height: 1.85;
}

.film-detail-side {
    width: 380px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
}

@media (max-width: 900px) {
    .film-detail-body { flex-direction: column; }
    .film-detail-side { width: 100%; position: static; }
    .film-detail-info .film-detail-meta h1 { font-size: 2rem; }
}

/* ── Buy button ── */
.btn-buy-film {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #1c1c1c;
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 13px 30px;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 18px;
}

.btn-buy-film:hover { background: #444; }
.btn-buy-film .buy-price { font-weight: 700; font-size: 1rem; }
.btn-buy-film .buy-divider { opacity: 0.4; font-size: 0.8rem; }
.btn-buy-film .buy-label { font-size: 0.85rem; letter-spacing: 0.5px; opacity: 0.9; }

[data-theme="dark"] .btn-buy-film { background: #e8e8e8; color: #1c1c1c; }
[data-theme="dark"] .btn-buy-film:hover { background: #ccc; }

/* ── Terms ── */
.terms-body { max-width: 720px; }

.terms-body h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-strong);
    margin: 36px 0 10px;
}

.terms-body p { max-width: 720px; }

.terms-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--dl-bg);
    border: 1px solid var(--border-dim);
    padding: 10px 18px;
    font-size: 0.9rem;
    color: var(--text-strong);
    text-decoration: none;
    margin-bottom: 36px;
    transition: background 0.2s;
}

.terms-download:hover { background: var(--dl-hover); }
