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

body {
    font-family: Arial, sans-serif;
    background-color: #000000;
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(#0d0d0d 1px, transparent 1px),
        linear-gradient(90deg, #0d0d0d 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.2s;
}

body.no-grid::before {
    opacity: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-icon {
    width: 24px;
    height: 24px;
    color: #ffffff;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-icon:hover {
    opacity: 1;
}

.logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
}

h1 {
    font-size: 1.6em;
    font-weight: 300;
    margin: 0;
    letter-spacing: 2px;
}

.search-container {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
}

#searchInput {
    width: 100%;
    max-width: 500px;
    padding: 12px 16px;
    font-size: 14px;
    background-color: #0a0a0a;
    border: 1px solid #1a1a1a;
    color: #ffffff;
    border-radius: 6px;
    outline: none;
    transition: all 0.2s;
}

#searchInput:focus {
    border-color: #2a2a2a;
    background-color: #0f0f0f;
}

#searchInput::placeholder {
    color: #555;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 12px;
    padding: 0;
}

.game-card {
    background-color: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 0;
}

.game-card:hover {
    border-color: #2a2a2a;
    background-color: #0f0f0f;
}

.game-cover {
    width: 180px;
    height: 100px;
    object-fit: cover;
    background-color: #000;
    display: block;
    flex-shrink: 0;
    border-radius: 6px 0 0 6px;
}

.game-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-name {
    font-size: 15px;
    font-weight: 400;
    margin-bottom: 0;
    color: #ffffff;
    line-height: 1.5;
}

.game-author {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.game-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: #ff3333;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-card {
        flex-direction: column;
    }
    
    .game-cover {
        width: 100%;
        height: 160px;
        border-radius: 6px 6px 0 0;
    }
    
    .game-info {
        padding: 16px;
    }
    
    h1 {
        font-size: 1.4em;
    }
}