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

body {
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    background: #050508;
    color: #f0f0ff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Animated background ── */
.hub-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% -20%, hsla(260, 80%, 35%, 0.25) 0%, transparent 55%),
        radial-gradient(ellipse at 0% 100%, hsla(200, 90%, 40%, 0.12) 0%, transparent 40%),
        radial-gradient(ellipse at 100% 80%, hsla(320, 70%, 35%, 0.1) 0%, transparent 40%),
        linear-gradient(180deg, #050508 0%, #0a0814 40%, #0d0a18 100%);
    z-index: 0;
}

.hub-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(hsla(220, 60%, 60%, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, hsla(220, 60%, 60%, 0.03) 1px, transparent 1px);
    background-size: 56px 56px;
    animation: gridDrift 20s linear infinite;
}

@keyframes gridDrift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 56px 56px, 56px 56px; }
}

#stars {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: orbFloat 12s ease-in-out infinite;
}

.orb-1 {
    width: 320px;
    height: 320px;
    background: hsla(260, 90%, 55%, 0.5);
    top: -80px;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 280px;
    height: 280px;
    background: hsla(200, 90%, 50%, 0.4);
    bottom: 10%;
    right: -60px;
    animation-delay: -4s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: hsla(330, 80%, 50%, 0.35);
    top: 40%;
    left: -40px;
    animation-delay: -8s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Layout ── */
.hub {
    position: relative;
    z-index: 1;
    max-width: 1040px;
    margin: 0 auto;
    padding: 40px 20px 56px;
}

/* ── Hero header ── */
.hub-header {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeUp 0.8s ease both;
}

.logo-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #00d4ff, #aa44ff, #ff3366) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin 8s linear infinite;
}

.logo-ring {
    background: linear-gradient(135deg, #00d4ff, #aa44ff, #ff3366);
    padding: 2px;
    -webkit-mask: none;
    mask: none;
    border: none;
    box-shadow: 0 0 30px hsla(260, 80%, 50%, 0.4);
}

.logo-ring::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: #0a0814;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.logo-icon {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    filter: drop-shadow(0 0 8px hsla(200, 100%, 60%, 0.8));
}

.hub-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 12px;
}

.title-line {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: 900;
    letter-spacing: 0.15em;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 0 40px hsla(260, 80%, 60%, 0.3);
}

.title-accent {
    background: linear-gradient(90deg, #00d4ff 0%, #aa44ff 50%, #ff3366 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.25em;
}

.hub-subtitle {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: hsla(0, 0%, 100%, 0.45);
    margin-bottom: 24px;
}

.hub-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-pill {
    background: hsla(260, 40%, 14%, 0.8);
    border: 1px solid hsla(260, 50%, 40%, 0.3);
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: hsla(0, 0%, 100%, 0.7);
    backdrop-filter: blur(8px);
}

.stat-num {
    color: #00d4ff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    margin-right: 4px;
}

/* ── Game grid ── */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: hsla(240, 25%, 8%, 0.75);
    border: 1px solid hsla(260, 40%, 35%, 0.25);
    border-radius: 18px;
    padding: 22px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s;
    animation: fadeUp 0.7s ease both;
}

.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.15s; }
.game-card:nth-child(3) { animation-delay: 0.2s; }
.game-card:nth-child(4) { animation-delay: 0.25s; }
.game-card:nth-child(5) { animation-delay: 0.3s; }
.game-card:nth-child(6) { animation-delay: 0.35s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-glow {
    position: absolute;
    top: -40%;
    right: -20%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent, #00d4ff) 0%, transparent 70%);
    opacity: 0.12;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: var(--accent, hsla(260, 70%, 55%, 0.6));
    box-shadow:
        0 16px 48px hsla(260, 60%, 20%, 0.4),
        0 0 0 1px hsla(260, 60%, 50%, 0.1),
        inset 0 1px 0 hsla(0, 0%, 100%, 0.06);
}

.game-card:hover .card-glow {
    opacity: 0.28;
    transform: scale(1.2);
}

.game-card:hover .play-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--accent) 40%, transparent);
}

.game-card.featured {
    grid-column: 1 / -1;
    padding: 28px 32px;
    background: linear-gradient(135deg,
        hsla(220, 40%, 10%, 0.9) 0%,
        hsla(260, 35%, 8%, 0.85) 100%);
    border-color: hsla(200, 80%, 50%, 0.35);
}

.game-card.featured .game-name {
    font-size: 1.5rem;
}

.game-card.featured .game-icon {
    font-size: 2.8rem;
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.game-icon {
    font-size: 2.4rem;
    line-height: 1;
    filter: drop-shadow(0 4px 12px hsla(0, 0%, 0%, 0.4));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover .game-icon {
    transform: scale(1.15) rotate(-5deg);
}

.game-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    color: #fff;
}

.game-desc {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    color: hsla(0, 0%, 100%, 0.5);
    margin-bottom: 18px;
}

.game-tag {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 6px;
    background: hsla(260, 40%, 20%, 0.6);
    color: var(--accent, hsla(260, 60%, 80%, 0.9));
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    white-space: nowrap;
}

.play-btn {
    align-self: flex-start;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid hsla(260, 50%, 40%, 0.4);
    background: hsla(260, 30%, 14%, 0.8);
    color: hsla(0, 0%, 100%, 0.75);
    transition: all 0.25s ease;
}

.hub-footer {
    text-align: center;
    margin-top: 48px;
    animation: fadeUp 0.8s ease 0.5s both;
}

.hub-footer p {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: hsla(0, 0%, 100%, 0.25);
}

@media (max-width: 680px) {
    .hub-grid {
        grid-template-columns: 1fr;
    }

    .game-card.featured {
        grid-column: 1;
    }

    .hub { padding: 28px 16px 40px; }
    .hub-header { margin-bottom: 32px; }
}

@media (max-width: 400px) {
    .title-line { letter-spacing: 0.08em; }
    .hub-subtitle { font-size: 0.85rem; letter-spacing: 0.12em; }
}
