/* ==========================================================================
   Maus vs. Punkte – Arena, HUD & Werkstatt-Styles
   100 % lokal, keine externen Schriftarten
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100dvh;
    font-family: var(--le-font-sans);
    background: #020617;
    color: #f8fafc;
    overflow-x: hidden;
}

.mono {
    font-family: var(--le-font-mono);
    font-variant-numeric: tabular-nums;
}

.mvp-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    background: radial-gradient(circle at 50% 0%, #0f172a 0%, #020617 75%);
}

/* ---------------- TOPBAR ---------------- */

.mvp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px;
    max-width: 1020px;
    width: 100%;
    margin: 0 auto;
    flex-wrap: wrap;
}

.mvp-topbar-left,
.mvp-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mvp-pill-btn,
.mvp-stat-pill,
.mvp-coins-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1.5px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.mvp-pill-btn {
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.15s ease;
}

.mvp-pill-btn:hover {
    border-color: #38bdf8;
}

.mvp-pill-btn:active {
    transform: scale(0.96);
}

.mvp-stat-pill span {
    font-size: 0.76rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mvp-stat-pill strong {
    font-size: 1rem;
    color: #38bdf8;
}

.mvp-coins-pill {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #78350f;
    border-color: rgba(217, 119, 6, 0.4);
}

/* ---------------- SPIELFELD-KASTEN ---------------- */

.mvp-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 16px 20px;
}

.mvp-arena-wrap {
    position: relative;
    width: 100%;
    max-width: min(960px, 95vw, calc((100dvh - 96px) * 900 / 560));
    aspect-ratio: 900 / 560;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(56, 189, 248, 0.28);
    user-select: none;
}

.mvp-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.mvp-canvas.is-playing {
    cursor: none;
}

/* ---------------- OVERLAYS IM KASTEN ---------------- */

.mvp-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(5px);
    display: grid;
    place-items: center;
    padding: 16px;
    z-index: 10;
}

.mvp-overlay-card {
    background: #ffffff;
    color: #0f172a;
    border-radius: 22px;
    padding: 24px 26px;
    max-width: 490px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.mvp-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.mvp-overlay-card h1,
.mvp-overlay-card h2 {
    margin: 0 0 6px;
    font-size: 1.55rem;
    font-weight: 900;
}

.mvp-end-icon {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 4px;
}

.mvp-lead {
    margin: 0 0 14px;
    font-size: 0.94rem;
    color: #475569;
    line-height: 1.45;
}

.mvp-touch-hint {
    display: none;
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #fef3c7;
    color: #78350f;
    font-size: 0.82rem;
    font-weight: 800;
}

@media (pointer: coarse) {
    .mvp-touch-hint {
        display: block;
    }
}

.mvp-mode-picker {
    margin: 0 0 14px;
}

.mvp-mode-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.mvp-mode-btn {
    flex: 1 1 calc(50% - 8px);
    max-width: calc(50% - 4px);
    min-width: 138px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: border-color 0.14s ease, background-color 0.14s ease, transform 0.12s ease;
}

.mvp-mode-btn:hover {
    border-color: #6366f1;
    background: #eef2ff;
}

.mvp-mode-btn.is-active {
    border-color: #4f46e5;
    background: #eef2ff;
    color: #312e81;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.18);
}

.mvp-mode-desc {
    margin: 8px 0 0;
    font-size: 0.81rem;
    color: #475569;
    font-weight: 700;
    line-height: 1.35;
}

.mvp-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.mvp-metric {
    padding: 9px 6px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mvp-metric span {
    font-size: 0.7rem;
    font-weight: 800;
    color: #64748b;
}

.mvp-metric strong {
    font-size: 1.05rem;
    font-weight: 900;
}

.mvp-metric.is-coins {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #78350f;
}

.mvp-unlocks {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 14px;
    text-align: left;
}

.mvp-unlock-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border-radius: 12px;
    background: #ecfdf5;
    border: 1.5px solid #86efac;
    font-size: 0.84rem;
    font-weight: 800;
    color: #14532d;
}

.mvp-unlock-svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.mvp-overlay-actions {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 10px;
}

.mvp-start-btn,
.mvp-ghost-btn {
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 0.96rem;
    font-weight: 900;
    cursor: pointer;
    border: 0;
    transition: transform 0.12s ease;
}

.mvp-start-btn {
    background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.30);
}

.mvp-ghost-btn {
    background: #f1f5f9;
    color: #334155;
    border: 1.5px solid #cbd5e1;
}

.mvp-start-btn:active,
.mvp-ghost-btn:active {
    transform: scale(0.97);
}

