/* ==========================================
   LINK-SAFE - OPTIMIERTE CSS STRUKTUR
   BEM-Konvention & Performance-Optimiert
   ========================================== */

/*ANCHOR BASIS & VARIABLEN
   ========================================== */

/* === CSS Custom Properties === */
:root {
    --color-gray: #2e2e2e;
    --color-yellow: #ffc107;
    --color-akzent: #0056b3;
    --background-color: #1e1e1e;
    --text-color: beige;
    --shadow-standard: 0px 0px 20px var(--background-color);
    --shadow-inset: inset 2px -2px 5px 0 var(--color-akzent);
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

/* === Reset & Global Styles === */
* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--color-gray) var(--color-akzent);
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
}

/* === Page Layout === */
.page {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: auto auto 1fr;
    position: relative;
    height: 100dvh;
}

/* === Typography === */
.headline,
.current-folder-header {
    margin-bottom: 20px;
    color: var(--color-akzent);
    word-wrap: break-word;
    display: flex;
    place-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
}

a {
    color: var(--color-akzent);
    text-decoration: none;
    margin-left: 5px;
}

a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 2em;
}

.not_now {
    display: none;
}

/* ANCHOR BUTTONS & INPUTS
   ========================================== */

/* === Standard Button === */
.btn {
    background-color: var(--color-akzent);
    color: var(--text-color);
    border: none;
    border-radius: var(--border-radius);
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
    /* flex: 1; */
}

.btn:hover {
    background-color: var(--color-gray);
    box-shadow: var(--shadow-standard);
    color: var(--color-akzent);
}

/* === Button Modifiers === */
.btn--compact {
    padding: 2px 5px;
    background-color: var(--color-gray);
    color: var(--text-color);
    border: none;
    border-radius: var(--border-radius);
}

.btn--compact:hover {
    color: red;
    box-shadow: var(--shadow-standard);
    cursor: pointer;
}

.btn--fit-content {
    width: fit-content;
}

/* === Icon Buttons === */
.icon-button {
    background: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    padding: 5px;
    color: var(--text-color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-button:hover {
    color: red;
    box-shadow: var(--shadow-standard);
}

/* === Note Button Specific === */
.icon-button--note:hover,
.icon-button--note.icon-button--active {
    background: var(--color-yellow);
    color: #000;
}

.icon-button--note svg {
    color: var(--color-yellow);
    margin-top: 2px;
}

.icon-button--note:hover svg,
.icon-button--note.icon-button--active svg {
    color: #000;
}

/* === Icon Labels (Sidebar Icons) === */
.icon__label {
    display: flex;
    justify-content: center;
    padding: 10px;
    color: var(--color-akzent);
    border-radius: var(--border-radius);
    cursor: pointer;
    background-color: var(--color-gray);
    border: 2px solid transparent;
    /* ← HIER: Unsichtbare Border standardmäßig */
    transition: box-shadow var(--transition-speed);
}

.icon__label:hover {
    box-shadow: var(--shadow-standard);
}

/* === Form Inputs === */
input,
select,
textarea {
    padding: 10px;
    border-radius: var(--border-radius);
    border: none;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
    resize: none;
    width: 100%;
    line-height: 20px;
}


/*ANCHOR HAMBURGER NAVIGATION
   ========================================== */

.hamburger__toggle {
    display: none;
}

.hamburger__container-toggle-label {
    position: fixed;
    top: 15px;
    left: 15px;
    display: none;
    width: 30px;
    height: 25px;
    cursor: pointer;
    z-index: 1000;
}

.hamburger__toggle-label-bar {
    display: block;
    height: 3px;
    background: var(--color-akzent);
    margin-bottom: 5px;
    transition: transform var(--transition-speed), opacity var(--transition-speed);
}

/* === Hamburger Animation === */
.hamburger__toggle:checked+.hamburger__container .hamburger__toggle-label-bar:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger__toggle:checked+.hamburger__container .hamburger__toggle-label-bar:nth-child(2) {
    opacity: 0;
}

.hamburger__toggle:checked+.hamburger__container .hamburger__toggle-label-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.hamburger__toggle:checked~.sidebar {
    display: block;
    height: auto;
    background-color: var(--color-gray);
    padding: 10px;
    box-shadow: 0px 20px 20px rgba(0, 0, 0, 0.5);
}

/*ANCHOR SIDEBAR
   ========================================== */

.sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    display: flex;
    flex-direction: column;
    width: auto;
    background-color: var(--color-gray);
    height: 100dvh;
    z-index: 1000;
}

.sidebar__header {
    position: sticky;
    top: 0;
    background-color: var(--color-gray);
    padding: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar__header-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.sidebar__count {
    font-size: 1rem;
    margin: 0 auto;
}

.sidebar__footer {
    margin-top: auto;
    text-align: center;
    padding: 15px;
    border-top: 2px solid var(--color-akzent);
    order: 4;
}

.sidebar__footer-link {
    color: var(--text-color);
    text-decoration: none;
}

.sidebar__line {
    position: sticky;
    top: 113px;
    width: 100%;
    height: 2px !important;
    min-height: 2px;
    background-color: var(--color-akzent);
}

/*ANCHOR SETTINGS PANELS
   ========================================== */

.settings__toggle {
    display: none;
}

.settings__panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--background-color);
    padding: 20px;
    border: 2px solid var(--color-akzent);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-standard);
    z-index: 1000;
    text-align: center;
    height: 95dvh;
    max-width: 600px;
    overflow-y: scroll;
}

.settings__panel .btn {
    background-color: var(--color-gray);
}

.settings__panel .btn:hover {
    box-shadow: var(--shadow-inset);
}

.settings__toggle:checked~.settings__panel {
    display: block
}

.settings__content-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings__button-group,
.settings__login-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* === Color Buttons === */
.settings__color-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.settings__color-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background-color: transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}

.settings__color-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-standard);
}

/* === Color Presets === */
.settings__color-btn[data-color="#0056b3"] {
    background-color: #0056b3;
}

.settings__color-btn[data-color="#255f28"] {
    background-color: #255f28;
}

.settings__color-btn[data-color="#7e1d1d"] {
    background-color: #7e1d1d;
}

.settings__color-btn[data-color="#b15a04"] {
    background-color: #b15a04;
}

.user-info__container {
    display: flex;
    justify-content: space-around;
    margin: 10px;
}

/*ANCHOR INFO PANELS
   ========================================== */

.info__toggle {
    display: none;
}

.info__panel {
    display: none;
    position: fixed;
    height: 95dvh;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--background-color);
    padding: 20px;
    border: 2px solid var(--color-akzent);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-standard);
    z-index: 1000;
    overflow-y: scroll;
}

.info__toggle:checked~.info__panel {
    display: grid;
}

.info__section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info__section:last-child {
    border-bottom: none;
}

.info__section-title {
    color: var(--color-akzent);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info__steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info__step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info__step-number {
    background: var(--color-akzent);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.info__features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info__feature {
    background: rgba(0, 86, 179, 0.1);
    padding: 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-akzent);
}

.info__content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
}

.info__shortcut {
    display: flex;
    align-items: center;
    gap: 12px;
}

