/* ── Settings popup (Oyun Ayarları) ───────────────────────────────── */
#scoreLimitPopup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(8, 8, 22, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: fadeIn 0.3s ease both;
}

.popup-content {
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
    padding: 28px 24px 24px;
    border-radius: 28px;
    text-align: center;
    background: var(--glass);
    border: 1px solid var(--stroke);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    box-shadow: 0 26px 70px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.10);
    animation: cardRiseFlat 0.45s var(--ease-out) both;
}

.popup-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 0.5px;
    margin: 0 0 24px;
    background: linear-gradient(90deg, var(--neon-violet), var(--neon-cyan));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

.popup-content .btn-cta { margin-top: 8px; }

/* ── Menu header row (brand + gear) ──────────────────────────────── */
.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.menu-header .brand { margin: 0; flex: 1; text-align: left; }

.settings-fab {
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--stroke-soft);
    background: rgba(255,255,255,0.07);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, transform 0.35s;
    -webkit-tap-highlight-color: transparent;
}
.settings-fab:hover,
.settings-fab:active { color: var(--neon-cyan); background: rgba(34,211,238,0.1); }
.settings-fab.spinning { transform: rotate(180deg); }

/* App settings popup — same full-screen overlay pattern as #scoreLimitPopup */
#appSettingsPopup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(8, 8, 22, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: fadeIn 0.3s ease both;
}

/* ── App settings rows + toggle switch ───────────────────────────── */
.app-setting-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--stroke-soft);
}
.app-setting-row:last-of-type { border-bottom: none; }

.app-setting-info {
    display: flex; flex-direction: column; gap: 3px; text-align: left;
}
.app-setting-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px; font-weight: 700; color: var(--text);
}
.app-setting-desc {
    font-size: 12px; color: var(--text-muted); font-weight: 500;
}

/* Toggle switch */
.toggle-switch { position: relative; display: inline-block; flex-shrink: 0; cursor: pointer; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.toggle-track {
    display: block;
    width: 50px; height: 28px;
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    border: 1px solid var(--stroke-soft);
    transition: background 0.25s, border-color 0.25s;
    position: relative;
}
.toggle-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #64748b;
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), background 0.25s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.toggle-switch input:checked + .toggle-track {
    background: linear-gradient(135deg, var(--neon-violet), var(--neon-cyan));
    border-color: rgba(34,211,238,0.4);
}
.toggle-switch input:checked + .toggle-track .toggle-thumb {
    transform: translateX(22px);
    background: #fff;
}
