/* ============================================
   RBXPay — единая дизайн-система (тёмная тема)
   ============================================ */

:root {
    --bg: #141518;
    --bg-elevated: #1e2024;
    --bg-hover: #2c2f33;
    --bg-inset: #36393f;
    --border: #3a3d44;
    --border-light: #4f545c;

    --text: #ffffff;
    --text-secondary: #b9bbbe;
    --text-muted: #99aab5;

    --accent: #3f8cff;
    --accent-hover: #589fff;
    --green: #43b581;
    --green-hover: #4fd092;
    --red: #f04747;
    --yellow: #faa61a;

    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

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

.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

.header__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

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

.header__logo span {
    color: var(--accent);
}

.header__logo-img {
    width: 32px;
    height: 32px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav__link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s, color 0.2s;
}

.nav__link:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.nav__link--active {
    color: var(--text);
    background: var(--bg-hover);
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.burger span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.burger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 10px 20px 18px;
    flex-direction: column;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--text-secondary);
    padding: 12px 4px;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}

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

.mobile-menu a:last-child {
    border-bottom: none;
}

/* ---------- Main ---------- */

.main {
    flex: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 20px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s, border-color 0.2s;
    text-decoration: none;
}

.btn:hover {
    background: var(--bg-inset);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn--accent {
    background: var(--accent);
    border-color: var(--accent);
}

.btn--accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn--green {
    background: var(--green);
    border-color: var(--green);
}

.btn--green:hover {
    background: var(--green-hover);
    border-color: var(--green-hover);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ---------- Titles ---------- */

.section-title {
    font-size: 1.9rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Cards ---------- */

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

/* ---------- Products grid ---------- */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.product-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.product-card__img {
    height: 56px;
    width: auto;
}

.product-card__name {
    font-weight: 700;
    font-size: 1.05rem;
}

.product-card__price {
    color: var(--green);
    font-size: 1.3rem;
    font-weight: 700;
}

/* ---------- Info cards ---------- */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.info-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.info-card__icon {
    width: 46px;
    height: 46px;
    color: var(--accent);
}

.info-card__title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.4px;
}

.info-card__text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---------- Roulette ---------- */

.roulette-container {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 30px;
    text-align: center;
    margin-bottom: 48px;
    box-shadow: var(--shadow);
}

.roulette-title {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.roulette-subtitle {
    color: var(--text-muted);
    margin-bottom: 28px;
}

.roulette-wrapper {
    position: relative;
    height: 170px;
    overflow: hidden;
    border: 2px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-inset);
    margin-bottom: 24px;
}

.roulette-pointer {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 22px solid var(--accent);
    z-index: 10;
}

.roulette-pointer::after {
    content: '';
    position: absolute;
    bottom: 22px;
    left: -16px;
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-bottom: 20px solid var(--accent);
}

.roulette-strip {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    will-change: transform;
    transition: transform 5s cubic-bezier(0.15, 0.75, 0.3, 1);
}

.roulette-item {
    flex-shrink: 0;
    width: 170px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: var(--bg-hover);
    border-right: 1px solid var(--border-light);
    box-sizing: border-box;
}

.roulette-item img {
    max-height: 55%;
    max-width: 70%;
}

.roulette-item-text {
    font-weight: 700;
    color: var(--text);
    font-size: 1.15rem;
}

.roulette-win {
    color: var(--green);
    font-size: 1.35rem;
    font-weight: 700;
    min-height: 32px;
    margin-bottom: 16px;
}

/* ---------- How it works ---------- */

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.how-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.how-item__num {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.how-item__text {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* ---------- FAQ ---------- */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 48px;
}

.faq-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-item__head {
    padding: 18px 22px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.faq-item__head::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.faq-item.active .faq-item__head::after {
    transform: rotate(45deg);
}

.faq-item__body {
    display: none;
    padding: 0 22px 18px;
    color: var(--text-muted);
    line-height: 1.7;
}

.faq-item.active .faq-item__body {
    display: block;
}

/* ---------- Reviews ---------- */

.review-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-inset);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.review-nickname {
    font-weight: 700;
}

.review-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.review-body {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---------- Contacts ---------- */

.contacts-card {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.contacts-card h2 {
    margin-bottom: 24px;
}

.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contacts-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.contacts-row__label {
    color: var(--text-muted);
}

.contacts-row__value {
    font-weight: 600;
    color: var(--accent);
    word-break: break-all;
}

/* ---------- Code card (success) ---------- */

.code-card {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 32px;
}

.code-card__icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.code-card h1 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.code-card__text {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.code-value {
    font-family: 'Source Code Pro', monospace;
    font-size: 1.4rem;
    font-weight: 600;
    background: var(--bg-inset);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 24px;
    word-break: break-all;
    user-select: all;
}

.code-card .btn {
    margin-bottom: 10px;
}

.code-card__hint {
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 40px 0 24px;
    margin-top: 40px;
}

.footer__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 28px;
}

.footer__logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.footer__logo span {
    color: var(--accent);
}

.footer__text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 10px;
}

.footer__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.footer__link {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

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

.footer__bottom {
    border-top: 1px solid var(--border);
    padding-top: 18px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

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

@media (max-width: 720px) {
    .nav {
        display: none;
    }

    .burger {
        display: flex;
    }

    .main {
        padding: 24px 16px;
    }

    .roulette-container {
        padding: 28px 16px;
    }

    .roulette-item {
        width: 130px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