kbd {
    background: var(--color-gray);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    border: 1px solid var(--color-akzent);
}

.info__roadmap-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info__warning {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    border-radius: var(--border-radius);
    padding: 15px;
}

.info__warning-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.info__warning-item {
    padding: 10px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    line-height: 1.3;
}

.info__warning-safe {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid #28a745;
}

.info__warning-danger {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid #dc3545;
}

.info__warning-solution {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid var(--color-yellow);
}

.info__warning-item strong {
    display: block;
    margin-bottom: 5px;
}

.info__warning-item p {
    margin: 0;
    font-size: 0.85rem;
}

.info__feedback-link {
    display: inline-block;
    color: var(--color-akzent);
    text-decoration: underline;
    font-weight: bold;
    margin-left: 0px;
    margin-top: 10px;
}

.info__panel--force-show {
    display: grid !important;
}


/*ANCHOR BACKUP SYSTEM - COMPLETE CSS
   ========================================== */

/* === Backup Main Section === */
.backup__section {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-gray);
    border-radius: var(--border-radius);
    background: var(--background-color);
    box-shadow: var(--shadow-standard);
    color: var(--text-color);
}

.backup__section h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* === Backup Groups === */
.backup__group {
    margin-bottom: 0.75rem;
}

.backup__group:last-child {
    margin-bottom: 0;
}

/* === Backup Toggles === */
.backup__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
    background: #dc3545;
    /* Default: rot (unchecked) */
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
    font-weight: 500;
    user-select: none;
}

.backup__toggle:hover {
    transform: translateY(-1px);
    border-color: var(--color-akzent);
    box-shadow: var(--shadow-standard);
}

.backup__toggle--checked {
    background: #28a745;
    /* grün (checked) */
}

.backup__toggle--disabled {
    background: var(--color-gray);
    cursor: not-allowed;
    opacity: 0.6;
}

.backup__toggle--disabled:hover {
    transform: none;
    border-color: var(--color-gray);
    box-shadow: none;
}

/* === Backup Labels === */
.backup__label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

/* === Backup Select Fields === */
.backup__select {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid var(--color-akzent);
    border-radius: var(--border-radius);
    background: var(--color-gray);
    color: var(--text-color);
    font-size: 0.85rem;
    transition: border-color var(--transition-speed);
}

.backup__select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.backup__select:enabled {
    cursor: pointer;
}

.backup__select:enabled:hover {
    border-color: var(--color-akzent);
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.2);
}

.backup__select:focus {
    outline: none;
    border-color: var(--color-akzent);
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.3);
}

/* === Backup Status Display === */
.backup__status {
    background: var(--color-gray);
    border: 1px solid var(--color-akzent);
    border-radius: var(--border-radius);
    padding: 0.6rem;
    margin: 0.5rem 0;
    font-size: 0.8rem;
}

.backup__status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.backup__status-item:last-child {
    margin-bottom: 0;
}

.backup__status-item strong {
    color: var(--color-akzent);
}

/* === Backup Buttons === */
.backup__button {
    margin-bottom: 0.5rem;
    background: var(--color-akzent);
    color: var(--text-color);
    border: none;
    border-radius: var(--border-radius);
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-speed);
    width: 100%;
}

.backup__button:hover {
    background: var(--color-gray);
    color: var(--color-akzent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-standard);
}

.backup__button:active {
    transform: translateY(0);
}

.backup__button:disabled {
    background: var(--color-gray);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.backup__button--danger {
    background: #dc3545;
    color: white;
}

.backup__button--danger:hover {
    background: #c82333;
    color: white;
}

/* === Backup Details (Collapsible) === */
.backup__details {
    border: 1px solid var(--color-gray);
    border-radius: var(--border-radius);
    background: var(--background-color);
    overflow: hidden;
    margin-bottom: 1rem;
}

.backup__details:last-child {
    margin-bottom: 0;
}

.backup__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--color-gray);
    color: var(--text-color);
    cursor: pointer;
    list-style: none;
    transition: all var(--transition-speed);
    user-select: none;
    border: none;
    margin: 0;
}

.backup__summary:hover {
    box-shadow: var(--shadow-inset);
    background: rgba(0, 86, 179, 0.1);
}

.backup__summary::-webkit-details-marker {
    display: none;
}

.backup__summary::marker {
    display: none;
}

.backup__summary:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-akzent);
}

.backup__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
}

.backup__arrow {
    font-size: 0.8rem;
    transition: transform var(--transition-speed);
    color: var(--color-akzent);
    font-weight: bold;
}

.backup__details[open] .backup__arrow {
    transform: rotate(180deg);
}

.backup__content {
    padding: 1rem;
    background: var(--background-color);
    border-top: 1px solid var(--color-gray);
}

/* === Backup Content Animation === */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.backup__details[open] .backup__content {
    animation: slideDown 0.3s ease-out;
}

/* === Backup Path Display === */
.backup__path-info {
    background: var(--color-gray);
    border: 1px solid var(--color-akzent);
    border-radius: var(--border-radius);
    padding: 0.6rem;
    margin: 0.3rem 0;
    font-size: 0.85rem;
    font-family: 'Monaco', 'Menlo', monospace;
    word-break: break-all;
}

.backup__path-note {
    color: rgba(190, 190, 190, 0.8);
    font-style: italic;
    line-height: 1.3;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    margin: 0.5rem 0;
}

.backup__path-note small {
    display: block;
    margin-top: 0.5rem;
    line-height: 1.4;
    font-size: 0.8rem;
}

/* === Backup Controls === */
.backup__controls {
    display: flex;
    gap: 0.5rem;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}

.backup__controls .backup__button {
    flex: 1;
    margin-bottom: 0;
    min-width: 120px;
}

/* === Backup Status Indicators (LEDs) === */
.backup-status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 0.3rem;
    transition: all 0.3s ease;
}

.backup-status-indicator--active {
    background: #28a745;
    box-shadow: 0 0 6px #28a745;
}

.backup-status-indicator--inactive {
    background: #dc3545;
    box-shadow: 0 0 4px rgba(220, 53, 69, 0.4);
}

.backup-status-indicator--working {
    background: var(--color-yellow);
    animation: backupPulse 1.5s infinite;
    box-shadow: 0 0 6px var(--color-yellow);
}

@keyframes backupPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

/* === Backup Special Links/Buttons === */
.backup__brave-link {
    background-color: var(--background-color);
    padding: 2px 6px;
    border: 1px solid var(--color-akzent);
    border-radius: var(--border-radius);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8em;
    color: var(--color-akzent);
    cursor: pointer;
    text-decoration: underline;
    display: inline-block;
    transition: all var(--transition-speed);
}

.backup__brave-link:hover {
    background: var(--color-akzent);
    color: var(--text-color);
    text-decoration: none;
}

/* === Backup Notes/Details Enhancement === */
.backup__note-details {
    border: 2px solid var(--color-gray);
}

