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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a1a;
    color: #e0e0e0;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(40, 20, 80, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(20, 40, 80, 0.25) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

header, .games-grid, .footer {
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 48px 32px 0;
    margin-bottom: 48px;
}

.title {
    font-size: 2.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #a78bfa, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.05rem;
    color: #888;
    font-weight: 300;
}

/* ===================== GAMES GRID ===================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    max-width: 960px;
    width: 100%;
    padding: 0 32px;
}

/* ===================== GAME CARD ===================== */
.game-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 26px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.game-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 2.2rem;
    margin-bottom: 14px;
    display: block;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #f0f0f0;
}

.card-description {
    font-size: 0.88rem;
    color: #999;
    line-height: 1.6;
    margin-bottom: 18px;
    flex: 1;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tag {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: 10px;
    background: var(--card-accent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.play-btn:hover {
    filter: brightness(1.15);
    transform: scale(1.03);
}

.play-btn .arrow {
    font-size: 1.05rem;
    transition: transform 0.2s ease;
}

.game-card:hover .play-btn .arrow {
    transform: translateX(3px);
}

/* ===================== FOOTER ===================== */
.footer {
    padding: 32px 20px;
    font-size: 0.78rem;
    color: #555;
    text-align: center;
}

/* ===================== MOBILE ===================== */
@media (max-width: 768px) {
    header {
        padding: 32px 16px 0;
        margin-bottom: 32px;
    }

    .title {
        font-size: 1.8rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }
}
