.games-list {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    list-style: none;
    margin: 24px 0;
    padding: 0;
}

.games-list li {
    background: linear-gradient(110deg, #fff, #f8fbff);
    border: 1px solid #d5e1ef;
    border-radius: 10px;
    box-shadow: 0 3px 0 #dce6f1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.games-list li:hover {
    box-shadow: 0 5px 0 #d1deed;
    transform: translateY(-2px);
}

.game-title {
    color: #315f91;
    font-family: "Comic Sans MS", sans-serif;
    font-size: 18px;
    font-weight: bold;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.game-title:hover {
    text-decoration: underline;
}

.game-meta {
    color: #5b6b7d;
    font-size: 14px;
}

.game-meta a {
    color: #315f91;
}

.play-button {
    align-items: center;
    background: linear-gradient(180deg, #5fd16d, #3fb24f);
    border: 1px solid #2e8a3b;
    border-radius: 12px;
    box-shadow: 0 4px 0 #2e8a3b;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-family: "Comic Sans MS", sans-serif;
    font-size: 22px;
    font-weight: bold;
    gap: 10px;
    margin-top: 10px;
    padding: 12px 42px;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.play-button img {
    filter: brightness(0) invert(1);
    height: 22px;
    width: 22px;
}

.play-button:hover { transform: translateY(-2px); }
.play-button:active { box-shadow: 0 1px 0 #2e8a3b; transform: translateY(2px); }
.play-button:disabled { cursor: wait; opacity: 0.7; }

.play-status {
    color: #345d8c;
    font-weight: bold;
}

.client-help {
    background: #f2f7fd;
    border: 1px solid #d5e1ef;
    border-radius: 10px;
    color: #333;
    line-height: 1.6;
    margin-top: 14px;
    padding: 12px 18px;
}

.game-description {
    margin-bottom: 4px;
}

.client-help ol {
    margin: 6px 0 4px;
}

.client-help p {
    margin: 4px 0;
}

.game-playing {
    color: #5b6b7d;
    font-size: 14px;
    font-weight: bold;
    margin: 4px 0 0;
}

.game-playing.live {
    color: #2e8a3b;
}

.game-playing.live::before {
    background: #3fb24f;
    border-radius: 50%;
    content: "";
    display: inline-block;
    height: 8px;
    margin-right: 6px;
    vertical-align: middle;
    width: 8px;
}

.client-help-note {
    color: #5b6b7d;
    font-size: 14px;
}

/* ── Games list tools ───────────────────────────────────── */
.games-tools { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }

.search-box {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    display: flex;
    gap: 8px;
    height: 42px;
    padding: 0 12px;
}

.search-box img { height: 16px; opacity: 0.55; width: 16px; }
.search-box input { border: 0; font: 15px Arial, sans-serif; min-width: 0; outline: none; width: 190px; }
.search-box:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px #d3e6fb; }

.sort-tabs {
    background: #e3ecf7;
    border-radius: 11px;
    display: flex;
    gap: 2px;
    padding: 3px;
}

.sort-tabs button {
    background: transparent;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    cursor: pointer;
    font: bold 14px/1 Arial, sans-serif;
    padding: 10px 12px;
}

.sort-tabs button[aria-selected="true"] { background: #fff; box-shadow: 0 1px 2px rgba(36, 60, 90, 0.15); color: var(--brand); }

/* ── Game page ──────────────────────────────────────────── */
.game-hero {
    align-items: stretch;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
}

.game-hero-media .game-thumb {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    height: 100%;
    max-height: 460px;
}

.game-hero-media .game-thumb.placeholder { font-size: clamp(28px, 5vw, 52px); min-height: 240px; }

.game-hero-info { display: flex; flex-direction: column; gap: 14px; }
.game-hero-top { align-items: flex-start; display: flex; gap: 10px; justify-content: space-between; }
.game-hero-info .page-title { overflow-wrap: anywhere; }
.game-creator { color: var(--brand); font-size: 15px; margin-top: 8px; }

.play-button.big { font-size: 26px; justify-content: center; margin-top: 4px; padding: 16px 20px; width: 100%; }
.play-button.big img { height: 26px; width: 26px; }

.game-stats {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 4px 0 0;
    padding-top: 14px;
}

.game-stats dt { color: var(--muted); font-size: 12px; font-weight: bold; letter-spacing: 0.06em; text-transform: uppercase; }
.game-stats dd { color: var(--ink); font: bold 18px/1.3 Arial, sans-serif; margin: 2px 0 0; }
.game-stats dd.live { color: var(--green-dark); }

.game-description { color: var(--text); font-size: 16px; line-height: 1.65; margin: 12px 0 0; white-space: pre-line; }
.game-description.empty { color: var(--muted); font-style: italic; }
.game-dates { color: var(--muted); font-size: 13px; margin: 14px 0 0; }

.private-note {
    align-items: center;
    background: #fff7dc;
    border: 1px solid #f0dc9a;
    border-radius: 10px;
    color: #6b5410;
    display: flex;
    font-size: 14px;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
}

.private-note img { height: 16px; width: 16px; }

/* ⋯ menu */
.owner-menu { flex: 0 0 auto; position: relative; }

.dots-button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    gap: 4px;
    height: 38px;
    justify-content: center;
    width: 42px;
}

.dots-button span { background: var(--brand); border-radius: 50%; height: 5px; width: 5px; }
.dots-button:hover, .dots-button[aria-expanded="true"] { background: var(--wash); }

.menu-list {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(36, 60, 90, 0.2);
    min-width: 200px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
}

.menu-list[hidden] { display: none; }

.menu-list a, .menu-list button {
    align-items: center;
    background: none;
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    font: 15px/1 Arial, sans-serif;
    gap: 10px;
    padding: 10px;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.menu-list a:hover, .menu-list button:hover, .menu-list a:focus-visible, .menu-list button:focus-visible { background: var(--wash); }
.menu-list img { filter: invert(38%) sepia(51%) saturate(650%) hue-rotate(174deg) brightness(88%) contrast(90%); height: 17px; width: 17px; }

@media (max-width: 860px) {
    .game-hero { grid-template-columns: minmax(0, 1fr); }
}

/* ── 0.8.0: favorites, likes, servers ─────────────────── */
.game-social { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.social-button {
    align-items: center; background: linear-gradient(180deg, #fff 0%, #e8e8e8 100%); border: 1px solid var(--line-strong);
    color: var(--ink); cursor: pointer; display: inline-flex; font: bold 13px Verdana, sans-serif; gap: 6px; padding: 6px 10px;
}
.social-button img { height: 16px; width: 16px; }
.social-button:hover { background: linear-gradient(180deg, #fff 0%, #dfe9f6 100%); }
.social-button[aria-pressed="true"] { background: linear-gradient(180deg, #e9f3ff 0%, #c9def7 100%); border-color: #6c98cf; }
.social-count { color: var(--muted); font-weight: normal; }
.vote-box { align-items: center; display: inline-flex; flex-wrap: wrap; gap: 6px; }
.vote-bar { background: #d9534f; display: block; flex-basis: 100%; height: 4px; }
.vote-bar span { background: #3f9b2b; display: block; height: 100%; width: 0; }
.social-note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.server-list { list-style: none; margin: 0; padding: 0; }
.server-row { align-items: center; border-top: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; padding: 10px 0; }
.server-row:first-child { border-top: 0; }
.server-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.server-old { background: #fff3cd; border: 1px solid #e0c36b; color: #7a5b00; font-size: 11px; padding: 1px 6px; width: fit-content; }
.server-players { display: flex; flex-wrap: wrap; gap: 8px; }
.server-players a { align-items: center; color: var(--ink); display: inline-flex; font-size: 12px; gap: 4px; text-decoration: none; }
.server-players a.friend { color: var(--green-dark, #2d7a1d); font-weight: bold; }
.server-players a.you { text-decoration: underline; }
.join-button { background: linear-gradient(180deg, #5cc24a 0%, #3f9b2b 100%); border: 1px solid #2d7a1d; color: #fff; cursor: pointer; font: bold 13px Verdana, sans-serif; padding: 6px 16px; }
.join-button:disabled { background: #ccc; border-color: #aaa; color: #666; cursor: default; }
