/* ============================================
   GAMEZONE - Custom Styles
   Bright & Modern Light Theme
   ============================================ */

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

::selection {
    background: rgba(79, 124, 255, 0.2);
    color: #1e293b;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f4ff;
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 124, 255, 0.4);
}

body {
    overflow-x: hidden;
}

/* ---- Hero Background ---- */
.hero-bg {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 124, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 0%, rgba(124, 92, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 20% 0%, rgba(255, 92, 160, 0.05) 0%, transparent 50%);
}

/* ---- Filter Buttons ---- */
.filter-btn {
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
}

.filter-btn:hover {
    color: #334155;
    background: #f0f4ff;
}

.filter-btn.active {
    color: #4f7cff;
    background: rgba(79, 124, 255, 0.08);
    border-color: rgba(79, 124, 255, 0.25);
}

/* ---- Game Card ---- */
.game-card {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
}

.game-card:hover {
    transform: translateY(-6px);
    border-color: rgba(79, 124, 255, 0.3);
    box-shadow:
        0 12px 32px rgba(79, 124, 255, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06);
    background: #ffffff;
}

/* Card Thumbnail */
.card-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f4ff;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.35s ease;
}

.game-card:hover .card-thumb img {
    transform: scale(1.08);
    filter: brightness(0.85);
}

/* Card Overlay with Play Button */
.card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0);
    transition: background 0.35s ease;
}

.game-card:hover .card-overlay {
    background: rgba(255, 255, 255, 0.35);
}

.play-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(79, 124, 255, 0);
    color: rgba(255, 255, 255, 0);
    transform: scale(0.6);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover .play-icon {
    background: #4f7cff;
    color: #ffffff;
    transform: scale(1);
    box-shadow: 0 4px 20px rgba(79, 124, 255, 0.4);
}

/* Card Badge */
.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.card-badge.action {
    background: rgba(255, 92, 160, 0.12);
    color: #e0245e;
    border: 1px solid rgba(255, 92, 160, 0.25);
}

.card-badge.racing {
    background: rgba(79, 124, 255, 0.12);
    color: #3b6cf5;
    border: 1px solid rgba(79, 124, 255, 0.25);
}

.card-badge.puzzle {
    background: rgba(124, 92, 255, 0.12);
    color: #6d3cff;
    border: 1px solid rgba(124, 92, 255, 0.25);
}

.card-badge.casual {
    background: rgba(255, 138, 76, 0.12);
    color: #e06520;
    border: 1px solid rgba(255, 138, 76, 0.25);
}

/* Card Info */
.card-info {
    padding: 14px 16px 16px;
}

.card-title {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.game-card:nth-child(1)  { animation-delay: 0.01s; }
.game-card:nth-child(2)  { animation-delay: 0.02s; }
.game-card:nth-child(3)  { animation-delay: 0.03s; }
.game-card:nth-child(4)  { animation-delay: 0.04s; }
.game-card:nth-child(5)  { animation-delay: 0.05s; }
.game-card:nth-child(6)  { animation-delay: 0.06s; }
.game-card:nth-child(7)  { animation-delay: 0.07s; }
.game-card:nth-child(8)  { animation-delay: 0.08s; }
.game-card:nth-child(9)  { animation-delay: 0.09s; }
.game-card:nth-child(10) { animation-delay: 0.10s; }
.game-card:nth-child(11) { animation-delay: 0.11s; }
.game-card:nth-child(12) { animation-delay: 0.12s; }
.game-card:nth-child(13) { animation-delay: 0.13s; }
.game-card:nth-child(14) { animation-delay: 0.14s; }
.game-card:nth-child(15) { animation-delay: 0.15s; }
.game-card:nth-child(16) { animation-delay: 0.16s; }
.game-card:nth-child(17) { animation-delay: 0.17s; }
.game-card:nth-child(18) { animation-delay: 0.18s; }
.game-card:nth-child(19) { animation-delay: 0.19s; }
.game-card:nth-child(20) { animation-delay: 0.20s; }
.game-card:nth-child(21) { animation-delay: 0.21s; }
.game-card:nth-child(22) { animation-delay: 0.22s; }
.game-card:nth-child(23) { animation-delay: 0.23s; }
.game-card:nth-child(24) { animation-delay: 0.24s; }
.game-card:nth-child(25) { animation-delay: 0.25s; }
.game-card:nth-child(26) { animation-delay: 0.26s; }
.game-card:nth-child(27) { animation-delay: 0.27s; }
.game-card:nth-child(28) { animation-delay: 0.28s; }
.game-card:nth-child(29) { animation-delay: 0.29s; }
.game-card:nth-child(30) { animation-delay: 0.30s; }
.game-card:nth-child(31) { animation-delay: 0.31s; }

/* ---- Responsive Tweaks ---- */
@media (max-width: 640px) {
    .card-thumb {
        aspect-ratio: 4 / 3;
    }

    .card-info {
        padding: 10px 12px 12px;
    }

    .card-title {
        font-size: 13px;
    }

    .card-desc {
        display: none;
    }

    .play-icon {
        width: 44px;
        height: 44px;
    }

    .play-icon svg {
        width: 6;
        height: 6;
    }
}

/* ---- Pulse Glow for Live Indicator ---- */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

.bg-brand-green.animate-pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}
