/* ==========================================================================
   EASY MODE STYLESHEET (easy-mode.css)
   Ergänzt modern.css um Generator-UI, Charakter-Pool & Boss-Run-Banner
   ========================================================================== */

.easy-workspace-section {
    background: linear-gradient(180deg, var(--color-black) 0%, var(--color-surface) 100%);
    border-top: 1px solid var(--border-subtle);
    min-height: 75vh;
}

/* ==========================================================================
   1. EINKLAPPBARES KONFIGURATIONS-PANEL
   ========================================================================== */
.easy-config-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    box-shadow: var(--inner-highlight), 0 16px 40px rgba(0, 0, 0, 0.65);
    margin-bottom: 36px;
    overflow: hidden;
}

.easy-config-summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    padding: 20px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    background: rgba(255, 255, 255, 0.02);
    transition: background-color var(--transition-fast);
}

.easy-config-summary::-webkit-details-marker {
    display: none;
}

.easy-config-summary:hover {
    background: rgba(255, 255, 255, 0.04);
}

.easy-config-panel[open] .easy-config-summary {
    border-bottom: 1px solid var(--border-subtle);
}

.summary-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-white);
}

.summary-title-wrap svg {
    color: var(--brand-text-readable);
}

.summary-meta-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-counter-pill {
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.summary-chevron {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.easy-config-panel[open] .summary-chevron {
    transform: rotate(180deg);
}

.easy-config-body {
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Einzelne Sektions-Karten innerhalb der Konfiguration */
.config-card {
    background: rgba(6, 9, 14, 0.55);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--inner-highlight);
}

.config-card-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.config-step-eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand-text-readable);
    margin-bottom: 4px;
}

.config-card-head h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 4px;
}

.config-card-head p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.quick-select-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-chip-action {
    padding: 7px 13px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.btn-chip-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
}

/* ==========================================================================
   2. CHALLENGE TOGGLE BUTTONS
   ========================================================================== */
.challenge-button-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding: 16px;
    background: rgba(5, 7, 11, 0.65);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.challenge-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast);
}

.challenge-toggle-btn::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.challenge-toggle-btn:hover {
    color: var(--color-white);
    border-color: var(--border-highlight);
}

.challenge-toggle-btn.active {
    background: var(--brand-subtle-bg);
    border-color: var(--brand-border);
    color: var(--color-white);
    font-weight: 600;
}

.challenge-toggle-btn.active::before {
    background: var(--color-brand);
    box-shadow: 0 0 8px var(--brand-glow);
}

/* ==========================================================================
   3. CHARAKTER-FILTER & AUSWAHL-GRID
   ========================================================================== */
.char-filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(5, 7, 11, 0.65);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.char-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.filter-bar-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-right: 4px;
}

.filter-divider {
    width: 1px;
    height: 22px;
    background: var(--border-highlight);
    margin: 0 4px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 11px;
    min-height: 34px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.filter-chip:hover {
    border-color: var(--border-highlight);
    color: var(--color-white);
}

.filter-chip.active {
    background: var(--brand-subtle-bg);
    border-color: var(--color-brand);
    color: var(--color-white);
    box-shadow: 0 0 12px rgba(200, 25, 34, 0.25);
}

.rarity-chip-5 { color: #f7b83e; }
.rarity-chip-4 { color: #b88ce8; }

.char-mini-search {
    width: 240px;
}

.char-mini-search .wbc-input {
    padding: 7px 12px;
    font-size: 0.82rem;
}

/* Charakter-Kachel-Grid */
.char-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
    gap: 10px;
    max-height: 360px;
    overflow-y: auto;
    padding: 16px;
    background: rgba(5, 7, 11, 0.65);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

:where(.char-grid-wrapper) {
    --ele-color: var(--color-brand);
    --ele-glow: rgba(200, 25, 34, 0.25);
}

.char-grid-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    cursor: pointer;
    opacity: 0.32;
    filter: grayscale(90%);
    border: 1.5px solid var(--border-subtle);
    background: var(--color-black);
    transition:
        transform 0.18s var(--ease-out),
        opacity 0.18s var(--ease-out),
        filter 0.18s var(--ease-out),
        border-color 0.18s var(--ease-out),
        box-shadow 0.18s var(--ease-out);
    user-select: none;
}

.char-grid-wrapper:hover {
    transform: translateY(-2px) scale(1.04);
    opacity: 0.75;
    filter: grayscale(30%);
}

.char-grid-wrapper.selected {
    opacity: 1;
    filter: grayscale(0%);
    border-color: var(--ele-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 10px var(--ele-glow, rgba(200, 25, 34, 0.25));
}

.char-grid-img {
    width: 100%;
    height: 100%;
    border-radius: calc(var(--radius-md) - 2px);
    object-fit: cover;
    display: block;
}

.char-star {
    position: absolute;
    top: -6px;
    left: -5px;
    font-size: 16px;
    line-height: 1;
    z-index: 2;
    text-shadow: 0 1px 4px #000, 0 0 2px #000;
    pointer-events: none;
}
.char-star.star-5 { color: #f7b83e; }
.char-star.star-4 { color: #b88ce8; }

.char-ele-icon {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--color-surface-elevated);
    background-size: 13px 13px;
    border: 1px solid var(--ele-color);
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.85);
    pointer-events: none;
}

/* Footer-Leiste jeder Konfig-Sektion (Speichern / Zurücksetzen) */
.config-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.btn-config-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--color-white);
    background: var(--color-brand);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-config-save:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--brand-glow);
}

