/*
 * liveporn24 "Apple-style" dark theme (preview, opt-in via SITE_STYLE=apple).
 * A pure-CSS layer on top of the existing Bootswatch Cyborg build: no markup,
 * URL, schema or JS changes, so SEO structure stays identical.
 *
 * Design tokens follow the iOS/macOS dark "system" palette as used by
 * Framework7's iOS theme (framework7io/framework7, MIT) and the iOS 26-style
 * glass header from archisvaze/liquid-glass (MIT), reimplemented here as a few
 * CSS rules (backdrop-filter) instead of shipping those libraries.
 * Font: Inter (rsms/inter, SIL OFL 1.1). No Apple fonts, logos or assets.
 */
body.theme-apple {
    --a-bg: #000;
    --a-surface: #1c1c1e;
    --a-surface-2: #2c2c2e;
    --a-surface-3: #3a3a3c;
    --a-label: #f5f5f7;
    --a-label-2: rgba(235, 235, 245, .62);
    --a-label-3: #8e8e93;
    --a-sep: rgba(84, 84, 88, .45);
    --a-accent: #ff375f;
    --a-accent-press: #ff5c7c;
    --a-link: #2997ff;
    --a-radius: 18px;
    --a-radius-sm: 12px;
    --a-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';

    --bs-body-bg: var(--a-bg);
    --bs-body-color: var(--a-label);
    --bs-body-font-family: var(--a-font);
    --bs-font-sans-serif: var(--a-font);
    --bs-border-color: var(--a-sep);
    --bs-link-color: var(--a-link);
    --bs-link-hover-color: #69b4ff;
    --bs-secondary-color: var(--a-label-2);
    background: var(--a-bg);
    color: var(--a-label);
    font-family: var(--a-font);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.011em;
}

/* ---------- colour remaps of the Cyborg utility classes ---------- */
.theme-apple .text-success { color: var(--a-label) !important; }
.theme-apple .text-warning { color: var(--a-label-2) !important; }
.theme-apple .text-info { color: var(--a-link) !important; }
.theme-apple .text-muted { color: var(--a-label-3) !important; }
.theme-apple .text-body { color: var(--a-label-2) !important; }
.theme-apple .bg-light { background: var(--a-surface) !important; }
.theme-apple .border-warning { border-color: transparent !important; }
.theme-apple .link-my:hover,
.theme-apple .nav-link:hover,
.theme-apple .footer-link:hover { color: var(--a-label) !important; opacity: .8; }

/* ---------- glass header ---------- */
.theme-apple header.header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(22, 22, 23, .72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--a-sep);
}
.theme-apple .navbar { padding: .35rem .75rem 0; }
.theme-apple .navbar-brand img { height: 34px; width: auto; border-radius: 8px; }
.theme-apple .navbar .nav-link {
    font-size: .8125rem !important;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--a-label-2);
    padding: .5rem .9rem;
}
.theme-apple .navbar .nav-link.active { color: var(--a-label); }
.theme-apple .navbar-toggler { border: 0; padding: .4rem .5rem; }
.theme-apple .navbar-toggler:focus { box-shadow: none; }
.theme-apple .navbar-text { color: var(--a-label-3); font-weight: 500; font-size: .8125rem; }
.theme-apple .lang-switch a { color: var(--a-label); font-weight: 600; font-size: .8125rem; }

/* search: pill field like Spotlight */
.theme-apple form[action$="/search"] .form-control {
    background: var(--a-surface-2);
    color: var(--a-label);
    border: 0;
    border-radius: 999px;
    padding: .45rem 1rem;
    font-size: .9rem;
    min-width: 240px;
}
.theme-apple form[action$="/search"] .form-control::placeholder { color: var(--a-label-3); }
.theme-apple form[action$="/search"] .form-control:focus { box-shadow: 0 0 0 3px rgba(41, 151, 255, .45); }