.backup__note-details .backup__summary {
    background: var(--color-gray);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.backup__note-details .backup__content {
    background: var(--background-color);
}

/* === Mobile Responsive Backup === */
@media (max-width: 850px) {
    .backup__details {
        max-height: none;
    }

    .backup__controls {
        flex-direction: column;
    }

    .backup__controls .backup__button {
        width: 100%;
        min-width: auto;
    }

    .backup__summary {
        padding: 0.6rem 0.8rem;
    }

    .backup__content {
        padding: 0.75rem;
    }

    .backup__section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .backup__group {
        margin-bottom: 0.5rem;
    }

    .backup__toggle {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .backup__path-info {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

/* === Backup High Contrast Mode === */
@media (prefers-contrast: high) {
    .backup__toggle {
        border: 2px solid var(--text-color);
    }

    .backup__select {
        border: 2px solid var(--color-akzent);
    }

    .backup__button {
        border: 2px solid var(--color-akzent);
    }

    .backup__details {
        border: 2px solid var(--color-akzent);
    }

    .backup-status-indicator {
        border: 1px solid var(--text-color);
    }
}

/* === Backup Reduced Motion === */
@media (prefers-reduced-motion: reduce) {

    .backup__toggle,
    .backup__button,
    .backup__summary,
    .backup__arrow,
    .backup-status-indicator {
        transition: none;
        animation: none;
        transform: none !important;
    }

    .backup__toggle:hover,
    .backup__button:hover {
        transform: none !important;
    }

    .backup__details[open] .backup__content {
        animation: none;
    }
}

/* === Print Styles for Backup === */
@media print {
    .backup__section {
        break-inside: avoid;
        border: 1px solid #000;
        background: white;
        color: black;
    }

    .backup__toggle,
    .backup__button {
        background: white !important;
        color: black !important;
        border: 1px solid #000 !important;
    }

    .backup__controls,
    .backup-status-indicator {
        display: none !important;
    }
}


/*ANCHOR Welcome Tooltip */
.welcome-tooltip {
    position: absolute;
    top: 80%;
    left: 150%;
    background: var(--color-gray);
    color: var(--text-color);
    padding: 8px 12px;
    border: 3px solid var(--color-yellow);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0px 0px 20px 3px rgba(255, 167, 38, 0.75), 0px 0px 20px 3px rgba(255, 167, 38, 0.75) inset;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    margin-top: 8px;
}

.welcome-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 30%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-bottom: 16px solid var(--color-yellow);
}

.welcome-tooltip--show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
    pointer-events: auto;
}

.welcome-tooltip__close {
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
    margin-left: 8px;
    padding: 0;
    line-height: 1;
}

.welcome-tooltip__close:hover {
    color: #666;
}

/* Info-Button Container für relative Positionierung */
.info__label-container {
    position: relative;
    border: 2px solid var(--color-gray);
}

/* Info-Button Glow-Effekt während Tooltip aktiv ist */
.info__label-container--tooltip-active .icon__label {
    border: 2px solid var(--color-yellow);
    box-shadow: 0px 0px 20px 3px rgba(255, 167, 38, 0.75), 0px 0px 20px 3px rgba(255, 167, 38, 0.75) inset !important;
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/*ANCHOR BOOKMARKLET PANEL
   ========================================== */

.bookmarklet__section {
    padding: 1rem;
    border: 1px solid var(--color-akzent);
    border-radius: var(--border-radius);
    background: var(--background-color);
    text-align: center;
}

.bookmarklet__description {
    color: var(--text-color);
    line-height: 1.4;
}

.bookmarklet__drag-area {
    margin: 0.5rem 0;
    padding: 1rem;
    background: rgba(0, 86, 179, 0.1);
    border: 2px dashed var(--color-akzent);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
}

.bookmarklet__drag-area:hover {
    background: rgba(0, 86, 179, 0.2);
    border-style: solid;
}

.bookmarklet__drag-link {
    display: inline-block;
    background: linear-gradient(45deg, var(--color-akzent), #0074d9);
    color: white !important;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: var(--shadow-standard);
    transition: all var(--transition-speed);
    cursor: grab;
}

.bookmarklet__drag-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 86, 179, 0.4);
    text-decoration: none;
}

.bookmarklet__drag-link:active {
    cursor: grabbing;
    transform: translateY(0);
}

.bookmarklet__instruction {
    color: var(--color-akzent);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Desktop: Vollständige Bookmarklet-Sektion */
.bookmarklet__section--desktop {
    display: block;
}

/* Mobile: Nur Info-Text */
.bookmarklet__section--mobile {
    display: none;
}

.bookmarklet__mobile-info {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    border-radius: var(--border-radius);
    line-height: 1.4;
}

.bookmarklet__mobile-alternative {
    color: rgba(190, 190, 190, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: 10px;
}


/*ANCHOR MAIN CONTENT
   ========================================== */

.main {
    padding: 20px;
    overflow-y: auto;
}

.main__headline-logo {
    fill: var(--color-akzent);
}


/*ANCHOR Input Groups */
.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* === URL Container with Clipboard Button === */
.input-group__url-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-group__clipboard-btn {
    background: transparent;
    color: var(--text-color);
    border: none;
    cursor: pointer;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.input-group__clipboard-btn:hover {
    background: var(--color-gray);
    box-shadow: var(--shadow-standard);
}

.input-group__clipboard-btn:active {
    transform: translateY(-25%) scale(0.95);
}

.input-group__clipboard-btn:disabled {
    background: var(--color-gray);
    border: 1px solid red;
    border-radius: var(--border-radius);
    opacity: 0.5;
    cursor: not-allowed;
}

/* === Clipboard Button States === */
.input-group__clipboard-btn--loading {
    animation: clipboardPulse 1.5s infinite;
}

.input-group__clipboard-btn--success {
    background: #28a745;
}

.input-group__clipboard-btn--error {
    background: #dc3545;
}

@keyframes clipboardPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/*ANCHOR FORMS
   ========================================== */

/* === Form Container === */
.form-container:not(.form-container--visible) {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-container--visible {
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 400px;
    opacity: 1;
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid var(--color-akzent);
    border-radius: var(--border-radius);
    background: var(--color-gray);
    box-shadow: var(--shadow-standard);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 10px;
    z-index: 200;
}

.form-container--visible .input-group {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/*ANCHOR FirebaseUI Styles */
/* FirebaseUI Container */
.firebaseui-auth-container {
    /* margin-top: 10px; */
}

/* Cookie Declined Message Styles (nur noch für CookieYes-Integration) */
.auth-cookie-declined {
    margin: 10px 0;
    padding: 15px;
    background-color: var(--background-color);
    border: 2px solid #f44336;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-cookie-declined__content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.auth-cookie-declined__icon {
    font-size: 24px;
    color: #f44336;
}

.auth-cookie-declined__text {
    line-height: 1.4;
    color: var(--text-color);
}

.firebaseui-container {
    margin: 10px 0;
    max-width: none;
    background: var(--color-gray);
    border-radius: var(--border-radius);
}

.firebaseui-card-content {
    padding: 0;
    background-color: var(--background-color);
}

/* zusammengeklappt */
.firebaseui-idp-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.firebaseui-list-item {
    margin: 0 !important;
    padding: 0;
    width: 100%;
}

.firebaseui-idp-button {
    border-radius: 8px !important;
    font-family: inherit !important;
    max-width: none;
}

/* auseinander */

.firebaseui-container.mdl-card {
    padding: 0 20px;
}

.firebaseui-card-header {
    padding: 20px 0 0 0;
}

.firebaseui-title {
    color: var(--color-akzent);
}

.firebaseui-relative-wrapper {
    background-color: var(--color-gray);
}

/* Email Input */
.firebaseui-input {
    padding: 10px;
    border-radius: 8px 8px 0 0;
    border: none;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
    resize: none;
    width: 100%;
    line-height: 20px;
    text-align: center;
}

.firebaseui-input:focus {
    outline: none;
    box-shadow: none;
}

.mdl-textfield__label {
    color: var(--text-color);
    top: 0;
}

.mdl-textfield {
    background-color: var(--color-gray);
}

.firebaseui-error-wrapper {
    background-color: var(--color-gray);
}

/* Sign-in Button */
.mdl-button {
    border-radius: var(--border-radius);
}



/*ANCHOR LINK CARDS
   ========================================== */

/* === Link Grid === */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* === Base Link Card === */
.link-card {
    position: relative;
    background: var(--color-gray);
    border-radius: var(--border-radius);
    padding: 12px;
    box-shadow: var(--shadow-standard);
    transition: all var(--transition-speed);
    border-top: 3px solid var(--color-akzent);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0px 0px 20px 3px var(--color-akzent), 0px 0px 20px 3px var(--color-akzent) inset;
    z-index: 100;
    position: relative;
}

/* === Link Card Components === */
.link-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 12px;
}

.link-card__title {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.3;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em;
}

.link-card__title:hover {
    color: var(--color-akzent);
}

.link-card__url {
    color: rgba(190, 190, 190, 0.8);
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: var(--border-radius);
    font-family: 'Monaco', 'Menlo', monospace;
}

.link-card__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.link-card__meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: rgba(190, 190, 190, 0.9);
    background: rgba(0, 0, 0, 0.2);
    padding: 3px 8px;
    border-radius: var(--border-radius);
    width: 100%;
    min-width: 0;
}

.link-card__meta-text {
    min-width: 0;
    flex: 1;
}

.link-card__meta-icon {
    width: 14px;
    height: 14px;
    opacity: 0.8;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.link-card__actions {
    display: flex;
    justify-content: center;
    gap: 3px;
    opacity: 0.7;
    transition: opacity var(--transition-speed);
    flex-shrink: 0;
}

/* === Note Overlay === */
.link-card__note-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.link-card:has(.link-card__note-overlay--show) {
    z-index: 200;
    position: relative;
}

.link-card__note-overlay--show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.link-card__note {
    background: var(--color-gray);
    border: 2px solid var(--color-yellow);
    border-radius: var(--border-radius);
    padding: 12px;
    font-size: 0.85rem;
    color: var(--text-color);
    line-height: 1.4;
    box-shadow: var(--shadow-standard), 0 8px 25px rgba(255, 193, 7, 0.3);
    position: relative;
}

.link-card__note::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--color-yellow);
}

.link-card__note::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 21px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--color-gray);
}

.link-card__note-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-speed);
}

