/* ==============================
   INHALTSVERZEICHNIS
   @version v2
   ==============================
   1. Variablen und Farbdefinitionen
   2. Basis-Styling
   3. Layout-Struktur
   4. Navigations- und Hilfselemente
   5. Karten (Cards)
      - Allgemeine Card-Stile
      - Spezifische Card-Typen
      - Karten-Interaktionen
   6. Tooltip/Sprechblase
   7. Filter-Leiste und Steuerelemente
      - Filter-Container
      - Suchfeld
      - Filter-Buttons
      - Filter-Gruppen
   8. Berufsgruppen-Marker
   9. Sammlungen
      - Sammlung-Button
      - Sammlung-Panel
      - Sammlung-Inhalte
  10. Modal-Dialog
  11. Responsive Design
  12. Animationen
   ============================== */

/* ==============================
   1. Variablen und Farbdefinitionen
   ============================== */
:root {
    /* Sektionsfarben */
    --section-1: hsl(0, 100%, 75%);
    --onSection-1: #fff;
    --section-2: hsl(18, 100%, 75%);
    --onSection-2: #fff;
    --section-3: hsl(36, 100%, 75%);
    --onSection-3: #000;
    --section-4: hsl(54, 100%, 75%);
    --onSection-4: #000;
    --section-5: hsl(72, 100%, 75%);
    --onSection-5: #000;
    --section-6: hsl(90, 100%, 75%);
    --onSection-6: #000;
    --section-7: hsl(108, 100%, 75%);
    --onSection-7: #000;
    --section-8: hsl(126, 100%, 75%);
    --onSection-8: #000;
    --section-9: hsl(144, 100%, 75%);
    --onSection-9: #000;
    --section-10: hsl(162, 100%, 75%);
    --onSection-10: #000;
    --section-11: hsl(180, 100%, 75%);
    --onSection-11: #000;
    --section-12: hsl(198, 100%, 75%);
    --onSection-12: #000;
    --section-13: hsl(216, 100%, 75%);
    --onSection-13: #000;
    --section-14: hsl(234, 100%, 75%);
    --onSection-14: #fff;
    --section-15: hsl(252, 100%, 75%);
    --onSection-15: #fff;
    --section-16: hsl(267, 88%, 74%);
    --onSection-16: #fff;
    --section-17: hsl(283, 89%, 75%);
    --onSection-17: #fff;
    --section-18: hsl(302, 76%, 73%);
    --onSection-18: #fff;
    --section-19: hsl(324, 100%, 75%);
    --onSection-19: #fff;
    --section-20: hsl(2, 100%, 74%);
    --onSection-20: #fff;

    /* Konformitätslevel-Farben */
    --A: hsl(181, 100%, 29%);
    --onA: #fff;
    --AA: hsl(59, 100%, 29%);
    --onAA: #fff;
    --AAA: hsl(33, 100%, 29%);
    --onAAA: #fff;

    /* Berufsgruppen-Farben */
    --requirements: hsl(41, 100%, 74%);
    --onRequirements: #000;
    --design: hsl(35, 100%, 50%);
    --onDesign: #000;
    --development: hsl(9, 100%, 50%);
    --onDevelopment: #fff;
    --testing: hsl(205, 100%, 50%);
    --onTesting: #fff;
    --release: hsl(154, 100%, 28%);
    --onRelease: #fff;
    --maintenance: hsl(268, 69%, 34%);
    --onMaintenance: #fff;
    --content: hsl(205, 82%, 78%);
    --onContent: #000;
    --uxWriter: hsl(204, 43%, 65%);
    --onUxWriter: #fff;
    --redaktion: hsl(204, 43%, 65%);
    --onRedaktion: #fff;
    --corporateText: hsl(205, 78%, 77%);
    --onCorporateText: #000;

    /* Globale Variablen */
    --primary-focus-color: #4d90fe;
    --focus-outline-width: 2px;
    --focus-outline-offset: 2px;
    --transition-speed: 0.2s;
}

/* ==============================
   2. Basis-Styling
   ============================== */
