* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top, #2f3558, #171a2f);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    color: #e7ecff;
}

.landing {
    width: min(900px, 92vw);
    text-align: center;
}

.landing h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 5vw, 48px);
}

.landing > p {
    margin: 0 0 24px;
    color: #b8c2ef;
}

.landing-github-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(188, 204, 255, 0.32);
    background: rgba(18, 22, 44, 0.72);
    color: #d7e3ff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.landing-github-button svg {
    flex: 0 0 auto;
}

.landing-github-button:hover {
    transform: translateY(-1px);
    border-color: rgba(150, 183, 255, 0.7);
    background: rgba(29, 38, 75, 0.95);
}

/* ── Queue status panel ─────────────────────────────────── */

.hidden {
    display: none !important;
}

#queue-status {
    margin: 0 auto 20px;
    padding: 14px 22px;
    border-radius: 10px;
    border: 1px solid rgba(188, 204, 255, 0.2);
    background: rgba(18, 22, 44, 0.7);
    max-width: 520px;
}

#queue-status p {
    margin: 0;
    font-size: 15px;
    color: #c4cdf0;
    line-height: 1.5;
}

#queue-status p + p {
    margin-top: 6px;
}

.queue-rejoin-button {
    margin-top: 10px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 214, 132, 0.58);
    background: linear-gradient(180deg, rgba(255, 190, 95, 0.28), rgba(255, 165, 45, 0.2));
    color: #ffe6b0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.queue-rejoin-button:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 220, 150, 0.8);
    background: linear-gradient(180deg, rgba(255, 206, 120, 0.36), rgba(255, 175, 55, 0.28));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.queue-rejoin-button:focus-visible {
    outline: 2px solid rgba(148, 192, 255, 0.9);
    outline-offset: 2px;
}

.queue-rejoin-button:active {
    transform: translateY(0);
}

#queue-status.queue-your-turn {
    border-color: rgba(80, 200, 120, 0.5);
    background: rgba(30, 70, 50, 0.55);
}

#queue-status.queue-your-turn #queue-message {
    color: #7dffaa;
    font-weight: 600;
}

#queue-status.queue-waiting {
    border-color: rgba(255, 190, 60, 0.35);
    background: rgba(60, 45, 15, 0.45);
}

#queue-status.queue-waiting #queue-message {
    color: #ffd580;
}

/* ── Cards ───────────────────────────────────────────────── */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.card {
    display: block;
    text-align: left;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(188, 204, 255, 0.25);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(18, 22, 44, 0.8);
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, opacity 0.25s ease;
}

.card-thumbnail-wrap {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-top: 1px solid rgba(188, 204, 255, 0.2);
    background: rgba(8, 11, 24, 0.75);
}

.card-thumbnail {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.card-content {
    padding: 14px 16px 16px;
    position: relative;
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(150, 183, 255, 0.7);
    background: rgba(29, 38, 75, 0.9);
}

.card h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.card p {
    margin: 0;
}

.card.waiting {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(0.4);
}

.card.waiting:hover {
    transform: none;
    border-color: rgba(188, 204, 255, 0.25);
    background: rgba(18, 22, 44, 0.8);
}
