/* Fluent Puzzle v3.0.0 – Voronoi Edition */

:root {
    --fc-bg:      #f1f5f9;
    --fc-surface: #ffffff;
    --fc-border:  #e2e8f0;
    --fc-text:    #0f172a;
    --fc-muted:   #64748b;
    --fc-green:   #22c55e;
    --fc-font:    'Nunito', system-ui, sans-serif;
}

/* ── Wrapper ── */
.fp-wrap {
    font-family: var(--fc-font);
    background: var(--fc-bg);
    color: var(--fc-text);
    padding: 32px 24px 52px;
    border-radius: 20px;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;   /* verhindert Scrollbalken in allen Richtungen */
}

.fp-login {
    padding: 24px;
    text-align: center;
    background: var(--fc-surface);
    border-radius: 14px;
}

/* ── Globaler Header ── */
.fp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.fp-title {
    font-size: clamp(1.4rem, 3vw, 2rem) !important;
    font-weight: 900 !important;
    letter-spacing: -.035em !important;
    color: var(--fc-text) !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    border: none !important;
    line-height: 1.1 !important;
}

.fp-greeting {
    font-size: .88rem;
    color: var(--fc-muted);
    margin: 0 !important;
    font-weight: 600;
}

.fp-stats {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--fc-surface);
    border: 1.5px solid var(--fc-border);
    border-radius: 100px;
    padding: 8px 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.fp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.fp-stat strong {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--fc-text);
    line-height: 1;
}

.fp-stat span {
    font-size: .6rem;
    color: var(--fc-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: 2px;
}

.fp-stat-sep {
    width: 1px;
    height: 26px;
    background: var(--fc-border);
    margin: 0 4px;
}

/* ── Fortschrittsbalken ── */
.fp-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.fp-progress-row--course {
    margin-bottom: 12px;
}

.fp-progress-track {
    flex: 1;
    height: 8px;
    background: var(--fc-border);
    border-radius: 100px;
    overflow: hidden;
}

.fp-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--fc-green), #86efac);
    border-radius: 100px;
    transition: width 1.3s cubic-bezier(.4, 0, .2, 1);
}

.fp-progress-fill--course {
    opacity: .85;
}

.fp-progress-pct {
    font-size: .8rem;
    font-weight: 800;
    color: var(--fc-muted);
    min-width: 36px;
    text-align: right;
}

/* ── Zwei-Spalten-Layout ── */
.fp-courses-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 1024px) {
    .fp-courses-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
        align-items: start;
    }
}

/* ── Kurs-Block ── */
.fp-course-block {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0; /* verhindert, dass Canvas-Kinder die Grid-Spalte aufblähen */
}

/* ── Kurs-Header ── */
.fp-course-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.fp-course-dot {
    width: 13px;
    height: 13px;
    border-radius: 4px;
    flex-shrink: 0;
}

.fp-course-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--fc-text);
    flex: 1;
    min-width: 0;
}

.fp-course-count {
    font-size: .78rem;
    font-weight: 700;
    color: var(--fc-muted);
    background: var(--fc-surface);
    border: 1.5px solid var(--fc-border);
    border-radius: 100px;
    padding: 2px 10px;
}

.fp-course-pct {
    font-size: .78rem;
    font-weight: 800;
    color: var(--fc-muted);
    min-width: 36px;
    text-align: right;
}

/* ── Board ── */
.fp-board-wrap {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 40px rgba(0,0,0,.14);
    background: #dde3ec;
    width: 100%;
    box-sizing: border-box;
    /* Höhe wird per JS gesetzt (logW * 9/16) */
}

/* Canvas: Größe komplett per JS – kein CSS width/height */
.fp-canvas {
    display: block;
    width: 100%;        /* Breite sofort auf Container begrenzen */
    max-width: 100%;    /* Canvas nie breiter als Wrapper */
    overflow: hidden;   /* Sicherheitsnetz gegen Browser-Artefakte */
}


/* ── Leer ── */
.fp-empty {
    text-align: center;
    padding: 60px;
    color: var(--fc-muted);
    font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .fp-wrap   { padding: 18px 10px 36px; }
    .fp-header { flex-direction: column; align-items: flex-start; }
    .fp-stats  { width: 100%; justify-content: center; }
}