:root {
    font-family: Barlow, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

body {
    margin: 0;
    padding: 2rem;
    min-width: min-content;
    background-color: hsla(0, 0%, 0%, 0.85);
    color: white;
    overflow-x: auto;
    counter-reset: pruefschritt;
}

/* ==============================
   3. Layout-Struktur
   ============================== */
.tree-container {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    padding: 1rem;
    min-width: min-content;
    position: relative;
}

/* ==============================
   4. Navigations- und Hilfselemente
   ============================== */
/* Skip-Link für Tastaturnutzer */
.skip-link {
    position: absolute;
    top: -40px;
    left: 10px;
    background: #fff;
    color: #000;
    padding: 8px 16px;
    z-index: 9999;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* ==============================
   5. Karten (Cards)
   ============================== */
/* Sektionsspalte */
.section-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 180px;
    hyphens: auto;
    margin-bottom: 20px;
    position: relative;
}

/* Allgemeine Card-Stile */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    min-height: 180px;
    border-radius: 0.1rem;
    text-align: center;
    font-weight: 400;
    font-size: 1.5rem;
    box-shadow: 0.25rem 0.25rem 0.5rem rgba(0, 0, 0, 0.25);
    transition: transform var(--transition-speed) ease,
        box-shadow var(--transition-speed) ease,
        outline var(--transition-speed) ease;
    cursor: pointer;
}

/* Spezifische Card-Typen */
.section-card {
    border-radius: 0;
    margin-top: 0;
    border-top: none;
}

.category-card {
    background-color: #333;
    color: white;
    border-radius: 8px 8px 0 0;
    min-height: 45px !important;
    margin-bottom: 0;
    text-align: center;
    font-weight: bold;
    padding: 12px;
    width: 100%;
    font-size: 1.1em;
    border-bottom: 2px solid #555;
    position: sticky;
    top: 0;
    z-index: 2;
}

.pruefschritt-card {
    font-weight: 500;
    font-size: 1rem;
    justify-content: flex-start;
    position: relative;
    padding-block-start: 1rem;
    padding-bottom: 20px; /* Platz für die Marker */
}

/* Karten-Interaktionen */
.card:focus,
.card:focus-visible {
    outline: var(--focus-outline-width) solid var(--primary-focus-color);
    outline-offset: var(--focus-outline-offset);
    position: relative;
    z-index: 10;
}

.card-focus {
    outline: var(--focus-outline-width) solid white !important;
    outline-offset: var(--focus-outline-offset);
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5) !important;
    position: relative;
    z-index: 10;
}

.pruefschritt-card:hover:not(.card-focus) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

/* Karten-Zusatzinformationen (Konformitätslevel, IDs) */
.wcag-id,
.bitv-id {
    font-size: 0.8rem;
    opacity: 0.5;
}

.A,
.AA,
.AAA {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2rem;
    height: 2rem;
    margin-left: -0px;
    margin-top: -1.9rem;
    font-size: 0.8rem;
    color: #fff;
    border: 2px solid white;
    border-radius: 50%;
    padding: 0.25rem 0.25rem;
}

.A {
    background-color: var(--A);
    color: var(--onA);
}

.AA {
    background-color: var(--AA);
    color: var(--onAA);
}

.AAA {
    background-color: var(--AAA);
    color: var(--onAAA);
}

/* Fokus-Stile für Sektionen */
.section-column:focus,
.section-column:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 4px;
    border-radius: 4px;
    animation: focus-pulse 2s ease-in-out infinite;
}

.section-focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 5;
}

.section-column:focus-within .category-card {
    box-shadow: 0 0 0 2px var(--primary-focus-color);
}

/* Prüfschritt-Hervorhebung und Zusatzinfos */
.pruefschritt-card.is-bitv::before {
    counter-increment: pruefschritt;
    content: counter(pruefschritt);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-inline-start: -90%;
    margin-block-start: -2rem;
    width: 2rem;
    height: 2rem;
    position: absolute;
    background: white;
    color: black;
    border: 2px solid black;
    border-radius: 50%;
    font-weight: bold;
    z-index: 2;
    transition: transform var(--transition-speed) ease;
}

.pruefschritt-card.is-bitv:hover::before,
.pruefschritt-card.card-focus.is-bitv::before {
    transform: scale(1.1);
}

.has-information::after {
    content: "(i)";
    font-size: 1rem;
    opacity: 0.25;
}

/* AAA-Karten desaturieren */
.card:has(.AAA) {
    filter: saturate(0.15);
}

.card:has(.AAA):hover {
    filter: saturate(0.8);
}

