/* =========================================================
   ROOT VARIABLES (Design System)
   Colors, spacing, and global settings
========================================================= */
:root {
    --bf-bg: #020617;
    --bf-surface: rgba(15, 23, 42, 0.85);
    --bf-surface-2: rgba(2, 6, 23, 0.5);
    --bf-border: rgba(148, 163, 184, 0.35);

    --bf-accent: #c8a24a;
    --bf-accent-soft: rgba(200, 162, 74, 0.16);
    --bf-accent-alt: #38bdf8;

    --bf-text-main: #f9fafb;
    --bf-text-muted: #cbd5f5;

    /* Offset for anchor scroll (navbar height compensation) */
    scroll-padding-top: 100px;
}

/* =========================================================
   GLOBAL STYLES
========================================================= */
body {
    background: radial-gradient(circle at top, #0f172a 0, #020617 45%, #000 100%);
    color: var(--bf-text-main);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
}

a {
    text-decoration: none;
}

/* =========================================================
   NAVBAR
========================================================= */
.bf-navbar {
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    z-index: 1029;
}

/* =========================================================
   PANELS & CARDS
========================================================= */

/* Glass / blurred panel */
.bf-blur-panel {
    background: var(--bf-surface);
    border-radius: 1.5rem;
    border: 1px solid var(--bf-border);
    backdrop-filter: blur(18px);
    box-shadow:
            0 22px 60px rgba(15, 23, 42, 0.9),
            0 0 0 1px rgba(15, 23, 42, 0.8);
}

/* Generic card */
.bf-card {
    height: 100%;
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(
            180deg,
            rgba(15, 23, 42, 0.65),
            rgba(2, 6, 23, 0.55)
    );
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

/* Hover effect for cards */
.bf-card:hover {
    transform: translateY(-4px);
    border-color: rgba(200, 162, 74, 0.55);
    box-shadow:
            0 22px 60px rgba(0, 0, 0, 0.45),
            0 0 0 1px rgba(200, 162, 74, 0.12);
}

/* =========================================================
   TYPOGRAPHY
========================================================= */

/* Hero main title */
.bf-hero-title {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: clamp(2.8rem, 4vw, 3.8rem);
    letter-spacing: 0.02em;
    line-height: 1.02;
}

/* Gradient text effect */
.bf-gradient-text {
    background: linear-gradient(135deg, #f9fafb, #e5e7eb, #c8a24a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Section labels (small uppercase titles) */
.bf-section-label {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bf-accent-alt);
    font-weight: 500;
}

/* Section titles */
.bf-section-title {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
}

/* Metric numbers */
.bf-metric {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 1.8rem;
}

/* Divider line */
.bf-divider {
    border-top: 1px dashed rgba(148, 163, 184, 0.4);
}

/* =========================================================
   BUTTONS
========================================================= */

/* Primary button */
.bf-btn-primary {
    --bs-btn-bg: var(--bf-accent);
    --bs-btn-border-color: var(--bf-accent);
    --bs-btn-hover-bg: #e3b762;
    --bs-btn-hover-border-color: #e3b762;
    --bs-btn-color: #020617;

    --bs-btn-padding-x: 1.4rem;
    --bs-btn-padding-y: 0.75rem;

    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 18px 40px rgba(200, 162, 74, 0.32);
}

/* Secondary / ghost button */
.bf-btn-ghost {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.8);
    color: var(--bf-text-main);
}

/* =========================================================
   BADGES & SMALL UI ELEMENTS
========================================================= */

/* Soft badge */
.bf-badge-soft {
    background: var(--bf-accent-soft);
    color: var(--bf-accent);
    border-radius: 999px;
    padding: 0.25rem 0.9rem;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Pills (small rounded labels) */
.bf-pill {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    background: rgba(2, 6, 23, 0.35);
    color: rgba(249, 250, 251, 0.92);
    font-size: 0.82rem;
    white-space: nowrap;
}

/* =========================================================
   HERO SECTION VISUAL EFFECTS
========================================================= */

/* Floating glowing orb (blue) */
.bf-hero-orb {
    position: absolute;
    inset: auto auto 0 0;
    width: 520px;
    height: 520px;
    transform: translate(-25%, 20%);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.35), transparent 60%);
    filter: blur(10px);
    pointer-events: none;
    animation: bf-orb-float 10s ease-in-out infinite;
}

/* Floating glowing orb (gold) */
.bf-hero-orb--gold {
    inset: 0 0 auto auto;
    width: 560px;
    height: 560px;
    transform: translate(35%, -25%);
    background: radial-gradient(circle, rgba(200, 162, 74, 0.28), transparent 62%);
    animation: bf-orb-float-gold 12s ease-in-out infinite;
}

/* Hero media container */
.bf-hero-media {
    border-radius: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background:
            radial-gradient(circle at top, rgba(17, 24, 39, 0.9), rgba(2, 6, 23, 0.85) 60%, #000),
            linear-gradient(135deg, rgba(200, 162, 74, 0.06), rgba(56, 189, 248, 0.05));
    overflow: hidden;
    position: relative;
}

/* Decorative grid overlay */
.bf-grid-lines {
    position: absolute;
    inset: 0;
    opacity: 0.14;
    background-image:
            linear-gradient(to right, rgba(148, 163, 184, 0.28) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(148, 163, 184, 0.22) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at 35% 40%, #000 0 55%, transparent 72%);
    pointer-events: none;
}

/* =========================================================
   ANIMATIONS
========================================================= */

/* Floating animation (blue orb) */
@keyframes bf-orb-float {
    0%, 100% {
        transform: translate(-25%, 20%) scale(1);
        opacity: 0.85;
    }
    50% {
        transform: translate(-22%, 18%) scale(1.05);
        opacity: 1;
    }
}

/* Floating animation (gold orb) */
@keyframes bf-orb-float-gold {
    0%, 100% {
        transform: translate(35%, -25%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(32%, -22%) scale(1.06);
        opacity: 1;
    }
}

/* Reveal animation (fade + slide up) */
.bf-reveal {
    opacity: 0;
    transform: translateY(10px);
    animation: bf-reveal 700ms ease forwards;
}

/* Staggered delays */
.bf-reveal.delay-1 { animation-delay: 120ms; }
.bf-reveal.delay-2 { animation-delay: 240ms; }
.bf-reveal.delay-3 { animation-delay: 360ms; }

/* Reveal keyframes */
@keyframes bf-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility: disable animations if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .bf-hero-orb,
    .bf-hero-orb--gold,
    .bf-reveal {
        animation: none !important;
    }
}

/* =========================================================
   FLOATING UI ELEMENTS
========================================================= */

/* Sticky mobile CTA */
.bf-sticky-cta {
    position: fixed;
    inset: auto 0 14px 0;
    z-index: 1030;
    pointer-events: none;
}

.bf-sticky-cta .container {
    pointer-events: auto;
}

/* Back-to-top button */
.bf-back-to-top {
    position: fixed;
    right: 16px;
    bottom: 86px;

    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;

    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(14px);

    color: var(--bf-text-main);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);

    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;

    transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
    z-index: 1031;
}

/* Visible state */
.bf-back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.bf-back-to-top:hover {
    border-color: rgba(200, 162, 74, 0.55);
}

/* Desktop adjustment */
@media (min-width: 992px) {
    .bf-back-to-top {
        bottom: 18px;
    }

    :root {
        scroll-padding-top: 80px;
    }
}

/* =========================================================
   SCROLL / INTERACTION STATES
========================================================= */

/* Centered highlighted card */
.is-centered {
    position: relative;
    background: linear-gradient(180deg, rgba(15, 23, 42, 1), rgba(2, 6, 23, 1));
    z-index: 1000 !important;
}

/* Active card (e.g., during scroll interaction) */
.is-active {
    position: relative;
    z-index: 1000 !important;
}

/* =========================================================
   GAMES GRID
========================================================= */

.games-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}

.game-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.35rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.72),
        rgba(2, 6, 23, 0.72)
    );
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    aspect-ratio: 5 / 7;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(200, 162, 74, 0.55);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(200, 162, 74, 0.12);
}