.link-card__note-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.link-card__note-close svg {
    width: 12px;
    height: 12px;
    color: var(--text-color);
}

/*ANCHOR FOLDER CARDS
   ========================================== */

.folder-card {
    background: var(--color-gray);
    border: 3px solid var(--color-yellow);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: slideInFromLeft 0.5s ease-out;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.folder-card:hover {
    transform: translateY(-4px);
    box-shadow: 0px 0px 20px 3px rgba(255, 167, 38, 0.75), 0px 0px 20px 3px rgba(255, 167, 38, 0.75) inset;
}

.folder-card .folder-card__title {
    font-weight: 600;
    color: var(--color-akzent);
    font-size: 1.1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.folder-card__stats {
    font-weight: 500;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    line-height: 1.4;
}

.folder-card:hover .link-card__meta-icon {
    transform: translateX(5px);
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/*ANCHOR FOLDER TREE
   ========================================== */

/* === Tree Container === */
#folder-tree {
    overflow-x: auto;
}

#folder-tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#folder-tree li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

#folder-tree ul ul {
    margin-left: 20px;
    border-left: 1px solid #404040;
    padding-left: 8px;
}

/* === Tree Rows === */
.folder-tree__row {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 32px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.folder-tree__row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* === Toggle Controls === */
.folder-tree__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.folder-tree__arrow {
    font-size: 12px;
    line-height: 1;
    transition: transform 0.2s ease;
    transform-origin: center;
}

.folder-tree__toggle:hover .folder-tree__arrow {
    color: var(--color-akzent);
    transform: rotate(0deg) scale(2);
}

.folder-tree__toggle.expanded .folder-tree__arrow {
    transform: rotate(90deg) scale(1);
}

.folder-tree__toggle.expanded:hover .folder-tree__arrow {
    color: var(--color-akzent);
    transform: rotate(90deg) scale(2);
}

.folder-tree__spacer {
    display: inline-block;
    width: 28px;
    flex-shrink: 0;
}

/* === Folder Labels === */
.folder-tree__label {
    flex: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-tree__label:hover {
    text-decoration: underline 3px var(--color-akzent);
}

.folder-tree__label.selected {
    background-color: var(--color-akzent);
    color: var(--text-color);
    font-weight: 500;
}

/* === Tree Controls === */
.folder-tree__controls {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.folder-tree__row:hover .folder-tree__controls {
    opacity: 1;
}

.folder-tree__control-btn {
    padding: 1px 2px !important;
    background-color: var(--color-gray);
    color: var(--text-color);
    border: none;
    border-radius: 3px;
    min-width: 18px;
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.folder-tree__control-btn:hover {
    color: red;
    box-shadow: var(--shadow-standard);
    cursor: pointer;
    transform: scale(1.1);
}

.folder-tree__control-btn svg {
    flex-shrink: 0;
}

/* === Tree States === */
.folder-tree__favorites-icon {
    margin-right: -15px;
    opacity: 0.7;
    flex-shrink: 0;
    order: -1;
}

.folder-tree__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    opacity: 0.6;
    pointer-events: none;
}

.folder-tree__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

.folder-card--loading {
    opacity: 0.6;
    pointer-events: none;
}

.folder-card--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-akzent);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* === Tree Scrollbar === */
#folder-tree::-webkit-scrollbar {
    width: 6px;
}

#folder-tree::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#folder-tree::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#folder-tree::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/*ANCHOR BREADCRUMB NAVIGATION
   ========================================== */

/* === Enhanced Header === */
.current-folder-header--enhanced {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
    padding: 15px 0;
    border-bottom: 2px solid var(--color-akzent);
}

/* Basis-Layout (wie vorher) */
.folder-header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    transition: all 0.2s ease;
    /* Smooth transitions */
}

/* Wrap-Layout (JavaScript-gesteuert) */
.folder-header__content.header--wrapped {
    justify-content: center !important;
    text-align: center;
}

.folder-header__content.header--wrapped .folder-header__breadcrumb {
    flex-basis: 100%;
    justify-content: center;
    margin-bottom: 8px;
}

.folder-header__content.header--wrapped .folder-header__actions {
    flex-basis: auto;
    justify-content: center;
}

/* Breadcrumb-Optimierungen für schmale Displays */
.header--wrapped .breadcrumb__item--clickable {
    padding: 3px 6px;
    /* Kompakter */
    font-size: 0.9rem;
}

.header--wrapped .breadcrumb__separator {
    margin: 0 3px;
    /* Weniger Abstand */
}

.folder-header__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 300px;
    /* flex-grow, flex-shrink, basis */
    min-width: 0;
    /* Wichtig für text-overflow */
    max-width: 100%;
}

