:root {
    --bg-main: #0b0f19;
    --bg-card: #131b2e;
    --bg-card-hover: #1b2640;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #38bdf8;
    --primary-hover: #0284c7;
    --accent: #f59e0b;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --border-color: rgba(0, 0, 0, 0.08);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --accent: #d97706;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Social Badges with SVGs */
.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.social-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-badge:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.social-svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.social-badge.discord { background-color: #5865F2; }
.social-badge.youtube { background-color: #FF0000; }
.social-badge.tiktok { background-color: #000000; border: 1px solid rgba(255, 255, 255, 0.15); }
.social-badge.facebook { background-color: #1877F2; }

/* Search & Filters */
.search-box input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: 'Prompt', sans-serif;
    outline: none;
    box-shadow: var(--shadow);
}

.filter-tag {
    font-family: 'Prompt', sans-serif;
    padding: 8px 16px;
    border-radius: 9999px;
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    font-size: 0.88rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    background-color: var(--bg-card-hover);
}

.filter-tag.active {
    background-color: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.game-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
}

.card-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #1e293b;
    overflow: hidden;
    display: block;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.25s ease;
}

.card-thumbnail img.loaded {
    opacity: 1;
}

.card-thumbnail:hover img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #ea580c;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 2;
}

/* Live Player Count Badge Style */
.player-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #4ade80;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-tag {
    font-size: 0.75rem;
    color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.12);
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.play-link {
    display: block;
    text-align: center;
    background: #0284c7;
    color: #fff;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: background 0.2s;
}

.play-link:hover {
    background: #0369a1;
}
