/* Basic Body & Theming – Theme-Variablen (Standard = Default/Cyberpunk) */
:root {
    --ms-bg-dark: #0d1117;
    --ms-bg-mid: #161b22;
    --ms-border: #30363d;
    --ms-text: #c9d1d9;
    --ms-text-muted: #8b949e;
    --ms-accent: #E0AFFF;
    --ms-accent-secondary: #C77EFF;
    --ms-accent-rgb: 224, 175, 255;
    --ms-success: #00ff41;
    --ms-panel-bg: linear-gradient(145deg, #0d1117 0%, #161b22 100%);
    /* Glas-Effekt: Basisfarbe + Standardwerte für Transparenz/Blur */
    --ms-panel-rgb: 13, 17, 23;
    --ms-panel-opacity: 0.9;
    --ms-panel-blur: 8px;
    --narrative-bg: #0d1117;
    --narrative-border: #21262d;
    --narrative-fg: #8b949e;
    --narrative-fg-bright: #c9d1d9;
    --narrative-accent: #E0AFFF;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background-color: #0a0a0a; /* Fallback, falls Bild nicht lädt */
    background-image: url('../assets/body_background/landscape_backiee.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--ms-text);
    font-family: 'IBM Plex Mono', monospace;
    margin: 0;
    padding: 10px 10px 0 10px; /* einheitlicher Abstand oben = links = rechts zum Displayrand */
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
    box-sizing: border-box;
}

/* Waybar (Hyprland-Style) – oberhalb der Panels; Abstand wie Container durch body-padding */
.waybar {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 34px;
    margin: 0;
    background: rgba(var(--ms-panel-rgb), var(--ms-panel-opacity));
    backdrop-filter: blur(var(--ms-panel-blur));
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    font-family: 'Nunito', sans-serif;
    position: relative;
}

.waybar-left,
.waybar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.waybar-left {
    flex: 1;
    justify-content: flex-start;
}

.waybar-right {
    flex: 1;
    justify-content: flex-end;
    gap: 12px;
}

.waybar-divider {
    width: 1px;
    height: 18px;
    background: var(--ms-border);
    opacity: 0.8;
    flex-shrink: 0;
    margin: 0 2px;
}

.waybar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.waybar-date,
.waybar-time {
    font-family: 'Nunito', sans-serif;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--ms-text);
    white-space: nowrap;
}

.waybar-time-divider {
    width: 1px;
    height: 14px;
    background: var(--ms-border);
    opacity: 0.8;
    flex-shrink: 0;
}

.waybar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    color: var(--ms-text);
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    font-size: 1rem;
}

.waybar-icon:hover {
    color: var(--ms-accent);
    background: transparent;
}

.waybar-icon-app {
    color: var(--ms-accent);
    background: transparent;
}

.waybar-icon-app.is-active {
    background: rgba(var(--ms-accent-rgb), 0.08);
}

.waybar-icon-app:hover {
    background: transparent;
}

.waybar-icon-app.is-active:hover {
    background: rgba(var(--ms-accent-rgb), 0.08);
}

/* Links: alle App-Icons (Linux, Narrative, Terminal, Status, Media) gleiche Größe */
.waybar-left .waybar-icon-app {
    width: 26px;
    height: 26px;
}

.waybar-right .waybar-icon {
    width: 18px;
    height: 18px;
    cursor: default;
}

#waybar-logout {
    cursor: pointer;
}

/* 3-Column Layout; zentral ausgerichtet */
.container {
    display: flex;
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.column {
    padding: 10px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.left-column, .right-column {
    width: 25%;
}

.left-column {
    flex-direction: column;
}

.right-column {
    font-family: 'Nunito', sans-serif;
}

.right-column h3 {
    font-size: 0.92em;
}

.right-column ul li {
    font-size: 0.92em;
}

/* Status-Panel: Objectives und Skills als Dashboard-Karten abgegrenzt */
.status-panel #objectives,
.status-panel #skills {
    background: rgba(var(--ms-panel-rgb), var(--ms-panel-opacity));
    border: 1px solid var(--ms-border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(var(--ms-panel-blur));
}

.status-panel #objectives {
    margin-top: 8px;
}

.status-panel #skills:last-child {
    margin-bottom: 0;
}

.status-panel #objectives h3,
.status-panel #skills h3 {
    margin-top: 0;
    margin-bottom: 0.5em;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ms-border);
    font-size: 0.92em;
}

#objectives .objectives-sub {
    font-size: 0.85em;
    margin: 0.6em 0 0.25em 0;
    color: var(--ms-text-muted);
}

/* Erledigt: klickbarer Header mit Chevron (auf-/zuklappen) */
.objectives-completed-header {
    display: flex;
    align-items: center;
    gap: 0.35em;
    width: 100%;
    padding: 0;
    margin: 0.6em 0 0.25em 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.85em;
    color: var(--ms-text-muted);
    cursor: pointer;
    text-align: left;
}

.objectives-completed-header:hover {
    color: var(--ms-accent);
}

.objectives-completed-header .objectives-completed-toggle {
    margin-left: auto;
    font-size: 0.9em;
    transition: transform 0.2s ease;
}

.objectives-completed-wrap {
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.objectives-completed-wrap.is-collapsed {
    max-height: 0;
}

.objectives-completed-wrap:not(.is-collapsed) {
    max-height: 500px;
}

.objectives-completed-recent {
    font-size: 0.82em;
    color: var(--ms-success);
    margin: 0.2em 0 0 0;
    padding: 0.25em 0;
    min-height: 1.5em;
}

.objectives-completed-recent:empty {
    display: none;
}

.objectives-completed-recent i {
    margin-right: 0.35em;
}

#objectives .objective-active {
    color: var(--ms-accent);
    list-style: none;
}

