/* ===================================================================
   Social Sunnyside — main stylesheet
   Design system:
     --navy        #0B132B  page background
     --panel       #1C2541  blocks / footer
     --accent      #FF6B35  call to action
     --text        #FFFFFF  headings
     --muted       #A1AAB8  secondary text
=================================================================== */

:root {
    --navy:        #0B132B;
    --navy-2:      #0E1730;
    --panel:       #1C2541;
    --panel-2:     #243056;
    --accent:      #FF6B35;
    --accent-dark: #e85a27;
    --text:        #FFFFFF;
    --muted:       #A1AAB8;
    --pill-bg:     #1C2541;
    --radius:      8px;
    --gap:         12px;
    --maxw:        1320px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--navy);
    color: var(--text);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

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

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border-radius: 6px;
    padding: 9px 18px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .2s ease, transform .15s ease, color .2s ease;
    white-space: nowrap;
}
.btn--ghost {
    background: transparent;
    border-color: rgba(255,255,255,.35);
    color: var(--text);
}
.btn--ghost:hover { background: rgba(255,255,255,.08); }
.btn--accent {
    background: var(--accent);
    color: #fff;
}
.btn--accent:hover { background: var(--accent-dark); }
.btn--lg { padding: 14px 34px; font-size: 16px; }

.icon-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--panel);
    color: var(--muted);
    border: none;
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.icon-btn:hover { color: #fff; }

/* ===================================================================
   HEADER
=================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navy-2);
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
}

/* --- Top bar (Flexbox, space-between) --- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 12px 16px;
}
.topbar__left {
    display: flex;
    align-items: center;
    gap: 26px;
}
.topbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo img { height: 30px; width: auto; }
.logo__text {
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 1px;
    color: #fff;
}

.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav__link {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    padding: 6px 0;
    position: relative;
}
.main-nav__link:hover { color: #fff; }
.main-nav__link.is-active { color: #fff; }
.main-nav__link.is-active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -14px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
}

/* search */
.search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--panel);
    border-radius: 20px;
    padding: 7px 14px;
}
.search__icon { font-size: 13px; opacity: .7; }
.search__input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
    width: 150px;
}
.search__input::placeholder { color: var(--muted); }

/* burger (mobile only) */
.burger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* --- Bottom bar: scrollable pills --- */
.tagbar {
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,.05);
}
.tagbar__track {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 10px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.tagbar__track::-webkit-scrollbar { display: none; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    background: var(--pill-bg);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background .2s, color .2s;
}
.pill:hover { color: #fff; background: var(--panel-2); }
.pill.is-active {
    background: var(--panel-2);
    color: #fff;
    border-color: rgba(255,107,53,.5);
}
.pill__ico { font-size: 14px; line-height: 1; }

/* ===================================================================
   HERO SLIDER
=================================================================== */
.hero {
    position: relative;
    width: 100%;
    max-width: 920px;     /* уже по ширине, по центру */
    margin: 22px auto 30px;
    border-radius: 14px;
    overflow: hidden;
}
.hero__track {
    display: flex;
    transition: transform .5s ease;
}
.hero__slide {
    position: relative;
    flex: 0 0 100%;
    min-height: 340px;    /* выше по высоте */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero__content {
    position: relative;
    text-align: center;          /* строго по центру */
    padding: 24px;
    max-width: 640px;
}
.hero__title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.hero__subtitle {
    font-size: 16px;
    color: #e7eaf0;
    margin: 10px 0 20px;
}

.hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(11,19,43,.45);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 3;
}
.hero__arrow:hover { background: rgba(11,19,43,.8); }
.hero__arrow--prev { left: 16px; }
.hero__arrow--next { right: 16px; }

.hero__dots {
    position: absolute;
    bottom: 14px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 3;
}
.hero__dot {
    width: 22px; height: 5px;
    border-radius: 3px;
    background: rgba(255,255,255,.4);
    border: none;
    cursor: pointer;
    transition: background .2s, width .2s;
}
.hero__dot.is-active { background: var(--accent); width: 30px; }

/* ===================================================================
   SECTION HEAD (shared by grids + jackpots)
=================================================================== */
.section-head {
    display: flex;
    align-items: center;          /* Flexbox, align-items:center */
    justify-content: space-between;
    margin: 0 0 12px;
}
.section-head__title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;     /* название заглавными */
    color: #fff;
}
.section-head__ctrl {
    display: flex;
    align-items: center;
    gap: 10px;
}
.see-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}
.see-all:hover { color: #fff; }
.arrow-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--panel);
    color: var(--muted);
    border: 1px solid rgba(255,255,255,.08);
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}
.arrow-btn:hover { background: var(--panel-2); color: #fff; }

/* ===================================================================
   GAME GRID SECTIONS
=================================================================== */
.grid-section { margin: 0 0 32px; }

.game-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);   /* 8 в ряд на десктопе */
    gap: var(--gap);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* When JS enables horizontal scrolling, cards keep a fixed width */
