:root {
    --midnight: #140C24;
    --deep-navy: #10153a;
    --royal-indigo: #18153f;
    --dark-violet: #201444;
    --panel-overlay: rgba(13, 15, 41, 0.75);
    --gold: #f7e6a2;
    --rich-gold: #d4aa49;
    --burnished-gold: #a1731b;
    --muted-gold: #f1d183;
    --muted-text: #cdd7ff;
    --glow: rgba(247, 230, 162, 0.2);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.games {
    max-width: 1200px;
    margin: 1.5rem auto 3rem;
    padding: 0 1.25rem;
    color: #e7ebff;
}

.games__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.games h1 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--gold) 0%, var(--rich-gold) 45%, var(--burnished-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(170, 170, 170, 0.48), 0 0 18px rgba(194, 200, 214, 0.5);
}

.games__search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.games__search-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem 0.6rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(247, 230, 162, 0.35);
    background: linear-gradient(135deg, rgba(13, 16, 44, 0.88) 0%, rgba(20, 18, 44, 0.92) 100%);
    box-shadow: inset 0 0 0 1px rgba(161, 115, 27, 0.14), 0 10px 22px rgba(6, 4, 16, 0.5);
    min-width: 260px;
}

.games__search-field:focus-within {
    border-color: rgba(247, 230, 162, 0.7);
    box-shadow: inset 0 0 0 1px rgba(161, 115, 27, 0.18), 0 12px 28px rgba(6, 4, 16, 0.65);
}

.games__search-field svg {
    width: 18px;
    height: 18px;
    fill: rgba(231, 235, 255, 0.85);
}

.games__search-field input {
    width: 100%;
    background: transparent;
    border: none;
    color: #e7ebff;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 0.1rem 0;
}

.games__search-field input::placeholder {
    color: rgba(231, 235, 255, 0.65);
}

.games__search-field input:focus {
    outline: none;
}

.game-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.35rem 1rem;
    justify-content: center;
    align-items: start;
}

.game__card {
    position: relative;
    background: linear-gradient(150deg, rgba(13, 16, 44, 0.9) 0%, rgba(28, 20, 64, 0.92) 50%, rgba(15, 21, 50, 0.95) 100%);
    border: 1px solid rgba(247, 230, 162, 0.25);
    border-radius: 18px;
    padding: 1rem;
    width: min(100%, 320px);
    min-height: 380px;
    aspect-ratio: 2.5 / 3.6;
    justify-self: center;
    box-shadow: 0 18px 40px rgba(5, 4, 15, 0.55), inset 0 0 0 1px rgba(161, 115, 27, 0.15);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.25s ease, border-color 0.2s ease, filter 0.2s ease;
    will-change: transform;
}

.game__card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    height: 100%;
}

.game__card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 20% 15%, rgba(100, 240, 170, 0.25), transparent 65%);
    opacity: 0.7;
    pointer-events: none;
    filter: blur(14px);
}

.game__card:hover,
.game__card:focus-within {
    transform: translateY(-18px) scale(1.02);
    border-color: rgba(247, 230, 162, 0.55);
    box-shadow: 0 26px 60px rgba(6, 4, 18, 0.75), inset 0 0 0 1px rgba(247, 230, 162, 0.28);
    z-index: 2;
}

.game__card__logo {
    width: 100%;
    height: 56%;
    min-height: 180px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(247, 230, 162, 0.2);
    box-shadow: 0 14px 32px rgba(6, 4, 16, 0.5);
    background: rgba(255, 255, 255, 0.04);
}

.game__card__content {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
}

.game__card__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.game__card__description__title {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
}

.game__card__description__platform {
    margin: 0;
    color: var(--muted-text);
    opacity: 0.8;
    font-size: 0.9rem;
}

.game__card__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    flex: 1;
    background: linear-gradient(135deg, var(--gold) 0%, var(--muted-gold) 50%, var(--burnished-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(170, 170, 170, 0.48), 0 0 18px rgba(194, 200, 214, 0.5);
}

.game__card__summary {
    margin: 0;
    color: rgba(231, 235, 255, 0.88);
    line-height: 1.5;
    font-size: 0.95rem;
    opacity: 0.92;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game__card__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    border-radius: 16px;
    border: 1px dashed rgba(247, 230, 162, 0.35);
    background: rgba(12, 15, 42, 0.85);
    color: var(--muted-text);
}

@media (max-width: 640px) {
    .game__card__logo {
        height: 52%;
        min-height: 150px;
    }
}