/* ============ GTA5 Serbia Top ============ */

:root {
    --bg: #0a0c11;
    --bg-alt: #0e1118;
    --surface: #141926;
    --line: rgba(255, 255, 255, 0.08);
    --text: #e8ebf2;
    --muted: #8b93a7;
    --gold: #f5b942;
    --red: #e3474f;
    --green: #46c481;
    --accent: #6c7bff;
    --radius: 16px;
    --font-head: 'Oswald', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Header ---------- */

.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: linear-gradient(to bottom, rgba(10, 12, 17, 0.92), rgba(10, 12, 17, 0));
    transition: background 0.3s, backdrop-filter 0.3s;
}

.header--scrolled,
.header--solid {
    background: rgba(10, 12, 17, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.header__nav a.is-active { color: var(--gold); }

.header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.header__logo i {
    font-style: normal;
    color: var(--gold);
}

.header__logo-badge {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(160deg, var(--red), #8c1f2c);
}

.header__nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 24px;
}

.header__nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.header__nav a:hover { color: var(--text); }

/* ---------- Dots nav ---------- */

.dots {
    position: fixed;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dots a {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.25s, transform 0.25s;
}

.dots a:hover { background: rgba(255, 255, 255, 0.45); }

.dots a.active {
    background: var(--gold);
    transform: scale(1.35);
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 130px 24px 64px;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 45% at 50% 0%, rgba(108, 123, 255, 0.16), transparent 70%),
        radial-gradient(ellipse 45% 38% at 82% 78%, rgba(227, 71, 79, 0.12), transparent 70%),
        radial-gradient(ellipse 42% 36% at 14% 70%, rgba(245, 185, 66, 0.09), transparent 70%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    max-width: 900px;
}

.hero__kicker {
    color: var(--gold);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero__title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.12;
    margin-bottom: 22px;
}

.hero__title span {
    background: linear-gradient(100deg, var(--gold), #ff8a5c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__subtitle {
    color: var(--muted);
    font-size: clamp(15px, 2vw, 19px);
    max-width: 640px;
    margin: 0 auto;
}

/* ---------- DB error ---------- */

.db-error {
    max-width: 760px;
    margin: 0 auto 80px;
    padding: 32px;
    border: 1px solid rgba(227, 71, 79, 0.4);
    border-radius: var(--radius);
    background: rgba(227, 71, 79, 0.08);
}

.db-error h2 { margin-bottom: 10px; }
.db-error a { color: var(--gold); }
.db-error code {
    display: block;
    margin-top: 14px;
    font-size: 12px;
    color: var(--muted);
    word-break: break-all;
}

/* ---------- Project section ---------- */

.project {
    min-height: 100vh;
    display: grid;
    align-items: center;
    padding: 90px 24px;
    border-top: 1px solid var(--line);
    background: var(--bg);
}

.project:nth-of-type(odd) { background: var(--bg-alt); }

.project--top {
    background:
        radial-gradient(ellipse 55% 60% at 50% 100%, rgba(245, 185, 66, 0.07), transparent 70%),
        var(--bg-alt);
}

.project__inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(30px, 5vw, 70px);
    align-items: center;
}

/* чередование сторон: чётные позиции — картинка справа */
.project:nth-of-type(even) .project__media { order: 2; }
.project:nth-of-type(even) .project__info  { order: 1; }

/* --- media --- */

.project__media {
    position: relative;
    margin-top: -36px;
}

.browser {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.project--top .browser {
    border-color: rgba(245, 185, 66, 0.35);
    box-shadow: 0 24px 80px rgba(245, 185, 66, 0.12), 0 24px 70px rgba(0, 0, 0, 0.5);
}

.browser img,
.browser .media-frame,
.browser video.media-frame {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 0;
    background: #000;
}

.browser .media-frame iframe,
.browser iframe.media-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.browser .media-frame:not(video) {
    position: relative;
}

.project__meta {
    display: flex;
    align-items: stretch;
    gap: 14px;
    margin-top: 18px;
    min-height: 176px;
}

.meta {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 16px;
}

.meta--score {
    flex: 0 0 176px;
    width: 176px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 16px;
}

.meta--score .meta__label {
    margin-bottom: 0;
    font-size: 13px;
}

.meta--score .meta__value--score {
    font-family: var(--font-head);
    font-size: 36px;
    white-space: nowrap;
}

.meta--score .meta__value--score small { font-size: 16px; }

.meta--promo {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 6px;
    padding: 16px 24px;
    font-family: var(--font-body);
    text-align: left;
    color: var(--text);
    cursor: pointer;
    border: 2px dashed rgba(245, 185, 66, 0.6);
    background:
        radial-gradient(ellipse 80% 120% at 0% 50%, rgba(245, 185, 66, 0.16), transparent 70%),
        rgba(245, 185, 66, 0.05);
    box-shadow: inset 0 0 30px rgba(245, 185, 66, 0.05);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.meta--promo::after {
    content: '⧉';
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 18px;
    color: var(--gold);
    opacity: 0.55;
    transition: opacity 0.2s;
}

.meta--promo:hover::after { opacity: 1; }

.meta--promo .meta__label {
    position: absolute;
    top: -10px;
    left: 18px;
    margin-bottom: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    background: #10131b;
    border: 1px solid rgba(245, 185, 66, 0.4);
    border-radius: 6px;
    padding: 2px 10px;
    line-height: 1.4;
}

.meta--promo:hover {
    border-color: rgba(245, 185, 66, 0.95);
    box-shadow: inset 0 0 40px rgba(245, 185, 66, 0.1), 0 0 30px rgba(245, 185, 66, 0.12);
}

/* Пустое состояние: промокодов нет */
.meta--promo-empty {
    cursor: default;
    border: 2px dashed rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
}

.meta--promo-empty::after { content: none; }

.meta--promo-empty:hover {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.meta--promo-empty .meta__label {
    color: var(--muted);
    border-color: rgba(255, 255, 255, 0.14);
}

.promo-empty-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--muted);
}

.promo-code {
    font-family: 'Consolas', 'Menlo', monospace;
    font-weight: 700;
    font-size: 38px;
    letter-spacing: 1px;
    color: var(--gold);
    line-height: 1.1;
    text-shadow: 0 0 24px rgba(245, 185, 66, 0.4);
}

.meta__note {
    font-size: 15px;
    color: #c3c9d6;
    line-height: 1.3;
    max-width: 100%;
}

.meta--promo.copied {
    border-color: var(--green);
    background: rgba(70, 196, 129, 0.1);
}

.meta--promo.copied .promo-code { color: var(--green); }

.meta__label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 4px;
}

.meta__value {
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.meta__value--chip {
    font-size: 13px;
    background: rgba(108, 123, 255, 0.15);
    color: #aeb8ff;
    padding: 3px 10px;
    border-radius: 20px;
}

.meta__value--score { color: var(--gold); }
.meta__value--score small { color: var(--muted); font-weight: 500; }

.pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(70, 196, 129, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(70, 196, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(70, 196, 129, 0); }
}

/* --- info --- */

.project__tagline {
    color: var(--gold);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.project__name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(26px, 3.4vw, 42px);
    line-height: 1.2;
    margin-bottom: 18px;
}

.project__num {
    font-family: var(--font-head);
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.35);
    margin-right: 8px;
}

.project__num--gold {
    -webkit-text-stroke: 0;
    color: var(--gold);
    text-shadow: 0 4px 24px rgba(245, 185, 66, 0.4);
}

.project__desc {
    color: var(--muted);
    font-size: 15.5px;
    margin-bottom: 26px;
}

.project__desc p { margin: 0 0 12px; }
.project__desc p:last-child { margin-bottom: 0; }
.project__desc ul,
.project__desc ol { margin: 0 0 12px; padding-left: 22px; }
.project__desc li { margin-bottom: 4px; }
.project__desc a { color: var(--gold); }
.project__desc h3,
.project__desc h4,
.project__desc h5 { color: var(--text); margin: 0 0 10px; }
.project__desc strong,
.project__desc b { color: #d5dae5; }
.project__desc img { border-radius: 10px; margin: 8px 0; }

.proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

.proscons__col {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
}

.proscons__col h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.proscons__col--pros h3 { color: var(--green); }
.proscons__col--cons h3 { color: var(--red); }

.proscons__col ul { list-style: none; }

.proscons__col li {
    position: relative;
    padding-left: 22px;
    font-size: 14px;
    color: #c3c9d6;
    margin-bottom: 8px;
}

.proscons__col li:last-child { margin-bottom: 0; }

.proscons__col li::before {
    position: absolute;
    left: 0;
    font-weight: 700;
}

.proscons__col--pros li::before { content: '+'; color: var(--green); }
.proscons__col--cons li::before { content: '–'; color: var(--red); }

.project__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.project__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 32px;
    border-radius: 13px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    color: #17120a;
    background: linear-gradient(100deg, var(--gold), #f08c3a);
    border: none;
    box-shadow: 0 8px 30px rgba(245, 185, 66, 0.25);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.project__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(245, 185, 66, 0.4);
}

.project__btn--discord {
    background: rgba(88, 101, 242, 0.16);
    border: 1px solid rgba(88, 101, 242, 0.45);
    color: #aab4ff;
    box-shadow: none;
}

.project__btn--discord:hover {
    background: rgba(88, 101, 242, 0.28);
    box-shadow: none;
}

/* ---------- Custom page ---------- */

.page {
    padding: 130px 24px 80px;
    min-height: 70vh;
}

.page__inner {
    max-width: 820px;
    margin: 0 auto;
}

.page__title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.15;
    margin-bottom: 26px;
}

.page__content {
    color: #c3c9d6;
    font-size: 16px;
    line-height: 1.7;
}

.page__content p { margin: 0 0 16px; }
.page__content h2,
.page__content h3,
.page__content h4 { color: var(--text); font-family: var(--font-head); margin: 28px 0 12px; }
.page__content ul,
.page__content ol { margin: 0 0 16px; padding-left: 24px; }
.page__content li { margin-bottom: 6px; }
.page__content a { color: var(--gold); }
.page__content img { border-radius: 12px; margin: 12px 0; max-width: 100%; }
.page__content blockquote {
    margin: 0 0 16px;
    padding: 12px 20px;
    border-left: 3px solid var(--gold);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 8px 8px 0;
}
.page__content table { width: 100%; border-collapse: collapse; margin: 0 0 16px; }
.page__content th,
.page__content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }

/* ---------- About / Footer ---------- */

.about {
    padding: 110px 24px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.about__inner { max-width: 720px; margin: 0 auto; }

.about h2 {
    font-family: var(--font-head);
    font-size: clamp(22px, 3vw, 32px);
    margin-bottom: 18px;
}

.about p { color: var(--muted); }

.footer {
    border-top: 1px solid var(--line);
    padding: 26px 24px;
}

.footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}

/* ---------- Reveal animation ---------- */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .project__inner { grid-template-columns: 1fr; }

    /* даём колонкам сжиматься уже контента, иначе meta-строка тянет ширину за экран */
    .project__media,
    .project__info { min-width: 0; }

    .project:nth-of-type(even) .project__media { order: 0; }
    .project:nth-of-type(even) .project__info  { order: 0; }

    .project { min-height: auto; padding: 70px 20px; }
    .project__media { margin-top: 0; }
    .dots { display: none; }
}

@media (max-width: 560px) {
    .header { padding: 12px 16px; }
    .header__nav { display: none; }
    .proscons { grid-template-columns: 1fr; }

    /* на узких экранах оценку и промокод ставим друг под другом */
    .project__meta { flex-direction: column; height: auto; }
    .meta--score {
        flex-basis: auto;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 14px 18px;
    }
    .meta--score .meta__value--score { font-size: 28px; }
    .meta--score .meta__value--score small { font-size: 14px; }
    .promo-code { font-size: 26px; letter-spacing: 1px; }
    .meta__note { font-size: 13px; white-space: normal; }
}
