:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(17, 24, 39, 0.85);
    --accent-color: #00b4d8;
    --accent-hover: #0096c7;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --badge-bg: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: url('squardii.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: bold;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    padding: 4rem 1rem 2rem 1rem;
    text-align: center;
    background: linear-gradient(to bottom, rgba(11,15,25,0.8), rgba(11,15,25,0.95));
}

.hero h1 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.search-bar-container {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
    gap: 0.5rem;
}

#searchInput {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

#searchInput:focus {
    border-color: var(--accent-color);
}

#searchBtn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    background-color: var(--accent-color);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

#searchBtn:hover {
    background-color: var(--accent-hover);
}

/* Filter Chips */
.filter-chips {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.chip {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(30, 41, 59, 0.7);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.chip:hover, .chip.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.store-chip {
    border-color: rgba(0, 180, 216, 0.4);
}

/* Main Container & Grid */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    width: 100%;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

/* Game Card */
.game-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    backdrop-filter: blur(5px);
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 180, 216, 0.4);
}

.card-image-container {
    position: relative;
    width: 100%;
    height: 120px;
    background: #1e293b;
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: var(--badge-bg);
    color: white;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
}

.card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.game-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-pricing {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sale-price {
    font-size: 1rem;
    font-weight: bold;
    color: #4ade80;
}

.normal-price {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.get-deal-btn {
    display: block;
    width: 100%;
    padding: 0.5rem;
    text-align: center;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.get-deal-btn:hover {
    background-color: var(--accent-hover);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1.5rem;
    background: rgba(11, 15, 25, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .search-bar-container {
        flex-direction: column;
    }
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}