.btn-config-reset {
    padding: 9px 15px;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.btn-config-reset:hover {
    color: var(--brand-text-readable);
    border-color: var(--brand-border);
    background: rgba(200, 25, 34, 0.08);
}

/* Sektion 3: Backup & Transfer */
.backup-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.backup-flex h3 {
    font-size: 1.18rem;
    color: var(--color-white);
    margin-bottom: 4px;
}

.backup-flex p {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 64ch;
}

.backup-flex code {
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-white);
}

.backup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ==========================================================================
   4. GENERIEREN-BUTTON & BOSS-RUN BANNER-KARTEN
   ========================================================================== */
.generate-action-bar {
    display: flex;
    justify-content: center;
    margin: 12px 0 44px;
}

.btn-generate-runs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 38px;
    font-family: inherit;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-brand) 0%, #9e1118 100%);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 28px var(--brand-glow);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.btn-generate-runs:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 12px 36px rgba(200, 25, 34, 0.5);
}

.btn-generate-runs:active {
    transform: translateY(0);
}

.boss-runs-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.boss-run-card {
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--inner-highlight), 0 14px 34px rgba(0, 0, 0, 0.65);
    transition: border-color var(--transition-fast);
}

.boss-run-card:hover {
    border-color: var(--brand-border);
}

.boss-header {
    position: relative;
    min-height: 165px;
    padding: 28px 30px;
    border-bottom: 1px solid rgb(82, 82, 82);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.boss-header-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.boss-nation-kicker {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--brand-text-readable);
    margin-bottom: 4px;
}

.boss-header h2 {
    margin: 0 0 8px 0;
    color: var(--color-white);
    font-size: clamp(1.45rem, 2.5vw, 1.9rem);
    font-weight: 700;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.95);
}

.challenge-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    background: rgba(200, 25, 34, 0.22);
    border-left: 3px solid var(--color-brand);
    color: var(--color-white);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 6px;
}

.challenge-desc {
    color: rgba(235, 242, 250, 0.88);
    font-size: 0.92rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.boss-details {
    background: rgba(8, 12, 20, 0.75);
}

.boss-details-summary {
    list-style: none;
    padding: 13px 30px;
    cursor: pointer;
    user-select: none;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.boss-details-summary::-webkit-details-marker {
    display: none;
}

.boss-details-summary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-white);
}

.boss-details[open] .boss-details-summary {
    border-bottom: 1px solid var(--border-subtle);
    color: var(--color-white);
}

.boss-content {
    padding: 24px 30px;
}

.boss-pool-hint {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.boss-char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 12px;
}

:where(.easy-char-pill) {
    --ele-color: var(--border-highlight);
}

.easy-char-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--ele-color);
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

.easy-char-pill:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--ele-color);
}

.easy-char-pill img {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--color-black);
    border: 1px solid var(--border-highlight);
    flex-shrink: 0;
}

.easy-char-meta {
    min-width: 0;
}

.easy-char-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.easy-char-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* 3-Random-Teams Draft-Grid */
.draft-teams-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.draft-team-box {
    background: rgba(6, 9, 14, 0.65);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    border-top: 2px solid var(--color-brand);
}

.draft-team-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--brand-text-readable);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.draft-team-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==========================================================================
   5. CUSTOM HOVER TOOLTIP & TOAST NOTIFICATION
   ========================================================================== */
.custom-tooltip {
    position: fixed;
    transform: translate(-50%, -100%);
    background: var(--color-surface-elevated);
    color: var(--color-white);
    padding: 10px 14px;
    border: 1px solid var(--border-highlight);
    border-top: 2px solid var(--color-brand);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    width: max-content;
    max-width: 260px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, margin-top 0.15s ease;
    margin-top: 0;
    z-index: 9999;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.85);
}

.custom-tooltip.visible {
    opacity: 1;
    visibility: visible;
    margin-top: -10px;
}

.easy-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    padding: 13px 20px;
    border-radius: var(--radius-md);
    background: var(--color-surface-elevated);
    border: 1px solid var(--border-highlight);
    border-left: 4px solid #74c2a8;
    color: var(--color-white);
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.85);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out), visibility 0.22s;
}

.easy-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.easy-toast.toast-error {
    border-left-color: var(--color-brand);
}

@media (max-width: 900px) {
    .draft-teams-grid {
        grid-template-columns: 1fr;
    }
    .char-mini-search {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .easy-config-body {
        padding: 16px;
    }
    .config-card {
        padding: 16px;
    }
    .boss-header,
    .boss-content {
        padding: 20px 18px;
    }
    .boss-details-summary {
        padding: 12px 18px;
    }
    .btn-generate-runs {
        width: 100%;
    }
}