html, body {
    margin: 0;
    padding: 0;
    background: #1b2a4a;
    overflow-x: hidden;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: Rubik, Arial, sans-serif;
    scroll-behavior: smooth;
}

/* The game fills the first screen; the games footer waits below it. */
#stage {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
}

#game-container {
    width: 100%;
    height: 100%;
    direction: ltr;
    display: flex;
    align-items: center;
    justify-content: center;
}

#game-container canvas {
    display: block;
    touch-action: none;
}

#more-games {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(27, 42, 74, 0.75);
    color: #ffc933;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    opacity: 0.85;
}

#more-games:hover { opacity: 1; }

/* ---------- Our games ---------- */
#games-footer {
    padding: 36px 20px 28px;
    background: #14203a;
    border-top: 4px solid #ffc933;
    color: #e8edf7;
    text-align: center;
    -webkit-user-select: text;
    user-select: text;
}

#games-footer h2 {
    margin: 0 0 22px;
    color: #ffc933;
    font-size: 1.7rem;
    font-weight: 900;
}

#games-footer .games {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

#games-footer .game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 18px;
    border-radius: 20px;
    background: #1f2f52;
    border: 2px solid #2d4170;
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s;
}

#games-footer .game:hover { transform: translateY(-4px); border-color: #ffc933; }
#games-footer .game.here { border-color: #ffc933; background: #26385f; }
#games-footer .icon { font-size: 2.6rem; }
#games-footer strong { font-size: 1.25rem; color: #fff; }
#games-footer .text { font-size: 0.95rem; line-height: 1.5; color: #b9c4dc; flex: 1; }
#games-footer .go { margin-top: 4px; font-weight: 800; color: #ffc933; }
#games-footer .about { margin: 26px 0 0; font-size: 0.9rem; color: #8f9cbb; }
#games-footer .about a { color: #ffc933; text-decoration: none; }

/* ---------- Phone held upright ---------- */
#rotate {
    display: none;
    background: #1b2a4a;
    color: #fff;
    text-align: center;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    padding: 3rem 2rem;
}

#rotate .phone {
    font-size: 4rem;
    animation: turn 1.6s ease-in-out infinite;
}

@keyframes turn {
    0%, 30% { transform: rotate(0deg); }
    60%, 100% { transform: rotate(-90deg); }
}

@media (orientation: portrait) and (max-width: 900px) {
    #stage { height: 0; overflow: hidden; }
    #rotate { display: flex; }
    #app { display: flex; flex-direction: column; }
    #rotate { order: -1; }
}