/* ---------------- MODALS ---------------- */

.mvp-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    padding: 16px;
    z-index: 40;
}

.mvp-modal-card {
    background: #ffffff;
    color: #0f172a;
    border-radius: 22px;
    width: 100%;
    max-width: 720px;
    max-height: 88dvh;
    overflow-y: auto;
    padding: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.mvp-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.mvp-modal-head h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 900;
}

.mvp-modal-sub {
    margin-top: 3px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.mvp-close-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    flex-shrink: 0;
}

.mvp-shop-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 14px 0 12px;
    padding: 4px;
    background: #f1f5f9;
    border-radius: 14px;
}

.mvp-tab-btn {
    min-height: 44px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
}

.mvp-tab-btn.is-active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.mvp-feedback {
    margin-bottom: 12px;
    padding: 9px 13px;
    border-radius: 12px;
    background: #dcfce7;
    color: #14532d;
    border: 1.5px solid #86efac;
    font-size: 0.86rem;
    font-weight: 800;
}

.mvp-feedback.is-error {
    background: #ffe4e6;
    color: #9f1239;
    border-color: #fda4af;
}

.mvp-shop-grid,
.mvp-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.mvp-shop-item,
.mvp-badge-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
}

.mvp-shop-item.is-active {
    background: #eff6ff;
    border-color: #3b82f6;
}

.mvp-badge-card.is-owned {
    background: #fffbeb;
    border-color: #fbbf24;
}

.mvp-badge-card.is-locked {
    opacity: 0.72;
}

.mvp-shop-preview {
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    border: 1px solid rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.mvp-shop-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.mvp-shop-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    background: #fef3c7;
    color: #92400e;
}

.mvp-shop-title,
.mvp-badge-title {
    margin: 0;
    font-size: 0.94rem;
    font-weight: 900;
}

.mvp-shop-desc,
.mvp-badge-desc {
    margin: 0;
    font-size: 0.79rem;
    color: #475569;
    line-height: 1.35;
}

.mvp-shop-btn {
    margin-top: auto;
    min-height: 40px;
    border-radius: 11px;
    border: 0;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
}

.mvp-shop-btn.is-equip {
    background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
    color: #ffffff;
}

.mvp-shop-btn.is-buy {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

.mvp-shop-btn.is-selected {
    background: #dcfce7;
    color: #14532d;
    border: 1.5px solid #16a34a;
    cursor: default;
}

.mvp-shop-btn:disabled:not(.is-selected) {
    opacity: 0.5;
    cursor: default;
}

.mvp-badge-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mvp-badge-art {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.mvp-badge-card.is-locked .mvp-badge-art {
    filter: grayscale(0.85);
}

.mvp-badge-rarity {
    font-size: 0.72rem;
    font-weight: 800;
    color: #d97706;
}

.mvp-badge-status {
    margin-top: auto;
    font-size: 0.76rem;
    font-weight: 800;
    color: #64748b;
}

.mvp-badge-card.is-owned .mvp-badge-status {
    color: #15803d;
}

/* ---------------- MUSIK & SOUND MODAL ---------------- */

.mvp-pill-btn.is-music-on {
    border-color: #38bdf8;
    background: rgba(14, 116, 144, 0.35);
    color: #bae6fd;
}

.mvp-modal-card-sm {
    max-width: 560px;
}

.mvp-audio-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1.5px solid #e2e8f0;
}

.mvp-audio-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.mvp-audio-head h3 {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 900;
    color: #0f172a;
}

.mvp-audio-hint {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}

.mvp-audio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mvp-audio-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.14s ease, background-color 0.14s ease;
}

.mvp-audio-card:hover {
    border-color: #38bdf8;
    background: #f0f9ff;
}

.mvp-audio-card.is-active {
    border-color: #0284c7;
    background: #e0f2fe;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.16);
}

.mvp-audio-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.mvp-audio-card strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 900;
    line-height: 1.2;
}

.mvp-audio-card small {
    display: block;
    margin-top: 2px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.3;
}

.mvp-volume-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    font-size: 0.84rem;
    font-weight: 800;
    color: #334155;
}

.mvp-volume-row input[type="range"] {
    flex: 1;
    accent-color: #0284c7;
    cursor: pointer;
}

.mvp-sfx-toggle {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
}

.mvp-sfx-toggle.is-on {
    border-color: #16a34a;
    background: #dcfce7;
    color: #166534;
}

@media (max-width: 600px) {
    .mvp-hide-sm {
        display: none;
    }

    .mvp-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .mvp-overlay-actions,
    .mvp-audio-grid {
        grid-template-columns: 1fr;
    }
}