/* Sektionsfarben */
.section-1 {
    background-color: var(--section-1);
    color: var(--onSection-1);
}
.section-2 {
    background-color: var(--section-2);
    color: var(--onSection-2);
}
.section-3 {
    background-color: var(--section-3);
    color: var(--onSection-3);
}
.section-4 {
    background-color: var(--section-4);
    color: var(--onSection-4);
}
.section-5 {
    background-color: var(--section-5);
    color: var(--onSection-5);
}
.section-6 {
    background-color: var(--section-6);
    color: var(--onSection-6);
}
.section-7 {
    background-color: var(--section-7);
    color: var(--onSection-7);
}
.section-8 {
    background-color: var(--section-8);
    color: var(--onSection-8);
}
.section-9 {
    background-color: var(--section-9);
    color: var(--onSection-9);
}
.section-10 {
    background-color: var(--section-10);
    color: var(--onSection-10);
}
.section-11 {
    background-color: var(--section-11);
    color: var(--onSection-11);
}
.section-12 {
    background-color: var(--section-12);
    color: var(--onSection-12);
}
.section-13 {
    background-color: var(--section-13);
    color: var(--onSection-13);
}
.section-14 {
    background-color: var(--section-14);
    color: var(--onSection-14);
}
.section-15 {
    background-color: var(--section-15);
    color: var(--onSection-15);
}
.section-16 {
    background-color: var(--section-16);
    color: var(--onSection-16);
}
.section-17 {
    background-color: var(--section-17);
    color: var(--onSection-17);
}
.section-18 {
    background-color: var(--section-18);
    color: var(--onSection-18);
}
.section-19 {
    background-color: var(--section-19);
    color: var(--onSection-19);
}
.section-20 {
    background-color: var(--section-20);
    color: var(--onSection-20);
}

/* ==============================
   6. Tooltip/Sprechblase
   ============================== */
.tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    text-align: left;
    font-size: 1.1rem;
    padding: 12px;
    border-radius: 6px;
    min-width: 250px;
    max-width: 300px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-speed) ease,
        transform var(--transition-speed) ease;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) scale(0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-style: solid;
    border-color: transparent rgba(0, 0, 0, 0.9) transparent transparent;
}

.tooltip.left-position {
    left: auto;
    right: calc(100% + 10px);
    transform: translateY(-50%) scale(0.95);
}

.tooltip.left-position.visible {
    transform: translateY(-50%) scale(1);
}

.tooltip.left-position::before {
    left: auto;
    right: -8px;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent rgba(0, 0, 0, 0.9);
}

.tooltip.visible {
    opacity: 0.95;
    transform: translateY(-50%) scale(1);
}

/* ==============================
   7. Filter-Leiste und Steuerelemente
   ============================== */
/* Filter-Container */
.filter-bar {
    margin: 1rem 0 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    display: flex;
    gap: 2vw;
    align-items: center;
    flex-wrap: wrap;

    & * {
        font-size: 1.5vh !important;
    }
}

/* Suchfeld */
.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    min-width: 300px;
}

.search-container .material-icons {
    margin-right: 0.5rem;
    opacity: 0.7;
}