/* buttons */
.theme-apple .btn {
    border-radius: 999px;
    font-weight: 600;
    font-size: .875rem;
    padding: .45rem 1.1rem;
    letter-spacing: -0.01em;
    transition: background-color .2s, color .2s, transform .1s;
}
.theme-apple .btn:active { transform: scale(.97); }
.theme-apple .btn-secondary { background: var(--a-surface-3); border: 0; color: var(--a-label); }
.theme-apple .btn-info { background: var(--a-accent); border: 0; color: #fff; }
.theme-apple .btn-info:hover { background: var(--a-accent-press); color: #fff; }
.theme-apple .btn-link { color: var(--a-link); text-decoration: none; }
.theme-apple .btn-outline-warning {
    background: var(--a-surface-2);
    border: 0;
    color: var(--a-label);
}
.theme-apple .btn-outline-warning:hover { background: var(--a-surface-3); color: var(--a-label); }

/* dropdowns: frosted menu */
.theme-apple .dropdown-menu {
    background: rgba(44, 44, 46, .82);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid var(--a-sep);
    border-radius: 14px;
    padding: .35rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.theme-apple .dropdown-item { border-radius: 8px; color: var(--a-label); font-size: .875rem; padding: .4rem .75rem; }
.theme-apple .dropdown-item:hover, .theme-apple .dropdown-item:focus { background: var(--a-link); color: #fff; }

/* breadcrumbs */
.theme-apple .breadcrumb { font-size: .75rem; padding: .25rem 1rem .45rem !important; margin: 0 !important; }
.theme-apple .breadcrumb a { color: var(--a-label-2); text-decoration: none; }
.theme-apple .breadcrumb-item.text-warning { color: var(--a-label) !important; }
.theme-apple .breadcrumb-item + .breadcrumb-item::before { color: var(--a-label-3); content: "›"; }

/* ---------- main layout ---------- */
.theme-apple main { padding: 0 clamp(.5rem, 2.5vw, 2.5rem); }
.theme-apple main .container-fluid > .d-flex h2,
.theme-apple main h2.link-my.fs-5.fw-bold {
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem) !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em;
    color: var(--a-label) !important;
    text-transform: none;
}
.theme-apple main .container-fluid > .d-flex.justify-content-between {
    margin: 2.75rem .5rem 1.4rem !important;
    /* On mobile the heading row is a column; flex-end would shove the title to the right. */
    align-items: flex-start !important;
    text-align: left;
    gap: .75rem;
}
.theme-apple main .container-fluid > .d-flex.justify-content-between h2 {
    margin: 0;
    align-self: flex-start !important;
    text-align: left;
    width: 100%;
}
.theme-apple main .container-fluid > .d-flex.justify-content-between .btn { margin-bottom: .2rem !important; }
@media (min-width: 576px) {
    .theme-apple main .container-fluid > .d-flex.justify-content-between { align-items: flex-end !important; }
    .theme-apple main .container-fluid > .d-flex.justify-content-between h2 { width: auto; }
}
/* "TOP VIDEOS" -> "Top videos": sentence case like apple.com section titles (visual only) */
.theme-apple main .container-fluid > .d-flex h2.link-my { text-transform: lowercase; }
.theme-apple main .container-fluid > .d-flex h2.link-my::first-letter { text-transform: uppercase; }
.theme-apple main > hr, .theme-apple main hr.mb-2 { display: none; }
.theme-apple .scroll-button {
    width: 34px; height: 34px; padding: 0 !important; font-size: .9rem !important; line-height: 34px;
    background: rgba(58, 58, 60, .85) !important; color: var(--a-label) !important;
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}

/* tag strip: soft pills */
.theme-apple .scrollable-container { padding: .75rem .5rem 0 !important; }
.theme-apple .badge.rounded-pill {
    background: var(--a-surface-2) !important;
    color: var(--a-label-2) !important;
    font-weight: 500;
    font-size: .78rem;
    padding: .45rem .85rem;
    letter-spacing: 0;
    transition: background-color .2s, color .2s;
}
.theme-apple .badge.rounded-pill:hover { background: var(--a-surface-3) !important; color: var(--a-label) !important; transform: none; }

/* video grid: fewer, bigger cards (was up to 9 per row) */
.theme-apple .row.g-2 { --bs-gutter-x: 1.25rem; --bs-gutter-y: 1.75rem; margin: 0 !important; }
@media (min-width: 992px) { .theme-apple .row-cols-xl-9 > *, .theme-apple .row-cols-lg-6 > * { flex: 0 0 auto; width: 25%; } }
@media (min-width: 1400px) { .theme-apple .row-cols-xl-9 > *, .theme-apple .row-cols-lg-6 > * { width: 20%; } }
.theme-apple .row-cols-xl-9 > .col { padding: 0 calc(var(--bs-gutter-x) * .5) !important; margin: 0 0 var(--bs-gutter-y) !important; justify-content: stretch !important; }
.theme-apple .row-cols-xl-9 > .col > a { width: 100%; }

.theme-apple .card {
    background: transparent;
    border: 0;
    border-radius: var(--a-radius);
    overflow: visible;
}
.theme-apple .card-hover-zoom { max-width: none; transition: none; }
.theme-apple .card-hover-zoom:hover { transform: none; box-shadow: none; }
.theme-apple .video-card .video-preview,
.theme-apple .card > img.img-fluid {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--a-radius) !important;
    background: var(--a-surface);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
}
.theme-apple a:hover .video-card .video-preview,
.theme-apple a:hover .card > img.img-fluid {
    transform: scale(1.025);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .6);
}
.theme-apple .video-card .list-group-item {
    background: transparent;
    border: 0;
    padding: 0 .15rem !important;
    color: var(--a-label-3);
}
.theme-apple .video-card .list-group-item:first-child { padding-top: .7rem !important; }
.theme-apple .video-card h3 {
    font-size: .95rem !important;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.012em;
    color: var(--a-label) !important;
    margin: 0 0 .3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.theme-apple .video-card .list-group-item.small { font-size: .78rem; line-height: 1.55; }

/* model / category cards */
.theme-apple .card:not(.video-card) > .list-group .list-group-item,
.theme-apple .card:not(.video-card) > .card-body { background: transparent; border: 0; color: var(--a-label); font-weight: 600; }
.theme-apple .card:not(.video-card) img.rounded { border-radius: var(--a-radius) !important; }

/* ---------- video page ---------- */
.theme-apple main .container-lg { max-width: 1180px; padding-top: 1.5rem; }
.theme-apple main .container-lg > .bg-light {
    background: transparent !important;
    padding: 0 !important;
}
.theme-apple main .container-lg > .bg-light > .card-body { align-items: flex-start !important; gap: 1rem; padding: 0 0 1.25rem; }
.theme-apple main h1.card-title {
    font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.6rem) !important;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.12;
    color: var(--a-label) !important;
}
.theme-apple .video-container {
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
}
.theme-apple main .container-lg > .card {
    background: var(--a-surface);
    border-radius: 22px !important;
    margin-top: 1.5rem;
    overflow: hidden;
}
.theme-apple main .container-lg > .card > .card-body { padding: 1.5rem 1.75rem .5rem; }
.theme-apple main .container-lg > .card h2.card-text {
    font-size: 1.0625rem !important;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.01em;
    color: var(--a-label-2) !important;
}
.theme-apple main .container-lg > .card .list-group-item:not(.video-card *) {
    background: transparent;
    border-color: var(--a-sep);
    color: var(--a-label-2);
    padding: 1rem 1.25rem;
}
.theme-apple main .container-lg > .card h3.fs-6:not(.link-my) {
    font-size: .75rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--a-label-3);
    margin-bottom: .6rem;
}
.theme-apple main .container-lg > .card a.text-info { margin-right: .9rem; font-weight: 500; }
.theme-apple main .container-lg > .card .badge.rounded-pill { margin: 0 .25rem .4rem 0; }
.theme-apple main .container-lg > .card .card-footer { background: transparent; border: 0; padding: .25rem 1.25rem 1rem; font-size: .8rem; }
.theme-apple main .container-lg > .card .card-footer .text-dark { color: var(--a-label-2) !important; }
.theme-apple main .container-lg > .card img.rounded { border-radius: 14px !important; max-width: 100% !important; height: auto !important; margin: 1rem 1rem 0 0; }
.theme-apple main .container-lg > .card hr { border-color: var(--a-sep); opacity: 1; }
@media (min-width: 992px) { .theme-apple main .container-lg .row-cols-lg-5 > * { width: 25%; } }
@media (min-width: 1200px) { .theme-apple main .container-lg .row-cols-xl-6 > * { width: 25%; } }
.theme-apple main .container-lg .row > .col { padding: 0 calc(var(--bs-gutter-x) * .5) !important; margin: 0 0 1.25rem !important; }
.theme-apple main .container-lg .row > .col > a { width: 100%; }

