/* ==========================================================================
   01. Reset & tokens
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --gj-c-page: #ffffff;
    --gj-c-surface: #f3f5f8;
    --gj-c-surface-2: #e6ecf3;
    --gj-c-line: #d6dde6;
    --gj-c-line-soft: #e6ebf1;
    --gj-c-text: #1c2530;
    --gj-c-text-soft: #5a6675;
    --gj-c-muted: #8a94a3;

    --gj-c-brand: #3b6dad;
    --gj-c-brand-deep: #2f5a92;
    --gj-c-brand-soft: #d9e3f1;
    --gj-c-brand-tint: #eaf0f9;
    --gj-c-accent: #1f9bd8;
    --gj-c-warn: #c6360c;
    --gj-c-online: #2f9d54;

    --gj-radius: 3px;
    --gj-radius-md: 4px;
    --gj-shadow: 0 1px 0 rgba(28, 37, 48, 0.04);

    --gj-font: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
    --gj-font-head: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;

    --gj-fz-xs: 11px;
    --gj-fz-sm: 12px;
    --gj-fz-md: 13px;
    --gj-fz-lg: 15px;
    --gj-fz-xl: 18px;
    --gj-fz-2xl: 22px;
    --gj-fz-3xl: 28px;

    --gj-gap-xs: 4px;
    --gj-gap-sm: 8px;
    --gj-gap-md: 12px;
    --gj-gap-lg: 18px;
    --gj-gap-xl: 28px;

    --gj-page-w: 1200px;
    --gj-header-h: 50px;
}

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--gj-c-page);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: var(--gj-c-text);
    font: 400 var(--gj-fz-md)/1.5 var(--gj-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--gj-c-brand); text-decoration: none; }
a:hover { color: var(--gj-c-brand-deep); text-decoration: underline; }

img { max-width: 100%; display: block; height: auto; }
button { font: inherit; cursor: pointer; }

.gj-skip {
    position: absolute; top: -40px; left: 0; background: var(--gj-c-brand); color: #fff;
    padding: 8px 14px; z-index: 9999; transition: top .2s;
}
.gj-skip:focus { top: 0; }

.gj-shell {
    max-width: var(--gj-page-w);
    margin: 0 auto;
    padding: 0 12px;
}

.gj-sr {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   02. Header
   ========================================================================== */