.breadcrumb__item {
    font-size: 1.1rem;
    font-weight: 500;
    white-space: nowrap;
}

.breadcrumb__item--clickable {
    background: none;
    border: none;
    color: var(--color-akzent);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.breadcrumb__item--clickable:hover {
    background: var(--color-akzent);
    color: var(--text-color);
}

.breadcrumb__item--current {
    color: var(--color-akzent);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: var(--border-radius);

}

.breadcrumb__separator {
    color: var(--color-akzent);
    opacity: 0.6;
    font-weight: bold;
    user-select: none;
}

/*ANCHOR FOLDER ACTIONS
   ========================================== */

/* Actions: Kompakte Breite, aber nicht schrumpfen */
.folder-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    /* Keine Größenänderung */
    min-width: fit-content;
}

/* Force wrap bei sehr schmalen Screens */
@media (max-width: 600px) {
    .folder-header__breadcrumb {
        flex-basis: 100%;
        /* Erzwingt neue Zeile */
        justify-content: center;
    }

    .folder-header__actions {
        flex-basis: 100%;
        /* Actions auch in neue Zeile */
        justify-content: center;
    }
}

.folder-action__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--color-gray);
    color: var(--text-color);
    border: 1px solid var(--color-akzent);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.folder-action__btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.folder-action__btn:hover {
    background: var(--color-akzent);
    color: var(--text-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-standard), 0 4px 12px rgba(0, 86, 179, 0.3);
}

.folder-action__btn--primary {
    background: var(--color-akzent);
    color: var(--text-color);
    font-weight: 600;
}

.folder-action__btn--primary:hover {
    background: var(--color-gray);
    color: var(--color-akzent);
}

.folder-action__btn--primary.folder-action__btn--active {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.folder-action__btn--primary.folder-action__btn--active:hover {
    background: #c82333;
    border-color: #c82333;
}

.folder-action__btn--danger {
    border-color: #dc3545;
    color: #dc3545;
}

.folder-action__btn--danger:hover {
    background: #dc3545;
    color: white;
    box-shadow: var(--shadow-standard), 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* === Mobile Actions Toggle === */
.folder-header__mobile-toggle {
    display: none;
}

.mobile-toggle__icon {
    margin-left: 8px;
    transition: transform 0.2s ease;
}

/*ANCHOR SEARCH
   ========================================== */

.search-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.search {
    background-color: var(--color-gray);
    padding-right: 40px;
}

.search-group__input-container {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.search__clear-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
    opacity: 0.7;
}

.search__clear-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
    color: var(--color-akzent);
}

.search__clear-btn:focus {
    outline: 2px solid var(--color-akzent);
    outline-offset: 2px;
}

.search-highlight {
    background: var(--color-yellow);
    color: #000;
    padding: 1px 3px;
    border-radius: 2px;
}

/* === Note Cards (erweitert Link-Cards) === */
.note-card {
    border-top-color: #ff9800;
    /* Orange für Notizen */
}

.note-card__title {
    color: #ff9800;
    font-weight: 600;
}

.note-card__content {
    margin: 8px 0;
}

.note-card__preview {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 14px;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Markdown-Styling für Note-Card Vorschau */
.note-card__preview h1,
.note-card__preview h2,
.note-card__preview h3 {
    color: var(--color-akzent);
    margin: 0 0 4px 0;
    font-size: inherit;
    font-weight: 600;
}

.note-card__preview p {
    margin: 0 0 4px 0;
}

.note-card__preview strong {
    font-weight: 600;
    color: var(--text-color);
}

.note-card__preview em {
    font-style: italic;
}

.note-card__preview code {
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 3px;
    border-radius: 2px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
}

.note-card__preview ul,
.note-card__preview ol {
    margin: 0;
    padding-left: 16px;
}

.note-card__preview li {
    margin: 0;
}

.note-card__meta {
    color: #888;
    font-size: 12px;
    margin-top: 8px;
}

.note-card__actions {
    margin-top: 8px;
}

/* === Empty State für Notizen === */
.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    text-align: center;
    color: var(--text-color);
}

.empty-state__content {
    max-width: 400px;
    padding: 20px;
}

.empty-state__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state__title {
    color: var(--color-akzent);
    margin-bottom: 8px;
    font-size: 20px;
}

.empty-state__description {
    opacity: 0.7;
    margin-bottom: 20px;
    line-height: 1.4;
}

.btn--primary {
    background-color: var(--color-akzent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-speed);
}

.btn--primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* === Notizen-Form === */
.notes-form {
    border-left: 4px solid #ff9800;
    background: var(--background-color);
    z-index: 100;
    position: relative;
    margin-top: 20px;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-standard);
}

.notes-form__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn--secondary {
    background-color: var(--color-gray);
    color: var(--text-color);
    border: 1px solid #555;
}

.btn--secondary:hover {
    background-color: #444;
    transform: translateY(-1px);
}

#note-content {
    min-height: 200px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

.note-preview {
    background: var(--color-gray);
    border: 1px solid #555;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.note-preview h1,
.note-preview h2,
.note-preview h3 {
    color: var(--color-akzent);
    margin-top: 0;
    margin-bottom: 10px;
}

.note-preview p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.note-preview code {
    background: #333;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.note-preview pre {
    background: #333;
    padding: 10px;
    border-radius: var(--border-radius);
    overflow-x: auto;
}

.note-preview blockquote {
    border-left: 3px solid var(--color-akzent);
    margin: 0;
    padding-left: 15px;
    font-style: italic;
    opacity: 0.8;
}

/* === Modal Centering === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal__content {
    background: var(--background-color);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* === Modal Fields (ohne Grid) === */
.modal__field {
    margin-bottom: 15px;
}

.modal__field input,
.modal__field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #555;
    border-radius: var(--border-radius);
    background-color: var(--color-gray);
    color: var(--text-color);
    font-size: 14px;
    font-family: inherit;
}

.modal__field textarea {
    resize: vertical;
    min-height: 200px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.5;
}

.modal__field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.modal__field-header label {
    font-weight: 600;
    color: var(--text-color);
}

.modal__preview {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #555;
    border-radius: var(--border-radius);
    background-color: var(--color-gray);
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.6;
    overflow-y: auto;
}

.modal__preview h1,
.modal__preview h2,
.modal__preview h3 {
    margin: 0 0 10px 0;
}

.modal__preview p {
    margin: 0 0 10px 0;
}

.modal__preview ul,
.modal__preview ol {
    margin: 0 0 10px 20px;
}

.btn--small {
    padding: 6px 12px;
    font-size: 12px;
}