.game-grid.is-scrollable {
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 7 * var(--gap)) / 8);
    grid-template-columns: none;
    overflow-x: auto;
    scrollbar-width: none;
}
.game-grid.is-scrollable::-webkit-scrollbar { display: none; }

.card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 2 / 3;          /* выше — портретные карточки */
    background: var(--panel);
    cursor: pointer;
    transition: transform .2s ease;
}
.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card:hover { transform: scale(1.02); }   /* +2% при наведении */

.card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(11,19,43,.72);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity .2s ease;
    text-align: center;
    padding: 8px;
}
.card:hover .card__overlay { opacity: 1; }
.card__name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}
.card__play {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 22px;
    border-radius: 999px;
}

/* ===================================================================
   JACKPOTS (special grid of 3) — white band, matches design
=================================================================== */
.jackpots {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px 26px;
    margin: 0 0 32px;
}
.jackpots__title {
    display: flex;
    align-items: center;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #14213d;
    margin: 0 0 16px;
}
.jackpots__title::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #14213d;
    margin-right: 10px;
}
.jackpots__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.jcard {
    background: #fff;
    color: #14213d;
    border: 1px solid #e7e9f0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(20,33,61,.05);
}
.jcard__top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 16px 12px;
}
.jcard__thumb {
    width: 64px; height: 64px;
    border-radius: 8px;
    object-fit: cover;
    flex: 0 0 auto;
}
.jcard__info { text-align: left; }       /* выравнивание по левому краю */
.jcard__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #9098a8;
}
.jcard__amount {
    font-size: 22px;
    font-weight: 800;
    color: #14213d;
    line-height: 1.15;
    margin: 3px 0;
}
.jcard__min {
    font-size: 13px;
    font-weight: 700;
    color: #1f2a44;
}
.jcard__desc {
    font-size: 12px;
    line-height: 1.45;
    color: #9098a8;
    margin-top: 6px;
}
.jcard__mini {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 4px 16px 16px;
}
.jcard__mini img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
}
.jcard__btn {
    margin-top: auto;
    background: #14213d;
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .5px;
    padding: 15px;
    width: 100%;
}
.jcard__btn:hover { background: #1d2c4d; }

/* ===================================================================
   SEO BLOCK
=================================================================== */
.seo {
    background: #fff;
    color: #2a2f3a;
    border-radius: 12px;
    padding: 30px 34px;
    margin: 10px 0 36px;
    text-align: left;
}
.seo h2 {
    color: #0B132B;
    font-size: 20px;
    margin: 22px 0 8px;
}
.seo h2:first-child { margin-top: 0; }
.seo p {
    font-size: 14px;
    line-height: 1.65;
    color: #4a5160;
    max-width: 980px;
}

/* ===================================================================
   FOOTER
=================================================================== */
.footer {
    background: var(--navy-2);
    padding: 40px 0 28px;
    margin-top: 10px;
}
.footer__cols {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    text-align: left;
}
.footer__title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
}
.footer__link {
    display: block;
    font-size: 13px;
    color: var(--muted);
    padding: 5px 0;
}
.footer__link:hover { color: #fff; }

.footer__divider {
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: 28px 0 20px;
}
.footer__legal { text-align: left; }
.footer__legal p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
    max-width: 1000px;
}
.footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
    text-align: center;
}
.footer__badges {
    display: flex;
    align-items: center;
    gap: 16px;
}
.footer__badges img { height: 34px; width: auto; opacity: .9; }
.footer__copy { font-size: 12px; color: var(--muted); }