#searchInput {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    width: 100%;
    outline: none;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#searchInput:focus {
    outline: var(--focus-outline-width) solid white;
    outline-offset: var(--focus-outline-offset);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.active-filters {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Filter-Buttons Basisstil */
.filter-btn,
.standard-filter-btn,
.profession-filter-btn {
    background: none;
    color: white;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.filter-btn:hover,
.standard-filter-btn:hover,
.profession-filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.filter-btn:focus,
.standard-filter-btn:focus,
.profession-filter-btn:focus,
.filter-btn:focus-visible,
.standard-filter-btn:focus-visible,
.profession-filter-btn:focus-visible {
    outline: var(--focus-outline-width) solid white;
    outline-offset: var(--focus-outline-offset);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Spezifische Filter-Button-Stile */
.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.filter-btn[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* Konformitätslevel-Buttons */
.filter-btn[data-level="A"] {
    border-color: var(--A);
}

.filter-btn[data-level="AA"] {
    border-color: var(--AA);
}

.filter-btn[data-level="AAA"] {
    border-color: var(--AAA);
}

.filter-btn[aria-pressed="true"][data-level="A"] {
    background: var(--A);
}

.filter-btn[aria-pressed="true"][data-level="AA"] {
    background: var(--AA);
}

.filter-btn[aria-pressed="true"][data-level="AAA"] {
    background: var(--AAA);
}

/* Standard-Filter-Buttons */
.standard-filter-btn {
    padding: 8px 12px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-right: 5px;
}

.standard-filter-btn[aria-pressed="true"] {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: white;
}

/* Berufsgruppen-Filter */
.profession-filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.profession-filter-btn[aria-pressed="true"] {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: white;
}

/* Berufsgruppen-Farben für Buttons */
.profession-filter-btn.requirements {
    border-color: var(--requirements);
}
.profession-filter-btn.design {
    border-color: var(--design);
}
.profession-filter-btn.entwicklung {
    border-color: var(--development);
}
.profession-filter-btn.testing {
    border-color: var(--testing);
}
.profession-filter-btn.release {
    border-color: var(--release);
}
.profession-filter-btn.maintenance {
    border-color: var(--maintenance);
}
.profession-filter-btn.content {
    border-color: var(--content);
}
.profession-filter-btn.ux-writer {
    border-color: var(--uxWriter);
}
.profession-filter-btn.redaktion {
    border-color: var(--redaktion);
}
.profession-filter-btn.corporate-text {
    border-color: var(--corporateText);
}

.profession-filter-btn[aria-pressed="true"].requirements {
    background-color: var(--requirements);
    color: var(--onRequirements);
}
.profession-filter-btn[aria-pressed="true"].design {
    background-color: var(--design);
    color: var(--onDesign);
}
.profession-filter-btn[aria-pressed="true"].entwicklung {
    background-color: var(--development);
    color: var(--onDevelopment);
}
.profession-filter-btn[aria-pressed="true"].testing {
    background-color: var(--testing);
    color: var(--onTesting);
}
.profession-filter-btn[aria-pressed="true"].release {
    background-color: var(--release);
    color: var(--onRelease);
}
.profession-filter-btn[aria-pressed="true"].maintenance {
    background-color: var(--maintenance);
    color: var(--onMaintenance);
}
.profession-filter-btn[aria-pressed="true"].content {
    background-color: var(--content);
    color: var(--onContent);
}
.profession-filter-btn[aria-pressed="true"].ux-writer {
    background-color: var(--uxWriter);
    color: var(--onUxWriter);
}
.profession-filter-btn[aria-pressed="true"].redaktion {
    background-color: var(--redaktion);
    color: var(--onRedaktion);
}
.profession-filter-btn[aria-pressed="true"].corporate-text {
    background-color: var(--corporateText);
    color: var(--onCorporateText);
}

/* Filter-Gruppen */
.filter-group {
    margin-bottom: 15px;
}

.filter-group-title {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Anzeigeoptionen */
.display-options {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.toggle-option input[type="checkbox"] {
    margin-right: 10px;
}

/* Gefilterte Karten ausblenden */
.card.filtered {
    display: none;
}

/* Anzeigeoptionen (verstecken von Elementen) */
.hide-wcag-id .wcag-id,
.hide-bitv-id .bitv-id {
    display: none;
}

.hide-profession-markers .profession-markers {
    display: none;
}

.hide-conformance-level .A,
.hide-conformance-level .AA,
.hide-conformance-level .AAA {
    display: none;
}

/* Konformitätslevel nur bei aktiven Filtern anzeigen */
.conformance-filter-inactive .A,
.conformance-filter-inactive .AA,
.conformance-filter-inactive .AAA {
    display: none;
}

/* ==============================
   8. Berufsgruppen-Marker
   ============================== */
.profession-markers {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    position: absolute;
    bottom: 4px;
    left: 4px;
}

.profession-marker {
    width: 16px;
    height: 16px;
    border-width: 1px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.25);
    outline-width: 1px;
    outline-style: solid;
    outline-color: rgba(255, 255, 255, 0.25);
    border-radius: 0;
    display: inline-block;
}

/* Farben für Berufsgruppen-Marker */
.profession-marker.requirements {
    background-color: var(--requirements);
}
.profession-marker.design {
    background-color: var(--design);
}
.profession-marker.entwicklung {
    background-color: var(--development);
}
.profession-marker.testing {
    background-color: var(--testing);
}
.profession-marker.release {
    background-color: var(--release);
}
.profession-marker.maintenance {
    background-color: var(--maintenance);
}
.profession-marker.content {
    background-color: var(--content);
}
.profession-marker.ux-writer {
    background-color: var(--uxWriter);
}
.profession-marker.redaktion {
    background-color: var(--redaktion);
}
.profession-marker.corporate-text {
    background-color: var(--corporateText);
}

/* ==============================
   9. Sammlungen
   ============================== */
/* Sammlung-Button */
.collection-toggle-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: hsl(205, 100%, 50%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 999;
    border: none;
    transition: transform var(--transition-speed) ease,
        background-color var(--transition-speed) ease;
}

.collection-toggle-button:hover {
    background-color: hsl(205, 100%, 40%);
    transform: scale(1.05);
}

.collection-toggle-button .material-icons {
    font-size: 30px;
}

/* Sammlung-Panel */
.collections-panel {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    background-color: #333;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    z-index: 998;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    max-height: 70vh;
    overflow-y: auto;
}

.collections-panel.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.collections-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #444;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid #555;
}

.collections-panel-header h3 {
    margin: 0;
    color: white;
}

.collections-panel-content {
    padding: 15px;
}

.drag-handle {
    cursor: move;
    padding: 5px;
    margin-right: 5px;
}

/* Sammlung-Inhalte */
.collections-container {
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    overflow: hidden;
}

.collections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
}

.collections-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.toggle-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.25rem;
}

.collections-content {
    padding: 1rem;
    max-height: 1000px; /* Anfangszustand ausgeklappt */
    transition: max-height 0.3s ease-in-out;
}

/* Neue Sammlung erstellen */
.new-collection-container {
    margin-bottom: 1rem;
}

.collection-form {
    display: flex;
    gap: 0.5rem;
}

.collection-form input {
    flex-grow: 1;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.collection-form button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Sammlungsliste */
.collections-list-container {
    margin-bottom: 1.5rem;
}

.collections-list-container h3 {
    margin-top: 0;
    font-size: 1rem;
}

.collections-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.collection-item {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collection-item:hover {
    background: rgba(255, 255, 255, 0.25);
}

.collection-item.active {
    background: rgba(255, 255, 255, 0.35);
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.collection-item .material-icons {
    font-size: 1rem;
}

/* Aktive Sammlung */
.active-collection-container {
    min-height: 50px;
}

.active-collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.active-collection-header h3 {
    margin: 0;
    font-size: 1rem;
}

.deselect-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.25rem;
    opacity: 0.7;
}

.deselect-button:hover {
    opacity: 1;
}

.active-collection-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Sammlung-Karten */
.collection-card {
    position: relative;
    width: 180px;
    min-height: 100px;
    padding: 1rem;
    border-radius: 0.1rem;
    box-shadow: 0.25rem 0.25rem 0.5rem rgba(0, 0, 0, 0.25);
}

.collection-card .remove-button {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
}

.collection-card .remove-button:hover {
    opacity: 1;
}

/* Add-to-Collection Button */
.add-to-collection-button {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.pruefschritt-card:hover .add-to-collection-button {
    opacity: 0.7;
}

.pruefschritt-card:hover .add-to-collection-button:hover {
    opacity: 1;
}

.collecting-active .add-to-collection-button {
    opacity: 0.7;
}

/* ==============================
   10. Modal-Dialog
   ============================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    counter-reset: step;
    position: relative;
    background-color: hsla(0, 0%, 100%, 0.95);
    color: black;
    margin: 2rem auto;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: modalFade 0.3s ease-in-out;
}

.modal-content h2::before {
    counter-increment: step;
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-speed) ease;
}

.close-button:hover,
.close-button:focus {
    background: rgba(0, 0, 0, 0.2);
    outline: 2px solid rgba(0, 0, 0, 0.3);
}

@keyframes modalFade {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================
   11. Responsive Design
   ============================== */
@media (max-width: 768px) {
    .tree-container {
        gap: 1rem;
        padding: 0.5rem;
    }

    .section-column {
        min-width: 150px;
    }

    .card {
        padding: 0.75rem;
        min-height: 120px;
    }

    .tooltip {
        /* Für mobile, Tooltip unter der Karte statt daneben */
        left: 0;
        top: 100%;
        transform: none;
        margin-top: 0.5rem;
        max-width: 100%;
    }

    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .search-container {
        width: 100%;
        min-width: auto;
    }
}

/* ==============================
   12. Animationen
   ============================== */
/* Focus Animation */
@keyframes focus-animation {
    0% {
        outline-offset: 0px;
        outline-width: 5px;
        outline-color: rgba(3, 139, 250, 1);
    }
    90% {
        outline-offset: 5px;
        outline-width: 5px;
        outline-color: rgba(3, 139, 250, 0.1);
    }
    100% {
        outline-offset: 0;
        outline-width: 0;
        outline-color: transparent;
    }
}

@keyframes focus-pulse {
    0% {
        outline-offset: 2px;
    }
    50% {
        outline-offset: 4px;
    }
    100% {
        outline-offset: 2px;
    }
}