.game-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #020617;
}

.game-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background:
        linear-gradient(
            180deg,
            rgba(2, 6, 23, 0.06) 0%,
            rgba(2, 6, 23, 0.60) 55%,
            rgba(2, 6, 23, 0.88) 100%
        );
    opacity: 0;
    transition: opacity 180ms ease;
}

.game-card:hover .game-card-overlay,
.game-card:focus-within .game-card-overlay {
    opacity: 1;
}

.game-card-overlay .btn {
    transform: translateY(8px);
    transition: transform 180ms ease;
}

.game-card:hover .game-card-overlay .btn,
.game-card:focus-within .game-card-overlay .btn {
    transform: translateY(0);
}

/* Tablet */
@media (max-width: 1199.98px) {
    .games-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Small tablet / large mobile */
@media (max-width: 767.98px) {
    .games-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .game-card {
        border-radius: 1.1rem;
    }

    .game-card-overlay {
        opacity: 1;
        background:
            linear-gradient(
                180deg,
                rgba(2, 6, 23, 0.02) 0%,
                rgba(2, 6, 23, 0.28) 58%,
                rgba(2, 6, 23, 0.82) 100%
            );
    }
}

/* Mobile */
@media (max-width: 575.98px) {
    .games-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .game-card-overlay {
        padding: 0.75rem;
    }

    .game-card-overlay .btn {
        width: 100%;
    }
}

/* =========================================================
   BANNER IMAGE ANIMATION
========================================================= */

.banner-float {
    max-width: 420px;
    width: 100%;
    animation: banner-float 4s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
}

/* Floating effect */
@keyframes banner-float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.03);
    }
}