#objectives .objective-active i {
    margin-right: 0.35em;
}

#objectives .objective-completed {
    color: var(--ms-success);
    list-style: none;
}

#objectives .objective-completed i {
    margin-right: 0.35em;
}

/* Skills: Progress bars + icons */
#skills-list {
    list-style: none;
    padding-left: 0;
    margin: 0.25em 0 0 0;
}

#skills .skill-row {
    margin-bottom: 0.65em;
    font-size: 0.88em;
}

#skills .skill-header {
    display: flex;
    align-items: center;
    gap: 0.35em;
    margin-bottom: 0.2em;
    color: var(--ms-text);
    font-weight: 600;
}

#skills .skill-header .skill-level {
    color: var(--ms-success);
    margin-left: auto;
}

#skills .skill-header i {
    color: var(--ms-accent);
    width: 1em;
}

#skills .skill-progress-wrap {
    height: 6px;
    background: #21262d;
    border-radius: 3px;
    overflow: hidden;
}

#skills .skill-progress-fill {
    height: 100%;
    background: var(--ms-accent);
    border-radius: 3px;
    transition: width 0.4s ease-out;
}

#skills .skill-xp-label {
    font-size: 0.75em;
    color: var(--ms-text-muted);
    margin-top: 0.15em;
}

/* Game Solution: Dashboard-Karte + Markdown wie Narrative (details/summary) */
.status-panel #game-solution {
    background: rgba(var(--ms-panel-rgb), var(--ms-panel-opacity));
    border: 1px solid var(--ms-border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 0;
    backdrop-filter: blur(var(--ms-panel-blur));
}

.status-panel #game-solution h3 {
    margin-top: 0;
    margin-bottom: 0.5em;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ms-border);
    font-size: 0.92em;
}

.game-solution-content {
    font-family: 'Nunito', sans-serif;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--ms-text-muted);
    max-height: 280px;
    overflow-y: auto;
    padding: 0.3rem 0;
    --solution-border: var(--narrative-border);
    --solution-accent: var(--ms-accent);
}

.game-solution-content h1 {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 0.4rem 0;
    color: var(--ms-text);
}

.game-solution-content h2,
.game-solution-content h3 {
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0.4rem 0 0.25rem 0;
    color: #c9d1d9;
}

.game-solution-content details {
    margin: 0.4rem 0;
    border: 1px solid var(--solution-border);
    border-radius: 6px;
    background: rgba(13, 17, 23, 0.6);
    overflow: hidden;
}

.game-solution-content summary {
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    list-style: none;
    font-size: 0.88em;
    font-weight: 600;
    color: var(--solution-accent);
}

.game-solution-content summary::-webkit-details-marker {
    display: none;
}

.game-solution-content details[open] summary {
    border-bottom: 1px solid var(--solution-border);
}

.game-solution-content .game-solution-details-body {
    padding: 0.4rem 0.5rem 0.5rem;
}

.game-solution-content pre,
.game-solution-content code {
    font-size: 0.75rem;
    background: #161b22;
    border-radius: 4px;
    padding: 0.2em 0.35em;
}

.game-solution-content pre {
    padding: 0.4rem 0.5rem;
    overflow-x: auto;
    margin: 0.35rem 0;
}

.game-solution-content ul,
.game-solution-content ol {
    margin: 0.25rem 0;
    padding-left: 1.2rem;
}

.game-solution-content hr {
    border: none;
    border-top: 1px solid var(--solution-border);
    margin: 0.5rem 0;
}

.left-column .narrative-panel {
    flex: 1 1 auto;
    min-height: 0;
}

.narrative-panel {
    padding-bottom: 6px;
}

.narrative-panel h2,
.terminal-panel h2 {
    font-family: 'Nunito', sans-serif;
}

/* Narrative: Markdown-Inhalt (game_concept.md) – einheitlich, clean, Hyprland/Arch-Vibe */
.narrative-content {
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    line-height: 1.45;
    overflow: hidden;
    word-wrap: break-word;
    padding: 0.4rem 0.2rem 0.4rem 0;
}

.narrative-content h1 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.35rem;
    color: var(--narrative-fg-bright);
    border-bottom: 1px solid var(--narrative-border);
}

.narrative-content h2,
.narrative-content h3 {
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0.5rem 0 0.3rem 0;
    color: var(--narrative-fg-bright);
}

.narrative-content details {
    margin: 0.5rem 0;
    border: 1px solid var(--narrative-border);
    border-radius: 6px;
    background: var(--narrative-bg);
    overflow: hidden;
}

.narrative-content summary {
    cursor: pointer;
    padding: 0.4rem 0.5rem;
    list-style: none;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--narrative-accent);
    transition: background 0.15s ease;
}

.narrative-content summary:hover {
    background: rgba(var(--ms-accent-rgb), 0.12);
}

.narrative-content summary::-webkit-details-marker {
    display: none;
}

.narrative-content details[open] summary {
    border-bottom: 1px solid var(--narrative-border);
    margin-bottom: 0;
    padding-bottom: 0.35rem;
}