/* === Trash Section Styles === */
.trash-section-header {
    margin: 20px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.trash-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.trash-card {
    opacity: 0.8;
    border-top: 3px solid #f44;
}

.trash-actions .icon-button {
    background-color: var(--color-gray-light);
}

.trash-actions .icon-button:hover {
    background-color: var(--color-primary);
}

/* === Trash Folder Cards === */
.trash-folder-card {
    border-left: 3px solid #f44;
    background: linear-gradient(135deg, var(--color-gray) 0%, rgba(255, 68, 68, 0.1) 100%);
}

.trash-folder-card:hover {
    border-left-color: #ff6b6b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.2);
}

.back-button-card {
    background: linear-gradient(135deg, var(--color-gray) 0%, rgba(0, 123, 255, 0.1) 100%);
}

.back-button-card:hover {
    border-left-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

/*ANCHOR STATUS & NOTIFICATIONS
   ========================================== */

.status {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 4px;
    display: none;
    z-index: 5000;
}

/*ANCHOR CONTROL HUB
   ========================================== */

.control-hub {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-gray);
    border-top: 1px solid var(--color-akzent);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    z-index: 1000;
    padding: 0;
    height: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    background: var(--color-gray);
    border: none;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 50px;
    gap: 1px;
    font-size: 0.65rem;
}

.status-btn:not(.status-btn--readonly):hover {
    background: var(--color-akzent);
    transform: translateY(-1px);
}

.status-btn--readonly {
    cursor: default;
}

.status-btn__icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.9;
}

.status-btn__label {
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    margin-top: 1px;
}

.status-btn__led {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1;
}

/* LED Status Colors */
.led--active {
    background: #28a745;
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.6);
}

.led--inactive {
    background: #dc3545;
    box-shadow: 0 0 4px rgba(220, 53, 69, 0.4);
}

.led--working {
    background: var(--color-yellow);
    animation: ledPulse 1.5s infinite;
    box-shadow: 0 0 8px rgba(255, 193, 7, 0.6);
}

.led--warning {
    background: #ff6b35;
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.6);
}

@keyframes ledPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.9);
    }
}

/* Mobile Optimierungen */
@media (max-width: 850px) {
    .control-hub {
        height: 50px;
        border-top: 2px solid var(--color-akzent);
    }

    .status-btn {
        min-height: 50px;
        padding: 6px 8px;
        gap: 2px;
    }

    .status-btn__icon {
        width: 15px;
        height: 15px;
    }

    .status-btn__label {
        font-size: 0.7rem;
        font-weight: 600;
    }

    .status-btn__led {
        top: 7px;
        right: 7px;
        width: 7px;
        height: 7px;
    }

    /* Haupt-Inhalt Padding für Mobile Status Bar */
    .main {
        padding-bottom: 60px;
    }
}