/* Optional glow pulse */
.banner-float::after {
    content: "";
}

/* Mobile */
@media (max-width: 991.98px) {
    .banner-float {
        max-width: 300px;
        margin-top: 1rem;
    }
}

.banner-float-alt {
    max-width: 420px;
    width: 100%;
    animation: banner-float-alt 5s ease-in-out infinite;
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.6));
}

@keyframes banner-float-alt {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-14px) scale(1.04) rotate(1deg);
    }
}

/* Mobile */
@media (max-width: 991.98px) {
    .banner-float-alt {
        max-width: 300px;
        margin-top: 1rem;
    }
}

/* =========================================================
   APP SECTION
========================================================= */

.bf-app-image-wrap {
    border-radius: 1.35rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background:
        radial-gradient(circle at top, rgba(17, 24, 39, 0.92), rgba(2, 6, 23, 0.88) 60%, #000),
        linear-gradient(135deg, rgba(200, 162, 74, 0.06), rgba(56, 189, 248, 0.04));
    padding: 1.25rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.bf-app-image {
    max-width: 360px;
    width: 40%;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
    animation: bf-app-float 5s ease-in-out infinite;
}

@keyframes bf-app-float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

.bf-app-feature,
.bf-app-install {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(2, 6, 23, 0.35);
    padding: 1rem;
    height: 100%;
    transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.bf-app-feature:hover,
.bf-app-install:hover {
    transform: translateY(-2px);
    border-color: rgba(200, 162, 74, 0.45);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.bf-app-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(200, 162, 74, 0.16);
    border: 1px solid rgba(200, 162, 74, 0.35);
    font-size: 1.1rem;
    line-height: 1;
}

.bf-store-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(2, 6, 23, 0.42);
    padding: 0.5rem 0.75rem;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.bf-store-badge:hover {
    transform: translateY(-2px);
    border-color: rgba(200, 162, 74, 0.45);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.bf-store-badge img {
    max-height: 52px;
    width: auto;
    display: block;
}

@media (max-width: 991.98px) {
    .bf-app-image {
        max-width: 280px;
    }
}
.bf-app-icon i {
    font-size: 1.2rem;
    color: #c8a24a;
    transition: transform 0.2s ease, color 0.2s ease;
}

.bf-app-feature:hover .bf-app-icon i {
    transform: scale(1.1);
    color: #f5d27a;
}

.bf-payment-table {
    max-width: 780px;
    width: 100%;
}

.bf-payment-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.2);
    background: rgba(2,6,23,0.45);
    margin-bottom: 10px;
}

.bf-pay-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.bf-payment-tabs .btn.active {
    background: #c8a24a;
    color: #000;
}

.bf-payment-content {
    display: none;
}

.bf-payment-content.active {
    display: block;
}

/* mobile */
@media (max-width: 768px) {
    .bf-payment-row {
        flex-wrap: wrap;
    }

    .bf-payment-row .ms-auto {
        width: 100%;
        text-align: right;
        margin-top: 6px;
    }
}

/* Glow + float эффект */
.banner-glow {
    max-width: 420px;
    width: 100%;
    animation: banner-glow 6s ease-in-out infinite;
    filter: drop-shadow(0 25px 60px rgba(200, 162, 74, 0.25));
}

@keyframes banner-glow {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 25px 60px rgba(200, 162, 74, 0.25));
    }
    50% {
        transform: translateY(-12px) scale(1.05);
        filter: drop-shadow(0 35px 80px rgba(200, 162, 74, 0.45));
    }
}

/* mobile */
@media (max-width: 991.98px) {
    .banner-glow {
        max-width: 280px;
        margin-top: 1rem;
    }
}

.bf-payment-icons img {
    width: 90px;
    height: 40px;
    object-fit: contain;
    padding: 6px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    transition: 0.2s;
}

.bf-payment-icons img:hover {
    transform: translateY(-2px);
    border-color: rgba(200,162,74,0.5);
}

.bf-sticky-cta {
    position: fixed;
    bottom: 10px;
    left: 0;
    width: 100%;
    z-index: 999;
}

.bf-sticky-cta .bf-blur-panel {
    border-radius: 16px;
    backdrop-filter: blur(10px);
}