.narrative-content details > *:not(summary) {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.narrative-content details > *:last-child {
    padding-bottom: 0.5rem;
}

/* Uni-Messenger im Narrative-Panel */
.messenger {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.messenger-sidebar,
.messenger-main {
    flex: 1 1 auto;
    min-height: 0;
}

.messenger-sidebar {
    width: auto;
    min-width: 0;
    max-width: none;
    border-right: none;
    padding-right: 4px;
    margin-right: 0;
    overflow-y: auto;
}

.messenger-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.messenger--list .messenger-main {
    display: none;
}

.messenger--chat .messenger-sidebar {
    display: none;
}

.messenger-chat-list-title {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--narrative-fg);
    margin: 0 0 0.3rem 0;
}

.messenger-chat-list-title i {
    font-size: 0.8rem;
    color: var(--ms-accent);
}

.messenger-chat-list-title span {
    line-height: 1;
}

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

.messenger-chat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    margin-bottom: 2px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.messenger-chat-item:hover {
    background: rgba(224, 175, 255, 0.06);
}

.messenger-chat-item.is-active {
    background: rgba(224, 175, 255, 0.12);
    color: var(--narrative-fg-bright);
}

.messenger-chat-avatar {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(224, 175, 255, 0.25);
    background: #0d1117;
}

.messenger-chat-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.messenger-chat-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.messenger-chat-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--narrative-fg-bright);
}

.messenger-chat-preview {
    font-size: 0.7rem;
    color: var(--narrative-fg);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.messenger-chat-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

@keyframes messenger-unread-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.messenger-chat-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #E0AFFF;
    animation: messenger-unread-blink 1.4s ease-in-out infinite;
}

.messenger-chat-unread-count {
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 999px;
    background: rgba(224, 175, 255, 0.16);
    color: #E0AFFF;
}

.messenger-header {
    display: flex;
    flex-direction: column;
    padding-bottom: 4px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--narrative-border);
}

.messenger-header-top {
    display: flex;
    align-items: center;
    gap: 6px;
}

.messenger-header-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.messenger-header-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--narrative-fg-bright);
}

.messenger-header-sub {
    font-size: 0.7rem;
    color: var(--narrative-fg);
}

.messenger-header-back {
    font-size: 0.7rem;
    color: var(--narrative-accent);
    cursor: pointer;
    margin-bottom: 2px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.messenger-header-avatar {
    width: 22px;
    height: 22px;
}

.messenger-header-back:hover {
    text-decoration: underline;
}

.messenger-messages {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 2px;
}

.messenger-input {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 4px;
    margin-top: auto;
    border-top: 1px solid var(--narrative-border);
}

.messenger-input-field {
    flex: 1;
    min-width: 0;
    background: #0d1117;
    border-radius: 6px;
    border: 1px solid #30363d;
    padding: 4px 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: #c9d1d9;
}

.messenger-input-field:focus {
    outline: none;
    border-color: #E0AFFF;
    box-shadow: 0 0 0 1px rgba(224, 175, 255, 0.35);
}

.messenger-input-send {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(224, 175, 255, 0.4);
    background: rgba(224, 175, 255, 0.1);
    color: #E0AFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    font-size: 0.8rem;
}

.messenger-input-send i {
    pointer-events: none;
}

.messenger-message {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 0.5rem;
    width: 100%;
    margin-bottom: 6px;
}

.messenger-message--left > div {
    grid-column: 1 / 2;
    justify-self: flex-start;
}

.messenger-message--right > div {
    grid-column: 2 / 3;
    justify-self: flex-end;
}

.messenger-bubble {
    max-width: 80%;
    padding: 4px 7px;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.4;
}

.messenger-message--left .messenger-bubble {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(48, 54, 61, 0.9);
    color: var(--narrative-fg-bright);
}

@keyframes messenger-new-bubble-highlight {
    0% {
        background: rgba(224, 175, 255, 0.26);
        border-color: rgba(224, 175, 255, 0.9);
        box-shadow: 0 0 0 0 rgba(224, 175, 255, 0.45);
    }
    70% {
        background: rgba(224, 175, 255, 0.18);
        border-color: rgba(224, 175, 255, 0.7);
        box-shadow: 0 0 0 6px rgba(224, 175, 255, 0);
    }
    100% {
        background: rgba(15, 23, 42, 0.9);
        border-color: rgba(48, 54, 61, 0.9);
        box-shadow: none;
    }
}

.messenger-message--left .messenger-bubble.messenger-bubble--new {
    animation: messenger-new-bubble-highlight 2.8s ease-out forwards;
}

.messenger-bubble--typing {
    opacity: 0.85;
    font-style: italic;
}

.messenger-bubble--news-link {
    cursor: pointer;
    text-align: left;
    width: 100%;
    border-color: rgba(var(--ms-accent-rgb, 224, 175, 255), 0.4);
}

.messenger-bubble--news-link:hover {
    border-color: var(--ms-accent);
    background: rgba(var(--ms-accent-rgb, 224, 175, 255), 0.08);
}

.messenger-bubble--news-link .messenger-bubble-news-headline {
    display: block;
    margin-bottom: 4px;
}

.messenger-bubble--news-link .messenger-bubble-news-url {
    display: block;
    font-size: 0.85em;
    color: var(--ms-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.messenger-message--right .messenger-bubble {
    background: rgba(224, 175, 255, 0.14);
    border: 1px solid rgba(224, 175, 255, 0.5);
    color: var(--narrative-fg-bright);
}

.messenger-message-meta {
    font-size: 0.65rem;
    color: #8b949e;
    margin-top: 1px;
}

.messenger-empty {
    font-size: 0.75rem;
    color: var(--narrative-fg);
    margin-top: 0.5rem;
}

.narrative-content p {
    margin: 0.3rem 0;
    color: var(--narrative-fg);
}

.narrative-content ul,
.narrative-content ol {
    margin: 0.3rem 0;
    padding-left: 0.5rem;
    list-style: none;
    color: var(--narrative-fg);
}

.narrative-content li {
    margin: 0.15rem 0;
}

.narrative-content li::marker {
    display: none;
}

.narrative-content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 0.8em;
    margin: 0.5rem 0;
    border: 1px solid var(--narrative-border);
    border-radius: 6px;
    overflow: hidden;
}

.narrative-content th,
.narrative-content td {
    border: 1px solid var(--narrative-border);
    padding: 0.3rem 0.45rem;
    text-align: left;
    color: var(--narrative-fg);
}

.narrative-content th {
    background: rgba(33, 38, 45, 0.6);
    color: var(--narrative-fg-bright);
    font-weight: 600;
}

.narrative-content tr:nth-child(even) td {
    background: rgba(33, 38, 45, 0.25);
}

.narrative-content code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
    padding: 0.1rem 0.3rem;
    background: var(--narrative-bg);
    border: 1px solid var(--narrative-border);
    border-radius: 4px;
    color: var(--narrative-fg-bright);
}

.narrative-content a {
    color: var(--narrative-accent);
    text-decoration: none;
}

.narrative-content a:hover {
    text-decoration: underline;
}

.narrative-content strong {
    color: var(--narrative-fg-bright);
    font-weight: 600;
}

/* Media Player (linke Spalte, unten) – Card mit Cover */
.media-player {
    flex-shrink: 0;
    background: rgba(var(--ms-panel-rgb), var(--ms-panel-opacity));
    backdrop-filter: blur(var(--ms-panel-blur));
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    padding: 14px;
    margin-top: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Nunito', sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    position: relative;
}

.media-player.media-player--visualizer {
    position: relative;
    box-sizing: border-box;
    height: var(--media-player-visualizer-height, auto);
    min-height: 0;
    overflow: hidden;
}

.media-player.media-player-focused {
    border-color: rgba(var(--ms-accent-rgb), 0.6);
    box-shadow: 0 0 0 1px rgba(var(--ms-accent-rgb), 0.35),
                0 0 14px rgba(var(--ms-accent-rgb), 0.15);
}

.media-player-cover-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 200px;
    margin: 0 auto 12px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(var(--ms-panel-rgb), var(--ms-panel-opacity));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.media-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-visualizer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    border-radius: inherit;
}