/* ===================================================================
   AUTH MODAL (popup)
=================================================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}
.modal.is-open { display: block; }

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 19, 43, .6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.modal__dialog {
    position: relative;
    z-index: 1;
    width: min(460px, 92vw);
    margin: 6vh auto 0;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
    animation: modalIn .25s ease;
}
@keyframes modalIn {
    from { transform: translateY(14px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

.modal__head {
    background: var(--accent);
    color: #fff;
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.modal__title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.modal__sub {
    font-size: 14px;
    margin-top: 6px;
    color: rgba(255, 255, 255, .92);
}
.modal__close {
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.modal__tabs {
    display: flex;
    border-bottom: 1px solid #e7e9f0;
}
.modal__tab {
    flex: 1;
    background: none;
    border: none;
    padding: 16px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #9098a8;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color .2s, border-color .2s;
}
.modal__tab.is-active {
    color: var(--panel);
    border-bottom-color: var(--panel);
}

.modal__body { padding: 22px 24px 26px; }
.modal__form.is-hidden { display: none; }

.field { display: block; margin-bottom: 16px; }
.field__label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--panel);
    margin-bottom: 8px;
}
.field input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d7dbe6;
    border-radius: 8px;
    font-size: 15px;
    color: #14213d;
    outline: none;
    transition: border-color .2s;
}
.field input::placeholder { color: #a9b0c0; }
.field input:focus { border-color: var(--accent); }

.modal__submit {
    width: 100%;
    padding: 16px;
    font-size: 15px;
    letter-spacing: .5px;
    margin-top: 4px;
}
.modal__terms {
    text-align: center;
    font-size: 13px;
    color: #9098a8;
    margin-top: 16px;
    line-height: 1.5;
}

/* ===================================================================
   RESPONSIVE
=================================================================== */

/* Tablets — 6 columns */
@media (max-width: 1024px) {
    .game-grid { grid-template-columns: repeat(6, 1fr); }
    .game-grid.is-scrollable { grid-auto-columns: calc((100% - 5 * var(--gap)) / 6); }
    .jackpots__grid { grid-template-columns: 1fr; }
    .footer__cols { grid-template-columns: repeat(3, 1fr); }
    .hero__title { font-size: 32px; }
    .main-nav { gap: 16px; }
    .search__input { width: 110px; }
}

/* Smaller tablets — 4 columns */
@media (max-width: 860px) {
    .game-grid { grid-template-columns: repeat(4, 1fr); }
    .game-grid.is-scrollable { grid-auto-columns: calc((100% - 3 * var(--gap)) / 4); }
}

/* Mobile — burger menu, 2 columns, 1-col footer */
@media (max-width: 768px) {
    .burger { display: block; order: -1; }

    .main-nav {
        display: none;             /* спрятать ссылки */
        position: absolute;
        top: 60px; left: 0; right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--panel);
        padding: 8px 16px;
        box-shadow: 0 12px 24px rgba(0,0,0,.4);
    }
    .main-nav.is-open { display: flex; }
    .main-nav__link { width: 100%; padding: 12px 0; }
    .main-nav__link.is-active::after { display: none; }

    .topbar__left { gap: 12px; }
    .search { display: none; }

    .game-grid { grid-template-columns: repeat(2, 1fr); }   /* 2 колонки */
    .game-grid.is-scrollable { grid-auto-columns: calc((100% - 1 * var(--gap)) / 2); }

    .footer__cols { grid-template-columns: 1fr; }            /* 1 колонка */

    .hero__slide { min-height: 180px; }
    .hero__title { font-size: 24px; }
    .hero__subtitle { font-size: 13px; }
    .hero__arrow { width: 36px; height: 36px; }
}
