* {
    box-sizing: border-box;
}

:root {
    --bg1: #0b1020;
    --bg2: #071029;
    --card: rgba(255, 255, 255, 0.08);
    --card2: rgba(255, 255, 255, 0.10);
    --text: #f5f7ff;
    --muted: rgba(245, 247, 255, 0.78);
    --stroke: rgba(255, 255, 255, 0.12);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --radius: 18px;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg1), var(--bg2));
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background blobs */
.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;

    /* Helps the flow read better */
    filter: saturate(1.15);

    /* Make sure it animates smoothly */
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

/* Animate the entire background layer so movement is always visible */
@media (prefers-reduced-motion: no-preference) {
    .bg-blobs {
        animation: bgLayerDrift 14s ease-in-out infinite alternate;
    }
}

@keyframes bgLayerDrift {
    0% {
        transform: translate3d(-22px, -10px, 0) scale(1.02) rotate(-0.25deg);
    }
    50% {
        transform: translate3d(18px, 14px, 0) scale(1.04) rotate(0.20deg);
    }
    100% {
        transform: translate3d(-10px, 22px, 0) scale(1.03) rotate(-0.10deg);
    }
}

.blob {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.38;

    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
}

/* Individual blob colors/positions */
.b1 {
    top: -220px;
    left: -180px;
    background: radial-gradient(circle at 30% 30%, #ff6bd6, transparent 60%);
}

.b2 {
    bottom: -260px;
    right: -220px;
    background: radial-gradient(circle at 30% 30%, #7c5cff, transparent 60%);
}

.b3 {
    top: 120px;
    right: -200px;
    background: radial-gradient(circle at 30% 30%, #34d3ff, transparent 60%);
}

/* Gentle “living” pulse per blob (not using transform drift here; the layer drifts) */
@media (prefers-reduced-motion: no-preference) {
    .b1 {
        animation: blobPulse1 6.5s ease-in-out infinite alternate;
    }
    .b2 {
        animation: blobPulse2 7.5s ease-in-out infinite alternate;
    }
    .b3 {
        animation: blobPulse3 7.0s ease-in-out infinite alternate;
    }
}

@keyframes blobPulse1 {
    0% {
        opacity: 0.34;
        transform: translate3d(0, 0, 0) scale(1.00);
    }
    100% {
        opacity: 0.42;
        transform: translate3d(0, 0, 0) scale(1.06);
    }
}

@keyframes blobPulse2 {
    0% {
        opacity: 0.32;
        transform: translate3d(0, 0, 0) scale(1.00);
    }
    100% {
        opacity: 0.40;
        transform: translate3d(0, 0, 0) scale(1.07);
    }
}

@keyframes blobPulse3 {
    0% {
        opacity: 0.33;
        transform: translate3d(0, 0, 0) scale(1.00);
    }
    100% {
        opacity: 0.41;
        transform: translate3d(0, 0, 0) scale(1.05);
    }
}

/* Headers */
.hero,
.top {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3rem 1.25rem 2rem;
}

.hero-inner,
.top-inner {
    max-width: 980px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--stroke);
    font-weight: 900;
    letter-spacing: 0.2px;
}

.hero h1,
.top h1 {
    margin: 1rem 0 0.5rem;
    font-size: clamp(2.2rem, 4vw, 3rem);
}

.hero p,
.top p {
    margin: 0 auto;
    max-width: 60ch;
    color: var(--muted);
}

/* Buttons */
.hero-actions {
    margin-top: 1.4rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.2rem;
    border-radius: 999px;
    font-weight: 1000;
    text-decoration: none;
    border: 1px solid var(--stroke);
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.18s ease, background 0.18s ease;
    min-width: 160px;
}

.btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.10);
}

.btn-primary {
    background: linear-gradient(135deg, #ff6bd6, #7c5cff);
    border-color: rgba(255, 255, 255, 0.22);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
}

.back {
    display: inline-block;
    color: rgba(245, 247, 255, 0.9);
    text-decoration: none;
    font-weight: 900;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    transition: transform 0.18s ease, background 0.18s ease;
}

.back:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.10);
}

/* Layout */
.container {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
    padding: 1rem 1.25rem 3rem;
    display: grid;
    gap: 1.25rem;
}

/* Cards */
.card,
.game-card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 1.35rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.big-card {
    padding: 1.6rem;
}

.card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
}

.card p {
    margin: 0 0 0.2rem;
    color: var(--muted);
}

.small-note {
    margin-top: 0.9rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--stroke);
    color: rgba(245, 247, 255, 0.85);
    font-weight: 700;
}

/* Mini cards (frontpage) */
.mini-cards {
    margin-top: 1.7rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.mini-card {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 0.9rem;
    border-radius: 16px;
    background: var(--card2);
    border: 1px solid var(--stroke);
}

.mini-emoji {
    font-size: 1.7rem;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    border: 1px solid var(--stroke);
}

.mini-title {
    font-weight: 1000;
    margin-bottom: 0.15rem;
}

.mini-text {
    color: var(--muted);
    font-size: 0.95rem;
}

/* Games grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.game-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, background 0.18s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    background: var(--card2);
}

.game-emoji {
    font-size: 2.1rem;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--stroke);
    margin-bottom: 0.8rem;
}

.game-title {
    font-weight: 1000;
    font-size: 1.2rem;
    margin-bottom: 0.35rem;
}

.game-desc {
    color: var(--muted);
    line-height: 1.45;
    margin-bottom: 0.9rem;
}

.play {
    font-weight: 1000;
    display: inline-block;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: rgba(255, 255, 255, 0.06);
}

/* Footer */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1.8rem 1.25rem 2.4rem;
    color: rgba(245, 247, 255, 0.7);
    font-weight: 800;
}

@media (max-width: 820px) {
    .mini-cards {
        grid-template-columns: 1fr;
    }
    .btn {
        min-width: 170px;
    }
}