.media-player-cover-wrap.media-cover-wrap--visualizer .media-cover {
    display: none;
}

.media-player-cover-wrap.media-cover-wrap--visualizer .media-visualizer {
    display: block;
}

.media-player.media-player--visualizer .media-player-cover-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.media-player.media-player--visualizer .media-player-info,
.media-player.media-player--visualizer .media-player-progress,
.media-player.media-player--visualizer .media-player-controls {
    display: none;
}

.media-player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 10px;
    font-size: 0.85rem;
    line-height: 1.3;
}

.media-title {
    color: var(--ms-accent);
    font-weight: 700;
    font-size: 0.95rem;
}

.media-artist {
    color: var(--ms-accent-secondary);
    font-size: 0.8rem;
    margin-top: 2px;
}

.media-player-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.media-time-current,
.media-time-total {
    font-size: 0.75rem;
    color: var(--ms-text-muted);
    min-width: 2.2em;
}

.media-time-total {
    text-align: right;
}

.media-progress-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #21262d;
    border-radius: 3px;
    outline: none;
}

.media-progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ms-accent);
    cursor: pointer;
    border: 1px solid var(--ms-accent-secondary);
}

.media-progress-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ms-accent);
    cursor: pointer;
    border: 1px solid var(--ms-accent-secondary);
}

.media-player-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 8px;
    margin-bottom: 10px;
    padding: 6px 10px;
    border: 1px solid rgba(var(--ms-accent-rgb), 0.25);
    border-radius: 12px;
}

.media-controls-left,
.media-controls-center,
.media-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.media-controls-left {
    justify-self: flex-start;
}

.media-controls-center {
    justify-self: center;
}

.media-controls-right {
    justify-self: flex-end;
}

.media-btn-volume {
    margin-top: 4px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.media-volume-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.media-volume-inline {
    width: 70px;
}

.media-volume-slider {
    width: 100%;
    height: 3px;
    accent-color: rgba(var(--ms-accent-rgb), 0.7);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}

.media-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(var(--ms-accent-rgb), 0.95);
    border: none;
}

.media-volume-slider::-moz-range-thumb {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(var(--ms-accent-rgb), 0.95);
    border: none;
}

.media-btn {
    background: none;
    border: none;
    color: rgba(var(--ms-accent-rgb), 0.75);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: none;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.media-btn:hover {
    background: none;
    color: rgba(var(--ms-accent-rgb), 1);
    box-shadow: none;
}

.media-btn:active {
    background: none;
    color: rgba(var(--ms-accent-rgb), 0.9);
}

.media-btn-play {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    color: rgba(var(--ms-accent-rgb), 0.7);
}

.media-btn-play.media-btn-play--active {
    color: rgba(var(--ms-accent-rgb), 1);
}

.middle-column {
    width: 50%;
    min-width: 0; /* damit Flex-Item bei schmalem Viewport schrumpfen kann */
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Panels within Columns */
.panel {
    background: rgba(var(--ms-panel-rgb), var(--ms-panel-opacity));
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(var(--ms-panel-blur));
}

/* Fenster-Rahmen: zuletzt angeklicktes Panel – lila Glow (Windows 11 / Linux-Style) */
.panel.panel-focused {
    border-color: rgba(var(--ms-accent-rgb), 0.6);
    box-shadow: 0 0 0 1px rgba(var(--ms-accent-rgb), 0.35),
                0 0 14px rgba(var(--ms-accent-rgb), 0.15);
}

.middle-column .panel {
    margin-bottom: 0;
    border-radius: 0;
}

.middle-column .terminal-panel {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.panel h2, .panel h3 {
    margin-top: 0;
    font-size: 0.92em;
    border-bottom: 1px solid var(--ms-border);
    padding-bottom: 5px;
}

/* Wrapper für Terminal-Ausgabe + Loading-Spinner */
.terminal-output-area {
    position: relative;
    flex-grow: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
}

#terminal-output {
    flex-grow: 1;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px;
    word-wrap: break-word;
}

.terminal-cmatrix-overlay {
    position: absolute;
    inset: 0;
    background: rgba(var(--ms-panel-rgb), 0.96);
    backdrop-filter: blur(var(--ms-panel-blur));
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    z-index: 2;
}

.terminal-cmatrix-overlay[hidden] {
    display: none;
}

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

/* Loading-Spinner während challenges/ASCII laden (From Uiverse.io by abrahamcalsin) */
.terminal-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--ms-panel-bg);
    border-radius: 0 0 12px 12px;
}

