/* ============================================================
   Fullscreen control (main menu)
   ============================================================ */

.fullscreen-btn {
    position: absolute;
    top: calc(10px + var(--safe-t));
    right: calc(10px + var(--safe-r));
    z-index: 120;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    max-width: min(46vw, 220px);
    padding: 8px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--glass);
    color: var(--text);
    font-size: clamp(9px, min(2.9vw, 1.6vh), 12px);
    font-weight: 600;
    letter-spacing: 1.5px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.fullscreen-btn:hover {
    background: rgba(0, 180, 255, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.fullscreen-btn:active {
    transform: scale(0.94);
}

.fullscreen-btn.active {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.18);
}

.fs-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.fs-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.fs-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Keep the corner control tiny when vertical space is precious */
@media (max-height: 460px), (max-width: 360px) {
    .fullscreen-btn {
        min-height: 32px;
        padding: 5px 8px;
        gap: 0;
    }

    .fs-label {
        display: none;
    }
}

/* ============================================================
   Menu specific layout polish
   ============================================================ */

#mainMenu .menu-content {
    gap: clamp(12px, 3vh, 28px);
}

.title-group {
    flex: 0 0 auto;
}

/* Keyboard/gamepad focus ring parity for the menu cards */
.mode-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
