/* Landing page (home) — social-casino layout. Mobile first, desktop from 1024px. */

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/poppins-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/poppins-500-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/poppins-700-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("../fonts/poppins-800-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Poppins";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("../fonts/poppins-900-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Great Vibes";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/great-vibes-400-normal.woff2") format("woff2");
}

/* ---------- Tokens & base ---------- */

.page-landing {
    --rp-font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

    --rp-bg: #0d1c27;
    --rp-panel: #17293a;
    --rp-panel-2: #1f3547;
    --rp-panel-3: #26415690;
    --rp-line: rgba(255, 255, 255, 0.06);
    --rp-line-2: rgba(255, 255, 255, 0.1);

    --rp-text: #ffffff;
    --rp-muted: #9aadbd;
    --rp-muted-2: #6f879a;

    --rp-blue: #1475e1;
    --rp-blue-hi: #1b82f5;
    --rp-green: #1fd18b;
    --rp-green-dot: #27d17a;
    --rp-gold: #f3c33b;
    --rp-red: #ff5a5f;

    --rp-gutter: 16px;
    --rp-max: 1320px;
    --rp-radius: 14px;

    background: var(--rp-bg);
    color: var(--rp-text);
    font-family: var(--rp-font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.page-landing :focus-visible {
    outline: 2px solid var(--rp-blue-hi);
    outline-offset: 3px;
}

.page-landing .site-main {
    width: min(100% - 2 * var(--rp-gutter), var(--rp-max));
    margin-inline: auto;
    padding-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.page-landing img {
    max-width: 100%;
}

@media (min-width: 1024px) {
    .page-landing {
        --rp-gutter: 32px;
    }

    .page-landing .site-main {
        gap: 48px;
        padding-top: 24px;
    }
}

/* ---------- Buttons ---------- */

.rp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 22px;
    border: none;
    border-radius: 8px;
    font-family: var(--rp-font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.15s ease, background-color 0.15s ease;
}

.rp-btn:hover {
    filter: brightness(1.08);
}

.rp-btn:active {
    transform: translateY(1px);
}

.rp-btn[aria-busy] {
    opacity: 0.6;
    cursor: progress;
}

.rp-btn--primary {
    background: var(--rp-blue);
    color: #fff;
}

.rp-btn--ghost {
    background: var(--rp-panel-2);
    color: #fff;
}

.rp-btn--slate {
    background: #2b4357;
    color: #fff;
    height: 38px;
    font-size: 14px;
}

.rp-btn--block {
    width: 100%;
}

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

.rp-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--rp-bg);
    border-bottom: 1px solid var(--rp-line);
}

.rp-header__inner {
    width: min(100% - 2 * var(--rp-gutter), var(--rp-max));
    margin-inline: auto;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rp-logo {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    text-decoration: none;
    color: #fff;
}

.rp-logo__name {
    font-family: "Great Vibes", "Brush Script MT", "Segoe Script", cursive;
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
}

.rp-logo__tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 3px;
}

.rp-header__actions {
    display: flex;
    gap: 10px;
}

.rp-header .rp-btn {
    height: 38px;
    padding: 0 18px;
    font-size: 14px;
}

@media (min-width: 1024px) {
    .rp-header__inner {
        height: 70px;
    }

    .rp-logo__name {
        font-size: 38px;
    }

    .rp-logo__tag {
        font-size: 12px;
        margin-bottom: 4px;
    }
}

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

.rp-hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.rp-hero__card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 16px;
    padding: 36px 20px 40px;
    background:
        linear-gradient(180deg, rgba(8, 24, 54, 0.28) 0%, rgba(8, 20, 46, 0.5) 100%),
        var(--hero-bg) center / cover no-repeat,
        linear-gradient(135deg, #0f3b86 0%, #123f8f 40%, #0b2c6b 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.rp-hero__content {
    position: relative;
    max-width: 440px;
    margin-inline: auto;
    text-align: center;
}

.rp-hero__title {
    font-size: clamp(26px, 7vw, 34px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 12px rgba(3, 18, 45, 0.55), 0 1px 2px rgba(3, 18, 45, 0.6);
}

.rp-hero__cta {
    margin-top: 22px;
}

.rp-hero__or {
    margin-top: 18px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.rp-sso {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.rp-sso__btn {
    display: grid;
    place-items: center;
    width: 86px;
    height: 44px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.15s ease, transform 0.12s ease;
}

.rp-sso__btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.rp-sso__icon {
    width: 22px;
    height: 22px;
    background: #fff;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

.rp-sso__icon--facebook {
    --icon: url("../images/social/facebook.svg");
}

.rp-sso__icon--apple {
    --icon: url("../images/social/apple.svg");
}

@media (min-width: 1024px) {
    .rp-hero__card {
        min-height: 340px;
        display: grid;
        place-items: center;
        padding: 48px;
    }
}

/* ---------- Category pills ---------- */

.rp-cats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-cat {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 58px;
    padding: 0 18px;
    border-radius: 10px;
    background: var(--rp-panel);
    color: #fff;
    text-decoration: none;
    transition: background 0.15s ease;
}

.rp-cat:hover {
    background: var(--rp-panel-2);
}

.rp-cat__icon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--rp-blue);
    flex: none;
}

.rp-cat__icon--poker {
    background: #8a5cf6;
}

.rp-cat__label {
    font-size: 16px;
    font-weight: 700;
}

.rp-cat__count {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--rp-muted);
}

.rp-cat__count strong {
    color: #fff;
    font-weight: 600;
}

@media (min-width: 680px) {
    .rp-cats {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- Search ---------- */

.rp-search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 54px;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--rp-panel);
    color: var(--rp-muted);
    text-decoration: none;
    transition: background 0.15s ease;
}

.rp-search:hover {
    background: var(--rp-panel-2);
}

.rp-search__icon {
    color: var(--rp-muted);
    flex: none;
}

.rp-search__text {
    font-size: 15px;
}

.rp-search__kbd {
    margin-left: auto;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--rp-panel-2);
    font-size: 12px;
    color: var(--rp-muted);
}

/* ---------- Game shelves ---------- */

.rp-shelf {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rp-shelf__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rp-shelf__title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}

.rp-shelf__chev {
    color: var(--rp-muted);
}

.rp-shelf__icon {
    width: 22px;
    height: 22px;
    flex: none;
    background: var(--rp-gold);
    border-radius: 5px;
    -webkit-mask: var(--icon, none) center / contain no-repeat;
    mask: var(--icon, none) center / contain no-repeat;
}

.rp-shelf__icon--trending {
    background: linear-gradient(135deg, #2fd18b, #0f8a46);
}

.rp-shelf__icon--originals {
    background: linear-gradient(135deg, #ff7a59, #e23b4e);
}

.rp-shelf__icon--live {
    background: linear-gradient(135deg, #4aa3ff, #1475e1);
}

.rp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-tile {
    position: relative;
    display: block;
    text-decoration: none;
    color: #fff;
}

.rp-tile__img,
.rp-live {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    object-fit: cover;
    background: var(--rp-panel);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rp-tile:hover .rp-tile__img,
.rp-tile:hover .rp-live {
    transform: translateY(-4px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.45);
}

.rp-tile__count {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    font-size: 12px;
    color: var(--rp-muted);
}

/* Live dealer gradient tile (inner card so the count sits below it).
   Fixed height (not aspect-ratio) so a 2-3 line title can't stretch a card taller than its
   single-line neighbours — every card is identical, the title just wraps/centres inside. */
.rp-live {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px;
    aspect-ratio: auto;
    height: 156px;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    background: linear-gradient(160deg, var(--c1, #2f6df6) 0%, var(--c2, #123a9c) 100%);
}

.rp-live::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(90% 60% at 50% 15%, rgba(255, 255, 255, 0.22), transparent 70%);
}

.rp-live__studio {
    position: relative;
    z-index: 1;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.85;
}

.rp-live__title {
    position: relative;
    z-index: 1;
    font-size: clamp(15px, 2.4vw, 22px);
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
}

.rp-more {
    align-self: center;
    margin-top: 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--rp-muted);
    text-decoration: none;
}

.rp-more:hover {
    color: #fff;
}

@media (min-width: 560px) {
    .rp-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .rp-live {
        height: 168px;
    }
}

@media (min-width: 900px) {
    .rp-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .rp-live {
        height: 176px;
    }
}

@media (min-width: 1140px) {
    .rp-grid {
        grid-template-columns: repeat(8, 1fr);
    }

    .rp-live {
        height: 190px;
    }

    /* One-row shelf: as many equal columns as there are cards, no wrap, no gaps. */
    .rp-grid--row {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
    }
}

/* ---------- Live pulse dot ---------- */

.rp-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rp-green-dot);
    flex: none;
    box-shadow: 0 0 0 0 rgba(39, 209, 122, 0.6);
    animation: rp-pulse 2.2s ease-out infinite;
}

@keyframes rp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 209, 122, 0.5);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(39, 209, 122, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(39, 209, 122, 0);
    }
}

/* ---------- Races & raffles ---------- */

.rp-races {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.rp-race {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px;
    border-radius: 12px;
    background: var(--rp-panel);
}

.rp-race__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.rp-race__sub {
    margin: 6px 0 16px;
    font-size: 13px;
    color: var(--rp-muted);
}

.rp-ring {
    flex: none;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(closest-side, var(--rp-panel) 72%, transparent 73%),
        conic-gradient(var(--rp-blue) calc(var(--pct, 25) * 1%), rgba(255, 255, 255, 0.12) 0);
    text-align: center;
}

.rp-ring__label {
    font-size: 11px;
    line-height: 1.3;
    color: var(--rp-muted);
}

.rp-ring__label strong {
    font-size: 14px;
    color: #fff;
}

@media (min-width: 860px) {
    .rp-races {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- Feed / leaderboard ---------- */

.rp-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rp-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: var(--rp-panel);
    align-self: flex-start;
}

.rp-tab {
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--rp-muted);
    font-family: var(--rp-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.rp-tab.is-active {
    background: var(--rp-panel-2);
    color: #fff;
}

.rp-table {
    border-radius: 12px;
    overflow: hidden;
}

.rp-table__head,
.rp-row {
    display: grid;
    grid-template-columns: 1.4fr 1.2fr 1fr 1.1fr;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
}

.rp-table__head {
    color: var(--rp-muted);
    font-size: 13px;
    font-weight: 600;
    background: var(--rp-panel);
}

.rp-row {
    border-bottom: 1px solid var(--rp-line);
    font-size: 14px;
    animation: rp-row-in 0.4s ease;
}

.rp-row:nth-child(odd) {
    background: rgba(255, 255, 255, 0.015);
}

.rp-col-num {
    text-align: right;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rp-cell-game {
    font-weight: 600;
}

.rp-cell-user {
    color: var(--rp-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rp-cell-time {
    color: var(--rp-muted);
}

.is-win {
    color: var(--rp-green);
    font-weight: 600;
}

.is-loss {
    color: var(--rp-muted-2);
}

/* Time + Multiplier hidden on narrow screens */
.rp-table__head > :nth-child(3),
.rp-table__head > :nth-child(5),
.rp-row > :nth-child(3),
.rp-row > :nth-child(5) {
    display: none;
}

.rp-coin {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 800;
    color: #3a2a00;
    flex: none;
}

.rp-coin--g {
    background: radial-gradient(circle at 35% 30%, #ffe08a, #f3c33b 70%);
}

.rp-coin--s {
    background: radial-gradient(circle at 35% 30%, #7af0b6, #1fd18b 70%);
    color: #063a25;
    font-size: 7px;
}

@keyframes rp-row-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
}

@media (min-width: 760px) {
    .rp-table__head,
    .rp-row {
        grid-template-columns: 1.4fr 1.2fr 0.9fr 1fr 0.9fr 1.1fr;
    }

    .rp-table__head > :nth-child(3),
    .rp-table__head > :nth-child(5),
    .rp-row > :nth-child(3),
    .rp-row > :nth-child(5) {
        display: inline-flex;
    }

    .rp-table__head > :nth-child(3),
    .rp-row > :nth-child(3) {
        display: block;
        text-align: right;
    }
}

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

.rp-footer {
    margin-top: 24px;
    padding: 36px var(--rp-gutter) 48px;
    border-top: 1px solid var(--rp-line);
}

.rp-footer__inner {
    width: min(100%, 820px);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.rp-footer__copy {
    margin: 0;
    font-size: 13px;
    color: var(--rp-muted);
}

.rp-footer__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid var(--rp-line-2);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--rp-muted);
}

.rp-footer__gem {
    width: 18px;
    height: 18px;
    border: 2px solid var(--rp-muted);
    border-radius: 3px;
    transform: rotate(45deg);
}

.rp-footer__legal {
    margin: 0;
    max-width: 760px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--rp-muted-2);
}

.rp-age {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--rp-line-2);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    color: var(--rp-muted);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .rp-dot,
    .rp-row {
        animation: none;
    }
}

/* 404 page keeps the normal flow (header is sticky, not overlapping). */
.page-not-found .site-main {
    min-height: 50vh;
}