.terminal-loading.is-hidden {
    display: none;
}

.terminal-loading-text {
    margin: 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--ms-accent);
}

.dot-spinner {
    --uib-size: 2.8rem;
    --uib-speed: 0.9s;
    --uib-color: var(--ms-accent);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: var(--uib-size);
    width: var(--uib-size);
}

.dot-spinner__dot {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    width: 100%;
}

.dot-spinner__dot::before {
    content: '';
    height: 20%;
    width: 20%;
    border-radius: 50%;
    background-color: var(--uib-color);
    transform: scale(0);
    opacity: 0.5;
    animation: pulse0112 calc(var(--uib-speed) * 1.111) ease-in-out infinite;
    box-shadow: 0 0 20px rgba(var(--ms-accent-rgb), 0.3);
}

.dot-spinner__dot:nth-child(2) { transform: rotate(45deg); }
.dot-spinner__dot:nth-child(2)::before { animation-delay: calc(var(--uib-speed) * -0.875); }
.dot-spinner__dot:nth-child(3) { transform: rotate(90deg); }
.dot-spinner__dot:nth-child(3)::before { animation-delay: calc(var(--uib-speed) * -0.75); }
.dot-spinner__dot:nth-child(4) { transform: rotate(135deg); }
.dot-spinner__dot:nth-child(4)::before { animation-delay: calc(var(--uib-speed) * -0.625); }
.dot-spinner__dot:nth-child(5) { transform: rotate(180deg); }
.dot-spinner__dot:nth-child(5)::before { animation-delay: calc(var(--uib-speed) * -0.5); }
.dot-spinner__dot:nth-child(6) { transform: rotate(225deg); }
.dot-spinner__dot:nth-child(6)::before { animation-delay: calc(var(--uib-speed) * -0.375); }
.dot-spinner__dot:nth-child(7) { transform: rotate(270deg); }
.dot-spinner__dot:nth-child(7)::before { animation-delay: calc(var(--uib-speed) * -0.25); }
.dot-spinner__dot:nth-child(8) { transform: rotate(315deg); }
.dot-spinner__dot:nth-child(8)::before { animation-delay: calc(var(--uib-speed) * -0.125); }

@keyframes pulse0112 {
    0%, 100% { transform: scale(0); opacity: 0.5; }
    50% { transform: scale(1); opacity: 1; }
}

/* Notification container: stacked top to bottom, bottom-right */
.notification-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
    max-width: 320px;
    pointer-events: none;
}

.notification-container .mission-notification {
    pointer-events: auto;
    position: relative;
    bottom: auto;
    right: auto;
}

/* Mission hint notification: slide-in from right, 10s + close */
.mission-notification {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1000;
    max-width: 320px;
    padding: 12px 40px 12px 16px;
    background: var(--ms-panel-bg);
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(var(--ms-accent-rgb), 0.15);
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    color: var(--ms-text);
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
    transition: transform 0.35s ease-out, opacity 0.35s ease-out;
    pointer-events: none;
}

.mission-notification.is-visible {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.mission-notification.is-leaving {
    transform: translateX(calc(100% + 2rem));
    opacity: 0;
}

.mission-notification-text {
    margin: 0;
    line-height: 1.4;
}

.mission-notification-text strong {
    color: var(--ms-accent);
    font-weight: 600;
}

.mission-notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--ms-text-muted);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
}

.mission-notification-close:hover {
    color: var(--ms-accent);
    background: rgba(var(--ms-accent-rgb), 0.1);
}

.mission-notification-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--ms-accent);
}

#terminal-output pre {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    margin: 0;
}

/* Scan progress animation (5s, lilac bar + percentage) */
.scan-progress-container {
    margin-bottom: 8px;
}

.scan-progress-wrap {
    display: inline-block;
    width: 100%;
    max-width: 320px;
    height: 8px;
    background: #21262d;
    overflow: hidden;
    vertical-align: middle;
}

.scan-progress-fill {
    height: 100%;
    background: var(--ms-accent);
    transition: width 0.05s linear;
}

.scan-progress-pct {
    margin-left: 10px;
    color: var(--ms-accent);
    font-weight: 500;
    vertical-align: middle;
}

.terminal-input {
    display: flex;
    background: var(--ms-panel-bg);
    border: 1px solid var(--ms-border);
    border-top: none;
    padding: 5px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.terminal-input.terminal-input-focused {
    border-color: rgba(var(--ms-accent-rgb), 0.6);
    box-shadow: 0 0 0 1px rgba(var(--ms-accent-rgb), 0.35),
                0 0 14px rgba(var(--ms-accent-rgb), 0.15);
}

.prompt {
    margin-right: 10px;
}

#terminal-input-line {
    background-color: transparent;
    border: none;
    color: var(--ms-text);
    caret-color: var(--ms-text);
    width: 100%;
    font-family: inherit;
    font-size: inherit;
}

#terminal-input-line:focus {
    outline: none;
}