/* Desktop: Kompakter Overlay in Header */
@media (min-width: 851px) {
    .control-hub {
        position: absolute;
        top: 15px;
        right: 15px;
        bottom: auto;
        left: auto;
        width: auto;
        height: auto;

        /* Glassmorphism Effekt */
        background: rgba(46, 46, 46, 0.85);
        backdrop-filter: blur(12px) saturate(120%);
        border: 1px solid rgba(0, 86, 179, 0.4);
        border-radius: 12px;

        /* Erweiterte Schatten */
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.4),
            0 2px 8px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            inset 0 -1px 0 rgba(0, 0, 0, 0.1);

        /* Kompaktes Grid Layout */
        grid-template-columns: auto auto auto;
        gap: 2px;
        padding: 4px;

        /* Smooth Hover Effekte */
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .control-hub:hover {
        background: rgba(46, 46, 46, 0.95);
        backdrop-filter: blur(16px) saturate(130%);
        border-color: rgba(0, 86, 179, 0.6);
        box-shadow:
            0 12px 40px rgba(0, 0, 0, 0.5),
            0 4px 12px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
        transform: translateY(-1px);
    }

    .status-btn {
        min-height: 32px;
        min-width: 48px;
        padding: 5px 8px;
        border-radius: 8px;
        margin: 1px;
        gap: 1px;

        /* Subtile Glassmorphism für Buttons */
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(4px);
        border: 1px solid rgba(255, 255, 255, 0.1);

        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .status-btn:not(.status-btn--readonly):hover {
        background: rgba(0, 86, 179, 0.8);
        backdrop-filter: blur(8px) saturate(120%);
        border-color: rgba(0, 86, 179, 1);
        transform: translateY(-1px) scale(1.02);
        box-shadow:
            0 4px 12px rgba(0, 86, 179, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    .status-btn--readonly {
        /* background: rgba(255, 255, 255, 0.02); */
        /* border-color: rgba(255, 255, 255, 0.05); */
        cursor: default;
        border: none;
        background-color: transparent;
    }

    .status-btn__icon {
        width: 12px;
        height: 12px;
        opacity: 1;
    }

    .status-btn__label {
        font-size: 0.6rem;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    }

    .status-btn__led {
        top: 3px;
        right: 3px;
        width: 5px;
        height: 5px;
        border: 1px solid rgba(0, 0, 0, 0.2);
    }

    /* Enhanced LED Effects für Desktop */
    .led--active {
        box-shadow:
            0 0 8px rgba(40, 167, 69, 0.8),
            0 0 4px rgba(40, 167, 69, 0.6) inset;
    }

    .led--working {
        box-shadow:
            0 0 8px rgba(255, 193, 7, 0.8),
            0 0 4px rgba(255, 193, 7, 0.6) inset;
    }

    .led--warning {
        box-shadow:
            0 0 8px rgba(255, 107, 53, 0.8),
            0 0 4px rgba(255, 107, 53, 0.6) inset;
    }

    .led--inactive {
        box-shadow:
            0 0 4px rgba(220, 53, 69, 0.6),
            0 0 2px rgba(220, 53, 69, 0.4) inset;
    }

    /* Desktop: Kein Bottom-Padding für Main Content */
    .main {
        padding-bottom: 20px;
    }

    /* Header Position für Status Bar Overlay */
    .main header {
        position: relative;
        z-index: 50;
    }
}

/* Ultra-wide Desktop Anpassungen */
@media (min-width: 1400px) {
    .control-hub {
        top: 20px;
        right: 20px;
        border-radius: 16px;
        padding: 6px;
    }

    .status-btn {
        min-width: 52px;
        min-height: 36px;
        padding: 6px 10px;
        border-radius: 10px;
    }

    .status-btn__icon {
        width: 14px;
        height: 14px;
    }

    .status-btn__label {
        font-size: 0.65rem;
    }
}

/* High Contrast Mode Unterstützung */
@media (prefers-contrast: high) {
    .control-hub {
        border-width: 2px;
        backdrop-filter: none;
        background: var(--color-gray) !important;
    }

    .status-btn {
        border: 1px solid var(--color-akzent);
        backdrop-filter: none;
    }

    .status-btn__led {
        border: 1px solid var(--text-color);
    }
}

/* Reduced Motion Unterstützung */
@media (prefers-reduced-motion: reduce) {

    .control-hub,
    .status-btn,
    .status-btn__led {
        transition: none;
        animation: none;
        transform: none !important;
    }

    .control-hub:hover {
        transform: none !important;
    }

    .status-btn:hover {
        transform: none !important;
    }
}

/* Print Styles */
@media print {
    .control-hub {
        display: none !important;
    }
}

/*ANCHOR MODAL SYSTEM
   ========================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    padding: 0;
}

.modal--show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.modal__content {
    position: relative;
    background: var(--background-color);
    border: 2px solid var(--color-akzent);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-standard);
    max-width: 500px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 2001;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid var(--color-akzent);
    margin-bottom: 20px;
}

.modal__title {
    color: var(--color-akzent);
    margin: 0;
    font-size: 1.3rem;
}

.modal__close {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.modal__close:hover {
    background: var(--color-akzent);
    color: var(--text-color);
}

.modal__close svg {
    width: 20px;
    height: 20px;
}

.modal__body {
    padding: 0 20px 20px 20px;
}

.modal__section-title {
    color: var(--color-akzent);
    margin: 20px 0 15px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.modal__button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

/* Modal-spezifische Anpassungen */
.modal .firebaseui-auth-container {
    margin: 15px 0;
}

.modal .auth-section {
    margin-bottom: 20px;
}

.modal .backup__group {
    margin-bottom: 15px;
}

.modal .backup__status {
    margin: 15px 0;
    font-size: 0.9rem;
}

/* Mobile Modal Optimierungen */
@media (max-width: 850px) {
    .modal__content {
        width: 95vw;
        max-height: 90vh;
        border-radius: 0;
        margin: 0;
    }

    .modal__button-group {
        grid-template-columns: 1fr;
    }

    /* Haupt-Inhalt Padding für Status Bar */
    .main {
        padding-bottom: 80px;
    }
}

/* Desktop Haupt-Inhalt Padding */
@media (min-width: 851px) {
    .main {
        padding-bottom: 70px;
    }
}

/*ANCHOR TRASH
   ========================================== */

.trash {
    display: flex;
    flex-direction: column;
}

.trash__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: auto;
}

.trash__item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 5px;
    border: 2px solid var(--color-akzent);
    border-radius: var(--border-radius);
}

.trash__item:hover {
    box-shadow: var(--shadow-standard);
}

.trash__info {
    text-align: center;
    margin-top: 0;
}

/*ANCHOR COUNTER & STATISTICS
   ========================================== */

.counter-display {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9em;
    line-height: 1.4;
}

.counter-main {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.3em;
}

.counter-icon {
    font-size: 1.1em;
}

.counter-value {
    font-weight: bold;
    color: var(--color-akzent, #0056b3);
}

.counter-label {
    font-size: 0.9em;
    opacity: 0.8;
}

.counter-separator {
    opacity: 0.5;
    margin: 0 0.3em;
}

.counter-details {
    font-size: 0.8em;
    opacity: 0.7;
    line-height: 1.2;
}

.folder-count-badge {
    background: var(--color-akzent, #0056b3);
    color: white;
    font-size: 0.75em;
    padding: 0.2em 0.5em;
    border-radius: 1em;
    margin-left: 0.5em;
}

.toolbar-counter {
    display: flex;
    gap: 1em;
    font-size: 0.85em;
    opacity: 0.8;
}

.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.8em;
    padding: 0.3em 1em;
    z-index: 1000;
}

.status-counters {
    display: flex;
    justify-content: center;
    gap: 2em;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.sidebar-stats {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9em;
    line-height: 1.4;
}

.sidebar-stats__main {
    margin-bottom: 0.3em;
}

.sidebar-stats__main strong {
    color: var(--color-akzent, #0056b3);
    font-weight: 600;
}

.sidebar-stats__details {
    opacity: 0.8;
    font-size: 0.85em;
}

.sidebar-stats__details small {
    line-height: 1.2;
}

#sidebar-count svg {
    color: var(--color-yellow);
}

/*ANCHOR TOOLTIPS
   ========================================== */

.folder-tree__control-btn[title]:hover::after,
.folder-card__actions .icon-button[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--background-color);
    color: var(--text-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    border: 1px solid var(--color-akzent);
    margin-bottom: 5px;
}

/*ANCHOR RESPONSIVE 850
   ========================================== */

@media (max-width: 850px) {

    /* === Layout === */
    .page {
        grid-template-columns: 1fr;
    }

    .hamburger__container-toggle-label {
        display: block;
        top: 10px;
        left: 10px;
    }

    .sidebar {
        display: none;
        position: absolute;
        width: 100%;
        height: auto;
        z-index: 999;
        border-bottom: 2px solid var(--color-akzent);
    }

    .sidebar__header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1001 !important;
    }

    .sidebar__line {
        top: 120px;
        z-index: 2;
        margin: 5px 0;
    }

    .sidebar__footer {
        padding: 5px;
        margin-top: 110px;
        padding-bottom: -5px;
    }

    .main {
        width: 100%;
        height: 100dvh;
    }

    /* === Forms === */
    .input-group {
        display: flex;
        flex-direction: column;
    }

    .search-group {
        flex-direction: column;
    }

    .btn--fit-content {
        width: 100%;
    }

    /* === Panels === */
    .settings__panel,
    .info__panel {
        height: 100dvh;
        width: 100vw;
        max-width: none;
        overflow-y: auto;
        /* statt scroll */
        position: fixed;
        top: 0;
        left: 0;
        transform: none;
        /* NEU: Verhindert Scroll-Chaining */
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .settings__toggle:checked~.settings__panel {
        display: block !important;
    }

    /* gap Alternative für das block */
    .settings__panel>*+* {
        margin-top: 20px;
    }

    .settings__content-grid {
        grid-template-columns: 1fr;
    }

    .bookmarklet__section--desktop {
        display: none;
    }

    .bookmarklet__section--mobile {
        display: block;
    }

    .backup__details {
        max-height: none;
        /* falls height-Limit gesetzt ist */
    }

    .backup__controls {
        flex-direction: column;
    }

    .backup__path-btn {
        width: 100%;
    }

    .backup__summary {
        padding: 0.6rem 0.8rem;
    }

    .backup__content {
        padding: 0.75rem;
    }

    .backup__section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .backup__group {
        margin-bottom: 0.5rem;
    }

    /* === Cards === */
    .link-card {
        padding: 14px;
    }

    .link-card__title {
        font-size: 1rem;
    }

    /* === Folder Actions === */
    .folder-header__content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .folder-header__breadcrumb {
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }

    .breadcrumb__item--clickable {
        font-size: 0.9rem;
        padding: 3px 6px;
    }

    .breadcrumb__item--current {
        font-size: 1.1rem;
        padding: 3px 6px;
    }

    .breadcrumb__separator {
        font-size: 0.8rem;
    }

    .folder-header__actions {
        display: none;
        flex-direction: column;
        gap: 8px;
        border-top: 1px solid var(--color-akzent);
        padding-top: 12px;
    }

    .folder-header__actions--mobile-open {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .folder-header__mobile-toggle {
        display: block;
        text-align: center;
    }

    .folder-action__btn {
        justify-content: center;
        padding: 12px;
        font-size: 0.9rem;
    }

    .folder-action__btn svg {
        width: 14px;
        height: 14px;
    }

    /* === Folder Tree === */
    .folder-tree__controls {
        opacity: 1;
        gap: 1px;
    }

    .folder-tree__control-btn {
        min-width: 16px;
        min-height: 16px;
    }

    .folder-tree__control-btn svg {
        width: 12px;
        height: 12px;
    }

    .folder-tree__label {
        font-size: 13px;
    }

    #folder-tree ul ul {
        margin-left: 16px;
    }

    .folder-card__actions {
        opacity: 1;
    }

    /* === Sidebar === */
    .sidebar__header-icons {
        gap: 6px;
    }

    .sidebar__add-link-btn {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .sidebar__add-link-btn svg {
        width: 10px;
        height: 10px;
    }

    /* === Folder Cards === */
    .folder-card {
        border-width: 2px;
    }

    .folder-card__title {
        font-size: 1rem;
    }

    .folder-card__stats {
        font-size: 0.8rem;
        padding: 4px 8px;
    }

    .folder-card .link-card__meta-item {
        font-size: 0.8rem;
        padding: 3px 8px;
    }

    .folder-card .link-card__meta-icon {
        width: 12px;
        height: 12px;
    }

    .folder-card:hover {
        transform: none;
    }

    .folder-card:active {
        transform: translateY(-1px);
    }

    /* === Counter === */
    .counter-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3em;
    }

    .status-counters {
        flex-direction: column;
        gap: 0.2em;
        text-align: center;
    }
}

/*ANCHOR RESPONSIVE 480
   ========================================== */

@media (max-width: 480px) {

    .info__features-grid {
        grid-template-columns: 1fr;
    }

    .breadcrumb__item--clickable {
        font-size: 0.8rem;
        padding: 2px 4px;
    }

    .breadcrumb__item--current {
        font-size: 1rem;
        padding: 3px 6px;
    }

    .folder-action__btn {
        padding: 10px 8px;
        font-size: 0.8rem;
    }

    .current-folder-header--enhanced {
        padding: 10px 0;
        margin-bottom: 20px;
    }

    .folder-card {
        padding: 12px;
    }

    .folder-card__title {
        font-size: 0.95rem;
    }

    .folder-card__stats {
        font-size: 0.75rem;
    }
}

/*ANCHOR ACCESSIBILITY
   ========================================== */

/* === Focus Management === */
.folder-tree__controls:focus-within {
    opacity: 1;
}

.folder-card__actions:focus-within {
    opacity: 1;
}

*[tabindex]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-akzent);
}

/* === Modern Focus Management === */
.btn,
.icon-button,
.icon__label,
.folder-tree__control-btn,
.folder-action__btn,
.folder-card,
.breadcrumb__item--clickable,
.settings__color-btn,
.backup__select {
    outline: none;
    /* Entferne Standard-Outline */
}

/* Focus nur bei Keyboard-Navigation */
.btn:focus-visible,
.icon-button:focus-visible,
.icon__label:focus-visible,
.folder-tree__control-btn:focus-visible,
.folder-action__btn:focus-visible,
.folder-card:focus-visible,
.breadcrumb__item--clickable:focus-visible,
.settings__color-btn:focus-visible,
.backup__select:focus-visible {
    box-shadow: 0 0 0 2px var(--color-akzent);
}

/* Form-Elemente: Focus immer sichtbar (da oft Keyboard-Input) */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow:
        0 0 0 2px var(--color-akzent),
        var(--shadow-inset);
}