/* ---------- footer ---------- */
.theme-apple footer { border-top: 1px solid var(--a-sep); margin-top: 3rem; background: var(--a-surface); }
.theme-apple footer .py-3.my-4 { margin: 0 !important; padding: 1.75rem 1rem 1rem !important; }
.theme-apple footer .nav { border-color: var(--a-sep) !important; }
.theme-apple footer .nav-link { font-size: .75rem; color: var(--a-label-2) !important; }
.theme-apple footer p { font-size: .75rem; }

/* ---------- mobile ---------- */
@media (max-width: 575.98px) {
    .theme-apple .row-cols-1 > * { width: 100%; }
    .theme-apple .navbar-brand img { height: 30px; }
    .theme-apple form[action$="/search"] .form-control { min-width: 0; }
    .theme-apple main .container-lg > .card > .card-body { padding: 1.1rem 1.1rem .25rem; }
}
@media (min-width: 576px) and (max-width: 767.98px) { .theme-apple .row-cols-sm-2 > * { width: 50%; } }
@media (prefers-reduced-motion: reduce) { .theme-apple * { transition: none !important; } }

/* ---------- other pages: models, model, categories, forms, 404 ---------- */
.theme-apple .btn-outline-success {
    background: var(--a-surface-2); border: 0; color: var(--a-label-2);
    border-radius: 8px; font-weight: 600; font-size: .75rem; padding: .3rem 0 !important;
}
.theme-apple .btn-outline-success:hover, .theme-apple .btn-outline-success.active { background: var(--a-link); color: #fff; }
.theme-apple .btn-group-vertical { width: 100%; }
.theme-apple .btn-group-vertical > .btn,
.theme-apple .btn-check + .btn-outline-warning {
    background: var(--a-surface-2); color: var(--a-label-2); border: 0; border-radius: 10px !important;
    font-size: .8rem; padding: .5rem .75rem;
}
.theme-apple .btn-check:checked + .btn-outline-warning,
.theme-apple .btn-check:active + .btn-outline-warning {
    background: var(--a-accent) !important; color: #fff !important;
}
.theme-apple .btn-group-vertical { background: transparent; gap: .35rem; }
.theme-apple .col-md-3 .bg-light, .theme-apple .col-md-3 .rounded { border-radius: 14px !important; }
.theme-apple .col-md-3 h2.link-my { font-size: 1.25rem !important; letter-spacing: -0.02em; }
.theme-apple main h1.fs-4 {
    font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.6rem) !important; font-weight: 700;
    letter-spacing: -0.03em; line-height: 1.12; color: var(--a-label) !important; margin: 1.5rem 0 .6rem !important;
}
.theme-apple main p.text-body-secondary { color: var(--a-label-2) !important; font-size: 1rem; }
.theme-apple main .container > .card {
    background: var(--a-surface); border: 0; border-radius: 22px; overflow: hidden;
}
.theme-apple main .container > .card > .card-body h2.card-title { font-size: 1.3rem !important; font-weight: 650; letter-spacing: -0.02em; }
.theme-apple main .container > .card > .card-body h2 .text-warning { color: var(--a-label) !important; }
.theme-apple main .container > .card > img.rounded { border-radius: 0 !important; width: 100%; }
.theme-apple main .container > .card .card-text.text-body { color: var(--a-label-2) !important; line-height: 1.6; font-size: 1rem !important; }
.theme-apple main .container > .card .list-group-item { background: transparent; border-color: var(--a-sep); color: var(--a-label-2); padding: 1rem 1.25rem; }
.theme-apple main .container > .card h3.fs-6 { font-size: .75rem !important; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--a-label-3); }
.theme-apple main .container > .card a.badge.rounded-pill { margin: 0 .25rem .4rem 0; }
.theme-apple .text-dark { color: var(--a-label-2) !important; }
.theme-apple .form-label { font-size: .8125rem; font-weight: 600; }
.theme-apple .form-control {
    background: var(--a-surface-2); color: var(--a-label); border: 0; border-radius: 12px; padding: .65rem .9rem;
}
.theme-apple .form-control:focus { background: var(--a-surface-2); color: var(--a-label); box-shadow: 0 0 0 3px rgba(41, 151, 255, .45); }
.theme-apple .form-control::placeholder { color: var(--a-label-3); }
.theme-apple .btn-primary { background: var(--a-link); border: 0; color: #fff; }
.theme-apple .btn-primary:hover { background: #4aa8ff; }
.theme-apple .btn-outline-secondary { background: var(--a-surface-3); border: 0; color: var(--a-label); }
.theme-apple .auth-wrapper { border-radius: 24px !important; max-width: 480px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.theme-apple .auth-wrapper a:not(.btn) { color: var(--a-link); }
.theme-apple .form-text { color: var(--a-label-3) !important; }
.theme-apple main .display-1, .theme-apple main .display-4 { font-weight: 700; letter-spacing: -0.04em; }
.theme-apple .list-group-item.active { background: var(--a-accent); border-color: var(--a-accent); }
.theme-apple .page-link { background: var(--a-surface-2); border: 0; color: var(--a-label); margin: 0 .15rem; border-radius: 10px !important; }
.theme-apple .page-item.active .page-link { background: var(--a-accent); color: #fff; }
.theme-apple .page-item.disabled .page-link { background: var(--a-surface); color: var(--a-label-3); }