/* Fetch (Fastfetch) Style */
.fetch-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin: 15px 0;
    font-family: 'IBM Plex Mono', monospace;
}

.fetch-logo {
    white-space: pre !important;
    color: var(--ms-accent);
    margin: 0;
    line-height: 1.1;
    font-size: 0.85em;
}

.fetch-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 5px;
    font-size: 0.9em;
}

.fetch-header {
    margin-bottom: 5px;
}

.fetch-user {
    color: var(--ms-accent);
    font-weight: bold;
}

.fetch-at {
    color: var(--ms-text);
}

.fetch-host {
    color: var(--ms-accent);
    font-weight: bold;
}

.fetch-sep {
    color: var(--ms-border);
    margin: -2px 0 5px 0;
}

.fetch-line {
    line-height: 1.5;
}

.fetch-label {
    color: var(--ms-accent);
    font-weight: bold;
    display: inline-block;
    min-width: 85px;
}

.fetch-value {
    color: var(--ms-text);
}

/* Editor Specifics */
.editor-panel {
    display: none; /* Hidden by default */
}

.editor-panel h2 {
    font-size: 0.95em;
}

.editor-panel .CodeMirror {
    flex-grow: 1;
    border-top: 1px solid var(--ms-success);
}

/* First-Run Identity Modal */
.identity-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.identity-modal[hidden] {
    display: none;
}

.identity-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.identity-modal-content {
    position: relative;
    width: min(460px, 92vw);
    background: var(--ms-panel-bg);
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.identity-modal-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--ms-border);
}

.identity-modal-header h3 {
    margin: 0;
    font-family: 'Nunito', sans-serif;
    font-size: 1.05em;
    color: var(--ms-accent);
}

.identity-form {
    padding: 16px 18px 18px;
    display: grid;
    gap: 8px;
}

.identity-label {
    color: var(--ms-text);
    font-size: 0.84em;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
}

.identity-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--ms-bg-dark);
    border: 1px solid var(--ms-border);
    border-radius: 8px;
    color: var(--ms-text);
    padding: 10px 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
}

.identity-input:focus {
    outline: none;
    border-color: rgba(var(--ms-accent-rgb), 0.6);
    box-shadow: 0 0 0 1px rgba(var(--ms-accent-rgb), 0.35);
}

.identity-help {
    margin: 2px 0 0;
    color: var(--ms-text-muted);
    font-size: 0.75em;
}

.identity-error {
    min-height: 1.1em;
    margin: 0;
    color: #ff7b72;
    font-size: 0.78em;
}

.identity-submit {
    margin-top: 6px;
    border: 1px solid var(--ms-border);
    border-radius: 8px;
    background: var(--ms-panel-bg);
    color: var(--ms-accent);
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.identity-submit:hover {
    border-color: rgba(var(--ms-accent-rgb), 0.6);
    box-shadow: 0 0 0 1px rgba(var(--ms-accent-rgb), 0.25);
}

/* Background Wallpaper Modal */
.background-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.background-modal[hidden] {
    display: none;
}

.background-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.background-modal-content {
    position: relative;
    background: var(--ms-panel-bg);
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    max-width: 90vw;
    max-height: 85vh;
    width: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.background-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ms-border);
}

.background-modal-header h3 {
    margin: 0;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--ms-accent);
}

.background-modal-close {
    background: transparent;
    border: none;
    color: var(--ms-text);
    font-size: 1.2em;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.background-modal-close:hover {
    color: var(--ms-accent);
}

.background-modal-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

.background-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
}

.background-thumbnail:hover {
    border-color: var(--ms-accent);
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(var(--ms-accent-rgb), 0.4);
}

.background-thumbnail.active {
    border-color: var(--ms-success);
    box-shadow: 0 4px 16px rgba(0, 255, 65, 0.5);
}

.background-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.background-thumbnail-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--ms-text);
    font-size: 0.75em;
    padding: 8px 6px 4px;
    font-family: 'IBM Plex Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Theme Modal (Einstellungen) – gleiche Struktur wie Background-Modal */
.theme-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-modal[hidden] {
    display: none;
}

.theme-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.theme-modal-content {
    position: relative;
    background: rgba(var(--ms-panel-rgb), var(--ms-panel-opacity));
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    max-width: 90vw;
    max-height: 85vh;
    width: 560px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(var(--ms-panel-blur));
}

.theme-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ms-border);
}

.theme-modal-header h3 {
    margin: 0;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--ms-accent);
}

.theme-modal-close {
    background: transparent;
    border: none;
    color: var(--ms-text);
    font-size: 1.2em;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.theme-modal-close:hover {
    color: var(--ms-accent);
}

.theme-modal-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

.theme-modal-glass {
    padding: 14px 20px 18px 20px;
    border-top: 1px solid var(--ms-border);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(calc(var(--ms-panel-blur) * 0.75));
}

.theme-modal-glass h4 {
    margin: 0 0 6px 0;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--ms-accent);
}

.theme-modal-glass-hint {
    margin: 0 0 10px 0;
    font-size: 0.78em;
    color: var(--ms-text-muted);
}

.theme-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.theme-slider-label {
    flex: 0 0 130px;
    font-size: 0.8em;
    color: var(--ms-text-muted);
}

.theme-slider-input {
    flex: 1;
    accent-color: var(--ms-accent);
}

.theme-thumbnail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(0, 0, 0, 0.2);
}

.theme-thumbnail:hover {
    border-color: var(--ms-accent);
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(var(--ms-accent-rgb), 0.3);
}

.theme-thumbnail.active {
    border-color: var(--ms-success);
    box-shadow: 0 4px 12px rgba(0, 255, 65, 0.4);
}

.theme-thumbnail-swatch {
    width: 100%;
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--ms-border);
}