/* Form-Elemente ausblenden vor Keyboard-Navigation wenn Container nicht sichtbar */
.form-container:not(.form-container--visible) input,
.form-container:not(.form-container--visible) select,
.form-container:not(.form-container--visible) textarea,
.form-container:not(.form-container--visible) button {
    tabindex: -1 !important;
    pointer-events: none;
}

/* Oder noch radikaler: */
.form-container:not(.form-container--visible) {
    visibility: hidden;
    /* Versteckt vor Screen Readers und Keyboard */
}

.form-container--visible {
    visibility: visible;
}

/* === Autofill Styling für dunkles Theme === */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
select:-webkit-autofill,
textarea:-webkit-autofill {
    /* Box-shadow Trick für Webkit */
    -webkit-box-shadow: 0 0 0 30px var(--color-gray) inset !important;
    -webkit-text-fill-color: var(--text-color) !important;

    /* Fallback */
    background-color: var(--color-gray) !important;
    color: var(--text-color) !important;

    /* Transition Trick als zusätzliche Sicherheit */
    transition: background-color 5000s ease-in-out 0s;
}

/* Firefox */
input:-moz-autofill,
select:-moz-autofill,
textarea:-moz-autofill {
    background-color: var(--color-gray) !important;
    color: var(--text-color) !important;
}

/* === High Contrast Mode === */
@media (prefers-contrast: high) {
    .folder-card {
        border-width: 3px;
    }

    .folder-tree__control-btn {
        border: 1px solid var(--color-akzent);
    }

    .link-card {
        border: 1px solid var(--color-akzent);
    }

    .folder-action__btn {
        border-width: 2px;
    }

    .breadcrumb__item--clickable {
        border: 1px solid var(--color-akzent);
    }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .folder-card,
    .folder-tree__row,
    .folder-tree__control-btn,
    .icon__label,
    .link-card,
    .folder-action__btn,
    .breadcrumb__item--clickable,
    .form-container {
        transition: none;
    }

    .folder-card {
        animation: none;
    }

    .folder-card:hover {
        transform: none;
    }

    .folder-card:active {
        transform: none;
    }

    .form-container--visible .input-group {
        animation: none;
    }
}

/* === Touch Devices === */
@media (hover: none) {

    .folder-action__btn:hover,
    .breadcrumb__item--clickable:hover,
    .icon__label:hover {
        transform: none;
    }
}

/*ANCHOR PRINT STYLES
   ========================================== */

@media print {

    .sidebar,
    .hamburger__container-toggle-label,
    .settings__panel,
    .info__panel,
    .folder-tree__controls,
    .folder-card__actions,
    .folder-header__actions,
    .folder-header__mobile-toggle,
    .icon__label {
        display: none !important;
    }

    .page {
        grid-template-columns: 1fr;
        background: white;
        color: black;
    }

    .link-card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .folder-card {
        background: white !important;
        border: 2px solid #333 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .folder-card::before,
    .folder-card::after {
        display: none !important;
    }

    .folder-card__stats {
        background: #f5f5f5 !important;
        color: #333 !important;
        border: 1px solid #ccc !important;
    }

    .folder-header__breadcrumb {
        justify-content: flex-start;
    }

    .breadcrumb__item--clickable {
        color: #000;
        background: none;
    }

    .current-folder-header--enhanced {
        border-bottom: 1px solid #000;
    }
}

/*ANCHOR PERFORMANCE OPTIMIERUNGEN
   ========================================== */

/* === GPU-Beschleunigung === */
.form-container,
.folder-action__btn,
.breadcrumb__item--clickable,
.icon__label {
    will-change: transform, opacity;
    backface-visibility: hidden;
}