:root {
    --bg-primary: #0a0a0e;
    --bg-card: #14141d;
    --text-primary: #ffffff;
    --accent: #00f0ff;
    --gradient: linear-gradient(135deg, #00f0ff 0%, #5700ff 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

header {
    position: sticky;
    top: 0;
    background-color: rgba(--bg-primary, 0.1);
    padding: 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 0 auto 3rem auto;
}

.game {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.game:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 240, 255, 0.1);
}

.image-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.game img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game:hover img {
    transform: scale(1.05);
}

.game-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game h1 {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
}

#btn {
    display: block;
    margin: 0 auto 4rem auto;
    padding: 1rem 3rem;
    border-radius: 30px;
    border: none;
    background: var(--gradient);
    color: var(--text-primary);
    cursor: pointer;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--accent);
    border-radius: 50%;
    margin: 2rem auto;
    animation: rotation 1s linear infinite;
    display: none;
}

.loader.active {
    display: block;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

body.light-mode {
    --bg-primary: #e2e8f0;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
}

.theme-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    float: right;
    margin-top: -2.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.theme-btn:hover {
    background: rgba(128, 128, 128, 0.2);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.controls input,
.controls select {
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    border: 1px solid var(--accent);
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.controls input:focus,
.controls select:focus {
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}