.theme-thumbnail-label {
    font-family: 'Nunito', sans-serif;
    font-size: 0.8em;
    font-weight: 600;
    color: var(--ms-text);
    text-align: center;
    line-height: 1.2;
}

/* News Article Modal (simulierte Browser-Ansicht) */
.news-article-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-article-modal[hidden] {
    display: none;
}

.news-article-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
}

.news-article-modal-content {
    position: relative;
    background: var(--ms-bg-dark, #0d1117);
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
    max-width: 94vw;
    max-height: 88vh;
    width: 720px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.news-article-browser-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--ms-panel-bg);
    border-bottom: 1px solid var(--ms-border);
}

.news-article-browser-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.news-article-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ms-border);
}

.news-article-dot:nth-child(1) { background: #28c840; }
.news-article-dot:nth-child(2) { background: #febc2e; }
.news-article-dot:nth-child(3) { background: #ff5f57; }

.news-article-dot--close {
    padding: 0;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

.news-article-dot--close:hover {
    opacity: 0.9;
    transform: scale(1.15);
}

.news-article-address-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8em;
    color: var(--ms-text-muted);
}

.news-article-address-bar .fa-lock {
    font-size: 0.75em;
    color: var(--ms-success, #28c840);
}

.news-article-page {
    overflow-y: auto;
    padding: 20px 24px 28px;
    background: var(--ms-bg-dark, #0d1117);
    color: var(--ms-text);
    flex: 1;
    min-height: 0;
}

.news-article-site-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ms-border);
}

.news-article-banner {
    margin-bottom: 18px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--ms-border);
}

.news-article-banner-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.news-article-site-logo {
    border-radius: 6px;
    object-fit: contain;
}

.news-article-site-name {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.8em;
    color: var(--ms-accent);
    white-space: nowrap;
}

.news-article-site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.news-article-nav-item {
    font-family: 'Nunito', sans-serif;
    font-size: 0.72em;
    font-weight: 600;
    color: var(--ms-text-muted);
    padding: 6px 10px;
    cursor: default;
}

.news-article-nav-item:hover {
    color: var(--ms-accent);
}

/* News-Site: Sektion + Headline-Liste (Fox-ähnlich) */
.news-article-section {
    font-family: 'Nunito', sans-serif;
}

.news-article-section-title {
    margin: 0 0 14px;
    font-size: 0.9em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ms-accent);
    border-bottom: 2px solid var(--ms-accent);
    padding-bottom: 10px;
}

.news-article-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-article-item {
    border-bottom: 1px solid var(--ms-border);
}

.news-article-item:last-child {
    border-bottom: none;
}

.news-article-item-headline {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 10px 14px 0;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--ms-text);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.news-article-item-headline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--ms-accent);
}

.news-article-item--open .news-article-item-headline {
    border-left-color: var(--ms-accent);
    background: rgba(var(--ms-accent-rgb, 224, 175, 255), 0.06);
}

.news-article-item-headline-text {
    font-weight: 600;
    font-size: 0.88em;
    line-height: 1.4;
    flex: 1;
}

.news-article-item-headline::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--ms-text-muted);
    margin-top: 6px;
    flex-shrink: 0;
    transition: transform 0.2s, border-top-color 0.15s;
}

.news-article-item-headline:hover::after,
.news-article-item--open .news-article-item-headline::after {
    border-top-color: var(--ms-accent);
}

.news-article-item--open .news-article-item-headline::after {
    transform: rotate(180deg);
}

.news-article-item-time {
    font-size: 0.72em;
    color: var(--ms-text-muted);
    flex-shrink: 0;
    margin-left: auto;
    padding-right: 4px;
}

.news-article-item-body {
    display: none;
    padding: 4px 0 20px 14px;
    font-size: 0.82em;
    line-height: 1.6;
    color: var(--ms-text-muted);
    border-left: 3px solid var(--ms-border);
    margin-left: 0;
}

.news-article-item--open .news-article-item-body {
    display: block;
}

.news-article-item-body p {
    margin: 0 0 0.85em;
}

.news-article-item-body p:last-child {
    margin-bottom: 0;
}

/* User Settings Modal (Waybar Linux-Button) */
.user-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-settings-modal[hidden] {
    display: none;
}

.user-settings-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.user-settings-modal-content {
    position: relative;
    background: var(--ms-panel-bg);
    border: 1px solid var(--ms-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    max-width: 90vw;
    max-height: 70vh;
    width: 520px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-settings-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ms-border);
}

.user-settings-modal-header h3 {
    margin: 0;
    font-family: 'Nunito', sans-serif;
    font-size: 1.05em;
    font-weight: 600;
    color: var(--ms-accent);
}