.gj-mast {
    background: var(--gj-c-brand);
    color: #fff;
    border-bottom: 1px solid var(--gj-c-brand-deep);
}
.gj-mast__row {
    display: flex; align-items: center; gap: 14px;
    height: var(--gj-header-h);
    max-width: var(--gj-page-w);
    margin: 0 auto;
    padding: 0 12px;
}
.gj-mast__brand {
    color: #fff; font: 700 22px/1 var(--gj-font-head);
    letter-spacing: -.2px; flex: 0 0 auto; padding-right: 6px;
}
.gj-mast__brand:hover { color: #fff; text-decoration: none; }
.gj-mast__brand b { font-weight: 700; }
.gj-mast__brand i { font-style: normal; font-weight: 300; opacity: .92; }

.gj-mast__search {
    flex: 1 1 auto; max-width: 360px; position: relative;
}
.gj-mast__search input {
    width: 100%; height: 26px; padding: 0 28px 0 8px;
    border: 1px solid var(--gj-c-brand-deep); background: #fff;
    border-radius: 2px; font: var(--gj-fz-sm) var(--gj-font);
    color: var(--gj-c-text);
}
.gj-mast__search input::placeholder { color: var(--gj-c-muted); }
.gj-mast__search button {
    position: absolute; right: 0; top: 0;
    width: 28px; height: 26px; border: 0; background: transparent;
    color: var(--gj-c-brand); display: grid; place-items: center;
}

.gj-mast__menu {
    margin-left: auto; display: none; background: transparent; border: 0;
    color: #fff; padding: 6px;
}

/* ==========================================================================
   03. Subnav (Browse / Movies / Series / Forum)
   ========================================================================== */

.gj-subnav {
    background: var(--gj-c-surface);
    border-bottom: 1px solid var(--gj-c-line);
}
.gj-subnav__row {
    max-width: var(--gj-page-w);
    margin: 0 auto;
    padding: 0 12px;
    display: flex; gap: 18px;
    height: 30px; align-items: center;
}
.gj-subnav__link {
    color: var(--gj-c-text);
    font: 600 var(--gj-fz-md)/1 var(--gj-font);
    padding: 7px 0;
    border-bottom: 2px solid transparent;
}
.gj-subnav__link:hover { text-decoration: none; color: var(--gj-c-brand); }
.gj-subnav__link.is-current {
    color: var(--gj-c-brand-deep);
    border-bottom-color: var(--gj-c-brand);
}

/* ==========================================================================
   04. Main shell
   ========================================================================== */

.gj-main { padding: 14px 0 28px; min-height: 50vh; flex: 1 0 auto; }

.gj-page-grid {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 18px;
}

.gj-aside {
    font-size: var(--gj-fz-sm);
    color: var(--gj-c-text-soft);
}
.gj-aside-card {
    background: var(--gj-c-brand-tint);
    border: 1px solid var(--gj-c-brand-soft);
    padding: 10px 12px;
    border-radius: var(--gj-radius-md);
    line-height: 1.55;
    margin-bottom: 14px;
}
.gj-aside-card a { word-break: break-all; }

/* ==========================================================================
   05. Breadcrumbs
   ========================================================================== */

.gj-crumbs {
    padding: 12px 0 4px;
    font-size: var(--gj-fz-md);
    color: var(--gj-c-text-soft);
}
.gj-crumbs ol {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
}
.gj-crumbs li:not(:last-child)::after {
    content: "→"; padding: 0 6px; color: var(--gj-c-muted);
}
.gj-crumbs a { color: var(--gj-c-brand); }
.gj-crumbs [aria-current="page"] { color: var(--gj-c-text); }

/* ==========================================================================
   06. Footer
   ========================================================================== */

.gj-foot {
    background: var(--gj-c-surface);
    border-top: 1px solid var(--gj-c-line);
    padding: 14px 0;
    font-size: var(--gj-fz-sm);
    color: var(--gj-c-text-soft);
}
.gj-foot__row {
    max-width: var(--gj-page-w);
    margin: 0 auto;
    padding: 0 12px;
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; flex-wrap: wrap;
}
.gj-foot__brand a { color: var(--gj-c-brand); font-weight: 600; }
.gj-foot__online { display: inline-flex; align-items: center; gap: 6px; color: var(--gj-c-online); font-size: var(--gj-fz-xs); letter-spacing: .04em; text-transform: uppercase; }
.gj-foot__online::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gj-c-online); display: inline-block; }
.gj-foot__legal {
    border-top: 1px solid var(--gj-c-line-soft);
    margin-top: 12px;
    padding-top: 10px;
    line-height: 1.6;
    color: var(--gj-c-muted);
}
.gj-foot__nav { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.gj-foot__nav a { color: var(--gj-c-text-soft); }

/* ==========================================================================
   07. Section heading
   ========================================================================== */

.gj-h2 {
    font: 700 var(--gj-fz-xl)/1.25 var(--gj-font-head);
    color: var(--gj-c-text);
    margin: 18px 0 10px;
}
.gj-section + .gj-section { margin-top: 22px; }

.gj-h1 {
    font: 700 var(--gj-fz-2xl)/1.25 var(--gj-font-head);
    color: var(--gj-c-text);
    margin: 0 0 10px;
}

/* ==========================================================================
   08. Notifications & popups (engine partials)
   ========================================================================== */

.gj-notify {
    background: var(--gj-c-brand-tint);
    border-bottom: 1px solid var(--gj-c-brand-soft);
    color: var(--gj-c-text);
    font-size: var(--gj-fz-sm);
}
.gj-notify__row {
    max-width: var(--gj-page-w);
    margin: 0 auto;
    padding: 6px 12px;
    display: flex; align-items: center; gap: 10px;
}
.gj-notify__text { flex: 1 1 auto; }
.gj-notify__btn {
    background: var(--gj-c-brand); color: #fff; border: 0;
    padding: 4px 10px; border-radius: 2px; font-size: var(--gj-fz-xs);
    text-decoration: none;
}
.gj-notify__btn:hover { color: #fff; background: var(--gj-c-brand-deep); }
.gj-notify__close {
    background: transparent; border: 0; color: var(--gj-c-text-soft);
    font-size: 18px; line-height: 1; padding: 0 4px;
}

.gj-tg-popup {
    position: fixed; bottom: 18px; right: 18px;
    width: 280px; padding: 14px 16px;
    background: #fff; border: 1px solid var(--gj-c-line);
    border-radius: 6px; box-shadow: 0 4px 16px rgba(28, 37, 48, .12);
    z-index: 1500; font-size: var(--gj-fz-sm);
}
.gj-tg-popup__close {
    position: absolute; top: 4px; right: 8px;
    background: transparent; border: 0; color: var(--gj-c-muted); font-size: 18px;
}
.gj-tg-popup h4 { margin: 0 0 4px; font-size: var(--gj-fz-md); }
.gj-tg-popup p  { margin: 0 0 10px; color: var(--gj-c-text-soft); }
.gj-tg-popup a.gj-tg-popup__btn {
    display: block; text-align: center; padding: 8px;
    background: #229ED9; color: #fff; border-radius: 3px; font-weight: 600;
}
.gj-tg-popup a.gj-tg-popup__btn:hover { color: #fff; text-decoration: none; }

.gj-ad { text-align: center; margin: 12px 0; }

/* ==========================================================================
   09. Buttons
   ========================================================================== */

.gj-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 6px 12px; min-height: 28px;
    background: var(--gj-c-brand); color: #fff;
    border: 1px solid var(--gj-c-brand-deep);
    border-radius: 2px;
    font: 600 var(--gj-fz-sm)/1.2 var(--gj-font);
    text-decoration: none;
}
.gj-btn:hover { background: var(--gj-c-brand-deep); color: #fff; text-decoration: none; }
.gj-btn--ghost {
    background: #fff; color: var(--gj-c-brand);
    border-color: var(--gj-c-line);
}
.gj-btn--ghost:hover { background: var(--gj-c-brand-tint); color: var(--gj-c-brand-deep); }

.gj-pill {
    display: inline-block; padding: 1px 7px;
    background: var(--gj-c-brand);
    color: #fff;
    font: 600 var(--gj-fz-xs)/1.5 var(--gj-font);
    text-transform: uppercase;
    letter-spacing: .3px;
    border-radius: 2px;
}
.gj-pill--alt { background: var(--gj-c-warn); }
.gj-pill--mute { background: var(--gj-c-text-soft); }