.user-settings-modal-close {
    background: transparent;
    border: none;
    color: var(--ms-text);
    font-size: 1.2em;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.user-settings-modal-close:hover {
    color: var(--ms-accent);
}

.user-settings-modal-body {
    padding: 16px 20px 20px;
    font-size: 0.9em;
    color: var(--ms-text-muted);
}

.user-settings-modal-body p {
    margin: 0 0 0.75rem;
}

.user-settings-danger-button {
    margin-top: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    border: 1px solid #f85149;
    background: rgba(248, 81, 73, 0.1);
    color: #f85149;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.user-settings-danger-button:hover {
    background: rgba(248, 81, 73, 0.18);
    box-shadow: 0 0 12px rgba(248, 81, 73, 0.4);
    transform: translateY(-1px);
}

.user-settings-status {
    margin-top: 0.75rem;
    font-size: 0.85em;
    color: var(--ms-text-muted);
}

/* Theme Overrides (data-theme am html-Element) */
[data-theme="black-dark"] {
    --ms-bg-dark: #0a0a0a;
    --ms-bg-mid: #111111;
    --ms-border: #262626;
    --ms-text: #e5e5e5;
    --ms-text-muted: #a3a3a3;
    --ms-accent: #e5e5e5;
    --ms-accent-secondary: #d4d4d4;
    --ms-accent-rgb: 229, 229, 229;
    --ms-success: #22c55e;
    --ms-panel-bg: linear-gradient(145deg, #0a0a0a 0%, #111111 100%);
    --ms-panel-rgb: 12, 12, 12;
    --narrative-bg: #0a0a0a;
    --narrative-border: #262626;
    --narrative-fg: #a3a3a3;
    --narrative-fg-bright: #e5e5e5;
    --narrative-accent: #e5e5e5;
}

[data-theme="terminal-blue"] {
    --ms-bg-dark: #0d1f2d;
    --ms-bg-mid: #1a2f3d;
    --ms-border: #2d4a5e;
    --ms-text: #c9d1d9;
    --ms-text-muted: #8b9cad;
    --ms-accent: #5ddfff;
    --ms-accent-secondary: #7eb8da;
    --ms-accent-rgb: 93, 223, 255;
    --ms-success: #00ff41;
    --ms-panel-bg: linear-gradient(145deg, #0d1f2d 0%, #1a2f3d 100%);
    --ms-panel-rgb: 15, 31, 45;
    --narrative-bg: #0d1f2d;
    --narrative-border: #2d4a5e;
    --narrative-fg: #8b9cad;
    --narrative-fg-bright: #c9d1d9;
    --narrative-accent: #5ddfff;
}

[data-theme="matrix"] {
    --ms-bg-dark: #0a0a0a;
    --ms-bg-mid: #0d1a0d;
    --ms-border: #1e3d1e;
    --ms-text: #c9d1d9;
    --ms-text-muted: #6b8f6b;
    --ms-accent: #00ff41;
    --ms-accent-secondary: #00cc33;
    --ms-accent-rgb: 0, 255, 65;
    --ms-success: #00ff41;
    --ms-panel-bg: linear-gradient(145deg, #0a0a0a 0%, #0d1a0d 100%);
    --ms-panel-rgb: 10, 18, 10;
    --narrative-bg: #0a0a0a;
    --narrative-border: #1e3d1e;
    --narrative-fg: #6b8f6b;
    --narrative-fg-bright: #c9d1d9;
    --narrative-accent: #00ff41;
}

[data-theme="nord"] {
    --ms-bg-dark: #2e3440;
    --ms-bg-mid: #3b4252;
    --ms-border: #4c566a;
    --ms-text: #d8dee9;
    --ms-text-muted: #81a1c1;
    --ms-accent: #88c0d0;
    --ms-accent-secondary: #81a1c1;
    --ms-accent-rgb: 136, 192, 208;
    --ms-success: #a3be8c;
    --ms-panel-bg: linear-gradient(145deg, #2e3440 0%, #3b4252 100%);
    --ms-panel-rgb: 46, 52, 64;
    --narrative-bg: #2e3440;
    --narrative-border: #4c566a;
    --narrative-fg: #81a1c1;
    --narrative-fg-bright: #d8dee9;
    --narrative-accent: #88c0d0;
}

[data-theme="dracula"] {
    --ms-bg-dark: #282a36;
    --ms-bg-mid: #21222c;
    --ms-border: #44475a;
    --ms-text: #f8f8f2;
    --ms-text-muted: #6272a4;
    --ms-accent: #bd93f9;
    --ms-accent-secondary: #ff79c6;
    --ms-accent-rgb: 189, 147, 249;
    --ms-success: #50fa7b;
    --ms-panel-bg: linear-gradient(145deg, #282a36 0%, #21222c 100%);
    --ms-panel-rgb: 40, 42, 54;
    --narrative-bg: #282a36;
    --narrative-border: #44475a;
    --narrative-fg: #6272a4;
    --narrative-fg-bright: #f8f8f2;
    --narrative-accent: #bd93f9;
}

[data-theme="warm-dark"] {
    --ms-bg-dark: #1c1917;
    --ms-bg-mid: #292524;
    --ms-border: #44403c;
    --ms-text: #e7e5e4;
    --ms-text-muted: #a8a29e;
    --ms-accent: #f59e0b;
    --ms-accent-secondary: #fbbf24;
    --ms-accent-rgb: 245, 158, 11;
    --ms-success: #22c55e;
    --ms-panel-bg: linear-gradient(145deg, #1c1917 0%, #292524 100%);
    --ms-panel-rgb: 28, 25, 23;
    --narrative-bg: #1c1917;
    --narrative-border: #44403c;
    --narrative-fg: #a8a29e;
    --narrative-fg-bright: #e7e5e4;
    --narrative-accent: #f59e0b;
}

[data-theme="light"] {
    --ms-bg-dark: #e4e6eb;
    --ms-bg-mid: #f0f2f5;
    --ms-border: #ccd0d5;
    --ms-text: #1c1e21;
    --ms-text-muted: #65676b;
    --ms-accent: #5b7cff;
    --ms-accent-secondary: #6b4ce6;
    --ms-accent-rgb: 91, 124, 255;
    --ms-success: #31a24c;
    --ms-panel-bg: linear-gradient(145deg, #e4e6eb 0%, #f0f2f5 100%);
    --ms-panel-rgb: 228, 230, 235;
    --narrative-bg: #e4e6eb;
    --narrative-border: #ccd0d5;
    --narrative-fg: #65676b;
    --narrative-fg-bright: #1c1e21;
    --narrative-accent: #5b7cff;
}

/* Responsive: siehe responsive.css (nur Media Queries) */