

.modern-card, .pulse-card, .recovery-card, .theme-card, .news-item, .gallery-photo-item {
    transition: background-color 0.1s ease, border-color 0.1s ease;
    contain: content;
}

body.new-design .fullscreen-app,
body.new-design .modern-card,
body.new-design .pulse-card {
    contain: layout style;
}

.audius-dropdown-menu, .settings-select {
    transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1), transform 0.2s cubic-bezier(0.2, 0, 0, 1), background 0.15s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

#recovery-screen {
    font-family: var(--font-main);
}

#bsod-error-code {
    margin-top: 2rem;
    color: var(--accent-secondary);
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .os-container { padding: 40px 0 0 0; height: 100dvh; align-items: flex-start; }
    .terminal { width: 100%; height: calc(var(--real-height, 100dvh) - 40px); max-height: none; border-radius: 0; }
    body.new-design .os-container { padding: 40px 0 0 0; }
    body.new-design .terminal { height: calc(var(--real-height, 100dvh) - 40px); }
    #lock-time { font-size: clamp(3rem, 15vw, 5rem); } #lock-date { font-size: 1.2rem; }
    .fullscreen-app-header { padding: 0.75rem 1rem; }
    .fullscreen-app-body { padding: 1rem; }
    .player-minimized {
         width: calc(100% - 20px) !important;
         bottom: 10px;
         right: 10px;
    }

    #weather-fullscreen .fullscreen-app-header,
    #wiki-fullscreen .fullscreen-app-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 12px;
    }

    #weatherui-search-form,
    #wikiui-search-form {
        order: 3;
        flex: 1 1 100%;
        max-width: 100% !important;
    }

    .recovery-container {
        padding: 1.25rem;
        width: 96%;
        max-height: 96vh;
    }

    .recovery-v2-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .recovery-v2-header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .recovery-pill-action-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

.fullscreen-app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    z-index: 300;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.25s cubic-bezier(0.2, 0, 0, 1);
    contain: layout style;
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.fullscreen-app-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.fullscreen-app-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--on-surface);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fullscreen-app-body {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
    touch-action: pan-y;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    contain: content;
    will-change: scroll-position, transform;
}

/* Modern Storage/Software UI */
.modern-card {
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.modern-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}

.settings-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    font-weight: 700;
    opacity: 0.9;
}

.modern-progress-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.modern-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.9rem;
}

.modern-list-item:last-child {
    border-bottom: none;
}

.toggle-button {
    min-width: 100px;
    padding: 0.6rem 1rem;
    border-radius: 50px;
    border: none;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.toggle-button.enabled {
    background: var(--accent-primary);
    color: var(--background);
    transform: scale(1.02);
}

.toggle-button.enabled:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.toggle-button.disabled {
    background: rgba(255,255,255,0.08);
    color: var(--on-surface);
    opacity: 0.6;
}

.toggle-button.disabled:hover {
    background: rgba(255,255,255,0.12);
    opacity: 0.8;
}

.settings-footer {
    position: sticky;
    bottom: 0;
    background: var(--background);
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    z-index: 10;
}

.btn-save {
    background: var(--accent-primary);
    color: var(--background);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save:hover {
    filter: brightness(1.1);
}

.btn-discard {
    background: transparent;
    color: var(--on-surface);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-discard:hover {
    background: var(--error);
    color: white;
}

.changelog-v42 {
    font-size: 0.9rem;
    line-height: 1.5;
}

.changelog-v42 h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--on-surface);
}

.changelog-v42 li {
    margin-bottom: 0.75rem;
            }

#lock-interactive {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#lock-interactive.visible {
    opacity: 1;
    pointer-events: all;
}

#lock-slide-hint {
    position: absolute;
    bottom: 2rem;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.5;
    animation: pulse 2s infinite;
}

#status-time { display: flex; align-items: center; gap: 8px; }
.error-message { color: var(--error); }

.command {
    display: flex; align-items: center; padding: 1rem 1.5rem;
    background: color-mix(in srgb, var(--surface-color, var(--surface)) 92%, var(--on-surface, #ffffff) 8%);
    border: none;
    border-top: 1px solid var(--outline);
    border-radius: 0;
    margin: 0;
    flex-shrink: 0; transition: background-color 0.2s ease; position: relative; z-index: 2; max-width: 100%; box-sizing: border-box; flex-wrap: nowrap; overflow: visible;
}
#prompt { margin-right: 0.5rem; flex-shrink: 0; max-width: 50%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }

body.new-design .command {
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 999px !important;
    margin: 0 16px 16px;
    width: auto;
    max-width: calc(100% - 32px);
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.new-design .command:focus-within {
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: none !important;
}

body.new-design .input-field {
    min-height: 34px;
    height: 34px;
    padding: 0 6px;
    font-size: var(--terminal-font-size, 1rem);
    line-height: 34px;
}

html.theme-glassmorphism .command,
html.theme-glass .command,
html.theme-glass-static .command,
html.theme-glassmorphism .command:focus-within,
html.theme-glass .command:focus-within,
html.theme-glass-static .command:focus-within {
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

@media (max-width: 600px) {
    .command {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    body.new-design .command {
        width: auto !important;
        max-width: calc(100% - 20px) !important;
        margin: 0 10px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        padding: 0.65rem 0.8rem !important;
        border-radius: 999px !important;
    }

    body.new-design .input-field {
        min-height: 32px;
        height: 32px;
        padding: 0 4px;
        font-size: var(--terminal-font-size, 1rem);
        line-height: 32px;
    }
}

.player-minimized {
    transform: none !important;
    width: 320px !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
    bottom: 20px;
    right: 20px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.4);
    animation: fadeIn 0.3s ease;
}

.overlay-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--background);
    z-index: 20000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: var(--font-mono);
    animation: fadeIn 0.4s ease-out;
}

.bsod-container, .recovery-container {
    text-align: center;
    width: 100%;
    max-width: 800px;
    padding: 2rem;
}

.bsod-container h1 {
    font-size: 5rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-family: var(--font-main);
    font-weight: 700;
}

.bsod-container p {
    font-size: 1.1rem;
    line-height: 1.6;
}

#bsod-error-code {
    margin-top: 2rem;
    color: var(--accent-secondary);
    font-size: 0.9rem;
}

.shake { animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both; }

@media (max-width: 600px) {
    .os-container { padding: 40px 0 0 0; height: 100dvh; align-items: flex-start; }
    .terminal { width: 100%; height: calc(var(--real-height, 100dvh) - 40px); max-height: none; border-radius: 0; }
    body.new-design .os-container { padding: 40px 0 0 0; }
    body.new-design .terminal { height: calc(var(--real-height, 100dvh) - 40px); }
    #lock-time { font-size: 5rem; } #lock-date { font-size: 1.2rem; }
    .player-minimized {
         width: calc(100% - 20px) !important;
         bottom: 10px;
         right: 10px;
    }
}



.fullscreen-app {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    z-index: 300;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out;
}

.fullscreen-app-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.fullscreen-app-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--on-surface);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fullscreen-app-body {
    padding: 1.5rem;
    flex-grow: 1;
    overflow-y: auto;
}

.close-fullscreen {
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--on-surface);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.close-fullscreen:hover {
    background: var(--error);
    color: white;
}

/* Design v3: keep the Close pill in the UI font everywhere (Settings already forces it),
   so apps no longer mix a monospace Close button with sans-serif headers. */
body.new-design .close-fullscreen {
    font-family: var(--font-main);
}

/* Design v3 apps open inside .terminal, which is monospace, so apps that never set
   a font (News, Benchmark, pickers) rendered their headings in the terminal font.
   Default every app to the UI font; code-style bits still opt into --font-mono. */
body.new-design .fullscreen-app {
    font-family: var(--font-main);
}

/* Glass themes: an open app is meant to frost whatever is behind it, but the app's
   backdrop-filter never reaches the scrolling terminal output, so the terminal text
   showed through sharp. Blur the terminal itself while an app sits on top of it. */
html:is(.theme-glassmorphism, .theme-glass, .theme-glass-static) .terminal:has(> .fullscreen-app) > :is(.output, .terminal-header, .command) {
    filter: blur(14px);
}

/* News cards sit in a flex column with its own gap; the default .modern-card
   bottom margin doubled the spacing between stories. */
#news-list .news-item {
    margin-bottom: 0;
}

/* Orbit Browser: on phones the URL bar was squeezed to a 36px circle between the
   nav buttons and the menu. Give it its own row and let the page area fill the rest. */
@media (max-width: 600px) {
    .browser-toolbar {
        flex-wrap: wrap;
        row-gap: 8px !important;
        padding: 8px 12px !important;
    }
    .browser-toolbar .browser-url-form {
        order: 3;
        flex-basis: 100% !important;
        max-width: none !important;
    }
    .browser-app-body {
        height: auto !important;
        flex: 1;
        min-height: 0;
    }
}

/* APT Store: on phones keep the title and Close on one row and drop search below. */
@media (max-width: 600px) {
    .apt-store-search {
        order: 3;
        flex-basis: 100% !important;
        max-width: none !important;
    }
}

/* Modern Storage/Software/Settings UI */
.modern-card {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.modern-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}

.settings-app-container * {
    font-family: var(--font-main); /* Force sans-serif font for Settings UI */
}

/* Settings opens as a short list of categories; each one is a tappable row that
   expands into its card, instead of every section being open at once. */
.settings-app-container .settings-category {
    margin: 0 0 10px !important;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--on-surface);
    opacity: 1;
}

.settings-app-container .settings-category > div > svg {
    color: var(--accent-primary);
    margin-right: 4px;
}

.settings-app-container .settings-category + .modern-card {
    margin: 0 0 16px;
}

.settings-chevron {
    display: inline-flex;
    opacity: 0.45;
    transition: transform 0.25s ease;
}

.settings-chevron.is-open {
    transform: rotate(180deg);
}

/* One title size for every setting (blocks like Typography or Backup used to be
   larger than the toggle rows next to them). */
.settings-app-container .modern-card strong {
    font-size: 0.92rem;
    font-weight: 600;
}

#launch-pulse-btn {
    white-space: nowrap;
}

/* Orbit Player & Mini Floating Widget Styles (Design v3) */
#audius-player-modal {
    z-index: 9990;
    background: var(--surface-color, #0d1117);
}

.audius-about-dialog {
    background: var(--surface-color, #0d1117) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.audius-now-art,
.audius-mini-art {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
}

.audius-now-art:hover,
.audius-mini-art:hover {
    transform: scale(1.05);
    filter: brightness(1.08);
}

/* Fullscreen Album Artwork Overlay */
.audius-album-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.88);
    z-index: 20000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.25s cubic-bezier(0.2, 0, 0, 1);
    cursor: pointer;
}

.audius-album-overlay-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--outline, rgba(255, 255, 255, 0.15));
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 20001;
}

.audius-album-overlay-close:hover {
    background: var(--error, #e64540);
    border-color: var(--error, #e64540);
    transform: scale(1.08);
}

.audius-album-overlay-img {
    max-width: 85vw;
    max-height: 70vh;
    border-radius: 24px;
    object-fit: contain;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s ease;
}

.audius-album-overlay-info {
    margin-top: 20px;
    text-align: center;
    color: #ffffff;
    max-width: 800px;
}

.audius-album-overlay-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
    font-family: var(--font-main, 'Inter', sans-serif);
}

.audius-album-overlay-artist {
    font-size: 1rem;
    opacity: 0.75;
    font-family: var(--font-main, 'Inter', sans-serif);
}

.audius-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
    color: var(--on-surface);
    font-family: var(--font-main, 'Inter', sans-serif);
    background: var(--surface-color, #0d1117);
}

/* .audius-header is nested inside the already-blurred .audius-container, so it
   relies on its own semi-opaque background rather than a second backdrop-filter
   pass over the same backdrop (avoids stacking redundant blur layers). */
.audius-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    margin: 16px 16px 0 16px;
    background: rgba(var(--surface-rgb, 24, 28, 36), 0.75);
    border: 1px solid var(--outline);
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}

.audius-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--on-surface);
}

.audius-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.audius-icon-btn {
    background: transparent;
    border: none;
    color: var(--on-surface);
    opacity: 0.8;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.audius-icon-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
}

.audius-icon-btn.active {
    color: var(--accent-primary);
    opacity: 1;
}

.audius-icon-btn.muted {
    color: var(--error, #e64540);
    opacity: 1;
}
.audius-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 24px;
    background: var(--surface-color, #0d1117);
    border: 1px solid var(--outline);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    padding: 8px 0;
    z-index: 10000;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.15s cubic-bezier(0.2, 0, 0, 1);
}

.audius-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--on-surface);
    cursor: pointer;
    transition: background 0.2s ease;
}

.audius-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
}
.audius-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Track Feed & Search Panel */
.audius-feed-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
    gap: 18px;
}

.audius-feed-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.audius-tab-btn {
    background: var(--surface, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--outline, rgba(255, 255, 255, 0.08));
    color: var(--on-surface);
    opacity: 0.75;
    padding: 8px 20px;
    border-radius: 20px;
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.audius-tab-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}

.audius-tab-btn.active {
    opacity: 1;
    background: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.audius-track-heart {
    background: transparent;
    border: none;
    color: var(--on-surface);
    opacity: 0.45;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.audius-track-heart:hover {
    opacity: 1;
    transform: scale(1.15);
}

.audius-track-heart.active {
    color: var(--error, #e64540);
    opacity: 1;
}

.audius-ambient-backdrop {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    filter: blur(50px) brightness(0.4) saturate(140%);
    -webkit-filter: blur(50px) brightness(0.4) saturate(140%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, background-image 0.5s ease;
    z-index: 0;
}

.audius-ambient-backdrop.active {
    opacity: 0.85;
}

.audius-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: 22px;
    padding: 10px 20px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.audius-search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.audius-search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--on-surface);
    font-family: var(--font-main);
    font-size: 0.95rem;
    width: 100%;
}

.audius-track-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.audius-track-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.audius-track-card:hover {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.audius-track-card.active {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}

.audius-track-art {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.audius-track-meta {
    flex: 1;
    overflow: hidden;
}

.audius-track-title {
    font-weight: 600;
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--on-surface);
}

.audius-track-artist {
    font-size: 0.82rem;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 3px;
}

.audius-track-duration {
    font-size: 0.8rem;
    opacity: 0.6;
    font-family: var(--font-mono, monospace);
    flex-shrink: 0;
}

/* Player Bar & Controls (Design v3 Floating Island). Nested inside the
   already-blurred .audius-container, so no separate backdrop-filter here. */
.audius-player-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--surface);
    border: 1px solid var(--outline);
    border-radius: 28px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    gap: 20px;
    flex-shrink: 0;
    z-index: 100;
    width: calc(100% - 32px);
    max-width: 800px;
    margin: 0 auto 16px auto;
}

.audius-now-playing {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 220px;
    flex-shrink: 0;
}

.audius-now-art {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.audius-now-info {
    flex: 1;
    overflow: hidden;
}

.audius-controls-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 480px;
}

.audius-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.audius-play-circle-btn {
    background: var(--accent-primary);
    color: #ffffff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease;
}

.audius-play-circle-btn:hover {
    transform: scale(1.08);
}

.audius-seek-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    font-size: 0.78rem;
    font-family: var(--font-mono, monospace);
    opacity: 0.9;
}

.audius-seek-bar {
    flex: 1;
    height: 7px;
    touch-action: pan-x;
}

.audius-seek-bar::-webkit-slider-runnable-track {
    height: 7px;
    border-radius: 50px;
}

.audius-seek-bar::-webkit-slider-thumb {
    margin-top: -4.5px;
    width: 16px;
    height: 16px;
}

/* Music selection surface: keep album ambience atmospheric without letting it
   compete with the search, tabs, and track list. */


/* Slide-out / Floating Card Queue Panel. Nested inside the already-blurred
   .audius-container, so no separate backdrop-filter here. */
.audius-queue-panel {
    position: absolute;
    top: 16px;
    right: 16px;
    bottom: 96px;
    width: 340px;
    max-width: calc(100% - 32px);
    background: var(--surface-color, #0d1117);
    border: 1px solid var(--outline);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), opacity 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.audius-queue-panel.hidden {
    transform: translateX(100%);
    pointer-events: none;
}

.audius-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--outline);
    font-weight: 600;
    font-size: 1.05rem;
}

.audius-queue-header .mobile-queue-close {
    display: none;
}

.audius-queue-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audius-queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.audius-queue-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--outline);
}

.audius-queue-item.active {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Floating Mini Pop-up Widget */
#audius-mini-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--surface-color, #0d1117);
    border: 1px solid var(--outline);
    border-radius: 50px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
    padding: 8px 18px 8px 8px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 10005;
    cursor: move;
    user-select: none;
    animation: fadeIn 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.audius-mini-art {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.audius-mini-info {
    display: flex;
    flex-direction: column;
    max-width: 140px;
    overflow: hidden;
}

.audius-mini-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--on-surface);
}

.audius-mini-artist {
    font-size: 0.75rem;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.audius-mini-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Mobile Responsiveness Rules (<= 600px) */
@media (max-width: 600px) {
    .audius-header {
        padding: 12px 16px;
        margin: 12px 12px 0 12px;
    }

    .audius-feed-panel {
        padding: 16px 12px;
        gap: 14px;
    }

    .audius-search-box {
        max-width: 100%;
    }

    .audius-feed-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }

    .audius-tab-btn {
        flex: 1;
        text-align: center;
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .audius-track-card {
        padding: 10px 12px;
        gap: 12px;
    }

    .audius-track-art {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    /* Stacked Player Bar on Mobile */
    .audius-player-bar {
        flex-direction: column;
        padding: 14px 16px;
        gap: 12px;
    }

    .audius-now-playing {
        width: 100%;
    }

    .audius-now-art {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .audius-controls-container {
        width: 100%;
        max-width: 100%;
    }

    .audius-buttons {
        gap: 16px;
    }

    /* Full-width Slide-up Bottom Sheet Queue Panel */
    .audius-queue-panel {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 75vh;
        border-left: none;
        border-top: 1px solid var(--outline);
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
        transform: translateY(100%);
    }

    .audius-queue-panel.hidden {
        transform: translateY(100%);
    }

    .audius-queue-header .mobile-queue-close {
        display: flex;
    }

    #audius-mini-widget {
        bottom: 16px;
        right: 16px;
        left: 16px;
        justify-content: space-between;
    }

    .audius-mini-info {
        max-width: 120px;
    }
}
.audius-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.audius-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.audius-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--outline, #555);
    transition: .3s;
    border-radius: 22px;
}

.audius-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .audius-slider {
    background-color: var(--accent-primary, #3b82f6);
}

input:checked + .audius-slider:before {
    transform: translateX(18px);
}

/* Pulse System Info & Easter Egg Styles */

.pulse-card {
    background: var(--surface, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--outline, rgba(255, 255, 255, 0.08));
    border-radius: 18px;
    padding: 1.5rem;
}

.pulse-card:hover {
    border-color: var(--accent-primary, rgba(255, 255, 255, 0.18));
}

.pulse-interactive-card {
    cursor: pointer;
}

/* OrbitOS Wikipedia Design v3 Reader & Article Styles */
.wiki-reader-container {
    width: 100%;
}

.wiki-reader-card {
    contain: layout style;
}

.wiki-article-rendered-body {
    color: var(--on-surface) !important;
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.75;
}

.wiki-article-rendered-body *,
.wiki-article-rendered-body p,
.wiki-article-rendered-body span,
.wiki-article-rendered-body div,
.wiki-article-rendered-body li,
.wiki-article-rendered-body dt,
.wiki-article-rendered-body dd,
.wiki-article-rendered-body td,
.wiki-article-rendered-body th,
.wiki-article-rendered-body caption {
    color: var(--on-surface) !important;
    background-color: transparent !important;
    font-family: var(--font-main) !important;
}

.wiki-article-rendered-body a,
.wiki-article-rendered-body a:visited {
    color: var(--accent-primary) !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: color 0.15s ease, text-decoration 0.15s ease;
}

.wiki-article-rendered-body a:hover,
.wiki-article-rendered-body a:focus {
    color: var(--accent-primary) !important;
    text-decoration: underline !important;
}

.wiki-article-rendered-body h1,
.wiki-article-rendered-body h2,
.wiki-article-rendered-body h3,
.wiki-article-rendered-body h4,
.wiki-article-rendered-body h5,
.wiki-article-rendered-body h6 {
    color: var(--on-surface) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding-bottom: 0.4rem !important;
    letter-spacing: -0.01em;
}

.wiki-article-rendered-body h1 { font-size: 1.75rem !important; }
.wiki-article-rendered-body h2 { font-size: 1.45rem !important; }
.wiki-article-rendered-body h3 { font-size: 1.25rem !important; }
.wiki-article-rendered-body h4 { font-size: 1.1rem !important; }

.wiki-article-rendered-body p {
    margin-bottom: 1.2rem !important;
}

.wiki-article-rendered-body ul,
.wiki-article-rendered-body ol {
    margin-bottom: 1.2rem !important;
    padding-left: 1.5rem !important;
}

.wiki-article-rendered-body li {
    margin-bottom: 0.4rem !important;
}

.wiki-article-rendered-body table,
.wiki-article-rendered-body .wikitable,
.wiki-article-rendered-body .infobox {
    width: 100% !important;
    max-width: 100% !important;
    margin: 1.25rem 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: var(--surface) !important;
    border: 1px solid var(--outline) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    display: block !important;
    overflow-x: auto !important;
    font-size: 0.9rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.wiki-article-rendered-body th,
.wiki-article-rendered-body td {
    padding: 10px 14px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.04) !important;
    vertical-align: top !important;
}

.wiki-article-rendered-body th {
    font-weight: 600 !important;
    background: rgba(255, 255, 255, 0.04) !important;
    text-align: left !important;
}

.wiki-article-rendered-body tr:last-child td,
.wiki-article-rendered-body tr:last-child th {
    border-bottom: none !important;
}

.wiki-article-rendered-body td:last-child,
.wiki-article-rendered-body th:last-child {
    border-right: none !important;
}

.wiki-article-rendered-body img,
.wiki-article-rendered-body .thumbimage {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
    border: 1px solid var(--outline) !important;
    margin: 0.5rem 0 !important;
    display: block !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.wiki-article-rendered-body .thumb,
.wiki-article-rendered-body .tright,
.wiki-article-rendered-body .tleft {
    margin: 1rem 0 !important;
    float: none !important;
    clear: both !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--outline) !important;
    border-radius: 14px !important;
    padding: 10px !important;
    max-width: 100% !important;
}

.wiki-article-rendered-body .thumbcaption {
    font-size: 0.85rem !important;
    opacity: 0.8 !important;
    margin-top: 6px !important;
    line-height: 1.4 !important;
}

.wiki-article-rendered-body blockquote {
    margin: 1.25rem 0 !important;
    padding: 12px 20px !important;
    border-left: 3px solid var(--accent-primary) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 0 12px 12px 0 !important;
    font-style: italic !important;
}

/* OrbitOS News/RSS Reader Design v3 */

.rss-feed-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.rss-article-card img {
    display: block;
}

.rss-article-rendered-body * {
    background-color: transparent !important;
    background-image: none !important;
    color: inherit;
}

.rss-article-rendered-body img,
.rss-article-rendered-body video,
.rss-article-rendered-body canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    display: block;
    background-color: transparent !important;
}

.rss-article-rendered-body a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.rss-article-rendered-body p {
    margin-bottom: 1em;
}

.rss-article-rendered-body iframe {
    max-width: 100%;
}

.rss-article-rendered-body blockquote {
    margin: 1.25rem 0;
    padding: 12px 20px;
    border-left: 3px solid var(--accent-primary);
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

.rss-article-rendered-body pre,
.rss-article-rendered-body code {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 6px;
    padding: 2px 6px;
}

@media (max-width: 600px) {
    #rss-fullscreen .fullscreen-app-header {
        padding: 10px 12px;
    }
    #rssui-header-actions {
        flex: 1 1 100%;
        justify-content: flex-start;
    }
    #rssui-feeds-btn span {
        max-width: 46vw;
    }
    #rssui-feeds-menu {
        left: 12px !important;
        right: 12px !important;
        min-width: 0 !important;
        max-width: none !important;
    }
    .rss-article-card {
        flex-direction: column;
    }
    .rss-article-thumb {
        width: 100% !important;
        height: 160px !important;
    }
}

/* Responsive Smarter AI Announcement News Card */
@media (max-width: 600px) {
    .smarter-ai-news-body {
        padding: 1rem 0.75rem !important;
    }
    .smarter-ai-news-card {
        padding: 1.25rem 1rem !important;
        gap: 1rem !important;
        border-radius: 16px !important;
    }
    .smarter-ai-news-card h2 {
        font-size: 1.15rem !important;
    }
    #dismiss-smarter-ai-news {
        width: 100%;
        text-align: center;
        padding: 10px 20px !important;
    }
}

/* ==========================================================================
   OrbitOS Design v3 - Normal AI Full-Screen Graphical Interface
   ========================================================================== */

#normal-ai-fullscreen-app,
.normal-ai-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: var(--background, #0a0e14) !important;
    color: var(--on-surface, #ffffff);
    font-family: var(--font-main, 'Inter', sans-serif);
    overflow: hidden;
    box-sizing: border-box;
    animation: fadeIn 0.22s ease-out;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
}

.normal-ai-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    background: var(--surface, #0d1117) !important;
    border-bottom: 1px solid var(--outline, rgba(255, 255, 255, 0.08));
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 10;
}

.normal-ai-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.2px;
    color: var(--on-surface, #ffffff);
}

.normal-ai-brand-icon {
    color: var(--accent-primary, #00f2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.normal-ai-brand-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.normal-ai-header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.normal-ai-header-controls .close-fullscreen {
    padding: 5px 12px;
    font-size: 0.8rem;
}

.normal-ai-btn {
    background: var(--surface-variant, rgba(255, 255, 255, 0.06));
    border: 1px solid var(--outline, rgba(255, 255, 255, 0.12));
    color: var(--on-surface, #ffffff);
    padding: 5px 11px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.normal-ai-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--outline, rgba(255, 255, 255, 0.25));
    transform: translateY(-1px);
}

.normal-ai-btn.primary {
    background: var(--accent-primary, #00f2fe);
    color: var(--background, #0a0e14) !important;
    border: none;
    font-weight: 600;
}

.normal-ai-btn.primary * {
    color: inherit !important;
}

.normal-ai-btn.primary:hover {
    box-shadow: 0 4px 16px rgba(0, 242, 254, 0.35);
    filter: brightness(1.08);
}

.normal-ai-btn.icon-only {
    padding: 6px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    justify-content: center;
}

.normal-ai-body-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Sidebar Drawer for Sessions */
.normal-ai-sidebar,
#normal-ai-sidebar {
    width: 280px;
    background: var(--surface, #0d1117) !important;
    background-color: var(--surface, #0d1117) !important;
    border-right: 1px solid var(--outline, rgba(255, 255, 255, 0.12));
    display: flex;
    flex-direction: column;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
    flex-shrink: 0;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
    filter: none !important;
}

.normal-ai-sidebar::before,
.normal-ai-sidebar::after,
#normal-ai-sidebar::before,
#normal-ai-sidebar::after {
    display: none !important;
    background: transparent !important;
    opacity: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.normal-ai-sidebar.collapsed {
    transform: translateX(-100%);
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-right: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

.normal-ai-sidebar.collapsed::before,
.normal-ai-sidebar.collapsed::after,
#normal-ai-sidebar.collapsed::before,
#normal-ai-sidebar.collapsed::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    opacity: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.normal-ai-sidebar-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface, #0d1117) !important;
    background-color: var(--surface, #0d1117) !important;
    border-bottom: 1px solid var(--outline, rgba(255, 255, 255, 0.08));
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
    color: var(--on-surface, #ffffff);
}

.normal-ai-sidebar-header::before,
.normal-ai-sidebar-header::after {
    display: none !important;
    background: transparent !important;
    opacity: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.normal-ai-session-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--surface, #0d1117) !important;
    background-color: var(--surface, #0d1117) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
}

.normal-ai-session-list::before,
.normal-ai-session-list::after {
    display: none !important;
    background: transparent !important;
    opacity: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.normal-ai-session-card {
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--surface-variant, rgba(255, 255, 255, 0.04)) !important;
    background-color: var(--surface-variant, rgba(255, 255, 255, 0.04)) !important;
    border: 1px solid var(--outline, rgba(255, 255, 255, 0.08));
    color: var(--on-surface, #ffffff);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.18s ease;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
}

.normal-ai-session-card:hover {
    background: var(--surface, rgba(255, 255, 255, 0.08)) !important;
    border-color: var(--outline, rgba(255, 255, 255, 0.18));
}

.normal-ai-session-card.active {
    background: var(--surface-variant, rgba(255, 255, 255, 0.06)) !important;
    border-color: var(--accent-primary, #00f2fe);
    color: var(--on-surface, #ffffff);
}

.normal-ai-session-title {
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
    color: var(--on-surface, #ffffff);
}

.normal-ai-session-delete {
    background: none;
    border: none;
    color: var(--on-surface, #ffffff);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    opacity: 0.5;
    transition: all 0.15s ease;
}

.normal-ai-session-card:hover .normal-ai-session-delete {
    opacity: 1;
}

.normal-ai-session-delete:hover {
    color: var(--error, #e64540);
    background: rgba(230, 69, 64, 0.15);
}

/* Main Chat Container */
.normal-ai-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: var(--background, #0a0e14);
}

.normal-ai-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    scroll-behavior: smooth;
    background: var(--background, #0a0e14);
}

.normal-ai-empty-state {
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 500px;
    padding: 2rem 1rem;
    gap: 1rem;
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--on-surface, #ffffff);
}

.normal-ai-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: color-mix(in srgb, var(--accent-primary, #00f2fe) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-primary, #00f2fe) 28%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary, #00f2fe);
    box-shadow: none;
}

.normal-ai-empty-icon svg {
    width: 38px;
    height: 38px;
}

.normal-ai-msg-row {
    display: flex;
    gap: 12px;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    animation: fadeIn 0.22s ease-out;
}

.normal-ai-msg-row.user {
    justify-content: flex-end;
}

.normal-ai-msg-bubble {
    padding: 1rem 1.25rem;
    border-radius: 18px;
    line-height: 1.6;
    font-size: 0.95rem;
    max-width: 80%;
    word-break: break-word;
    box-shadow: none;
    position: relative;
}

.normal-ai-msg-bubble code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 6px;
    font-family: var(--font-mono, monospace);
    font-size: 0.9em;
}

.normal-ai-msg-bubble pre {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.normal-ai-msg-bubble pre code {
    background: none;
    padding: 0;
}

.normal-ai-msg-bubble h1,
.normal-ai-msg-bubble h2,
.normal-ai-msg-bubble h3,
.normal-ai-msg-bubble h4,
.normal-ai-msg-bubble h5,
.normal-ai-msg-bubble h6 {
    margin: 0.6rem 0 0.35rem 0;
    line-height: 1.3;
    color: inherit;
}

.normal-ai-msg-bubble h1 { font-size: 1.3em; }
.normal-ai-msg-bubble h2 { font-size: 1.2em; }
.normal-ai-msg-bubble h3 { font-size: 1.1em; }
.normal-ai-msg-bubble h4,
.normal-ai-msg-bubble h5,
.normal-ai-msg-bubble h6 { font-size: 1em; }

.normal-ai-msg-bubble ul,
.normal-ai-msg-bubble ol {
    margin: 0.4rem 0;
    padding-left: 1.4rem;
}

.normal-ai-msg-bubble li {
    margin: 0.2rem 0;
}

.normal-ai-msg-bubble a {
    color: var(--accent-primary, #00f2fe);
    text-decoration: underline;
}

.normal-ai-msg-row.user .normal-ai-msg-bubble a {
    color: inherit;
}

.normal-ai-msg-row.assistant .normal-ai-msg-bubble {
    background: var(--surface, #0d1117);
    border: 1px solid var(--outline, rgba(255, 255, 255, 0.12));
    border-top-left-radius: 4px;
    color: var(--on-surface, #ffffff);
}

.normal-ai-msg-row.user .normal-ai-msg-bubble {
    background: var(--accent-primary, #00f2fe);
    color: var(--background, #0a0e14) !important;
    border-top-right-radius: 4px;
    font-weight: 500;
}

.normal-ai-msg-row.user .normal-ai-msg-bubble * {
    color: inherit !important;
}

.normal-ai-msg-row.user .normal-ai-msg-bubble code {
    background: rgba(0, 0, 0, 0.15);
    color: inherit !important;
}

.normal-ai-token-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    opacity: 0.85;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--surface-variant, rgba(255, 255, 255, 0.06));
    border: 1px solid var(--outline, rgba(255, 255, 255, 0.08));
    align-self: flex-start;
    color: var(--on-surface, #ffffff);
}

.normal-ai-msg-row.user .normal-ai-token-badge {
    background: rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.18);
    color: inherit !important;
}

.normal-ai-suggestions-bar {
    display: flex;
    gap: 8px;
    padding: 0.5rem 1.5rem;
    overflow-x: auto;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    scrollbar-width: none;
    background: var(--background, #0a0e14);
}

.normal-ai-suggestions-bar::-webkit-scrollbar {
    display: none;
}

.normal-ai-chip {
    background: var(--surface, #0d1117);
    border: 1px solid var(--outline, rgba(255, 255, 255, 0.12));
    color: var(--on-surface, #ffffff);
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 0.83rem;
    font-family: var(--font-main);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.normal-ai-chip:hover {
    background: var(--surface-variant, rgba(255, 255, 255, 0.08));
    border-color: var(--accent-primary, #00f2fe);
    transform: translateY(-2px);
}

.normal-ai-input-wrapper {
    padding: 1rem 1.5rem;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    background: var(--background, #0a0e14);
    border: none !important;
    box-shadow: none !important;
}

.normal-ai-input-wrapper::before,
.normal-ai-input-wrapper::after,
.normal-ai-input-card::before,
.normal-ai-input-card::after {
    display: none !important;
    content: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.normal-ai-input-card {
    display: flex;
    align-items: center;
    background: var(--input-bg, var(--surface-color, var(--surface, #0d1117)));
    background-color: var(--input-bg, var(--surface-color, var(--surface, #0d1117)));
    border: none !important;
    outline: none !important;
    border-radius: 24px;
    padding: 6px 12px 6px 18px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

.normal-ai-input-card:focus-within {
    border: none !important;
    outline: none !important;
    box-shadow: 0 0 0 2px var(--glow, rgba(0, 242, 254, 0.25)) !important;
    background: var(--input-bg, var(--surface-color, var(--surface, #0d1117)));
    background-color: var(--input-bg, var(--surface-color, var(--surface, #0d1117)));
}

.normal-ai-textarea {
    flex: 1;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--on-surface, #ffffff);
    font-family: var(--font-main);
    font-size: 0.95rem;
    resize: none;
    max-height: 120px;
    padding: 6px 0;
}

.normal-ai-textarea::placeholder {
    color: var(--on-surface, #ffffff);
    opacity: 0.5;
}

/* Normal AI Settings Drawer / Modal */
.normal-ai-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
    animation: fadeIn 0.18s ease-out;
}

.normal-ai-modal-card {
    background: var(--surface-color, #0d1117);
    border: 1px solid var(--outline, rgba(255, 255, 255, 0.12));
    color: var(--on-surface, #ffffff);
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: scaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
    .normal-ai-sidebar {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 260px;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }
    .normal-ai-msg-bubble {
        max-width: 90%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .normal-ai-input-wrapper {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 600px) {
    .normal-ai-header-bar {
        padding: 0.5rem 0.6rem;
        gap: 6px;
    }
    .normal-ai-brand {
        gap: 6px;
        font-size: 0.95rem;
        min-width: 0;
    }
    .normal-ai-header-controls {
        gap: 4px;
        flex-shrink: 0;
    }
    #normal-ai-chat-model-picker-btn {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
        max-width: 105px;
    }
    .normal-ai-model-label {
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
    }
    .normal-ai-messages-container {
        padding: 0.85rem 0.6rem;
        gap: 0.85rem;
    }
    .normal-ai-msg-bubble {
        padding: 0.75rem 0.9rem;
        font-size: 0.9rem;
        max-width: 92%;
    }
    .normal-ai-suggestions-bar {
        padding: 0.35rem 0.6rem;
    }
    .normal-ai-input-wrapper {
        padding: 0.5rem 0.6rem;
    }
    .normal-ai-input-card {
        padding: 4px 8px 4px 14px;
    }
    .normal-ai-modal-card {
        max-width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
        padding: 1.25rem;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .normal-ai-brand > span:last-child {
        display: none;
    }
    #normal-ai-new-chat-btn span {
        display: none;
    }
    #normal-ai-new-chat-btn {
        padding: 6px;
        border-radius: 50%;
        width: 32px;
        height: 32px;
        justify-content: center;
    }
    .normal-ai-header-controls .close-fullscreen {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    .normal-ai-sidebar {
        width: 82vw;
        max-width: 280px;
    }
}

/* ==========================================================================
   UI Blur System (Settings > Customization > UI Blur)
   --------------------------------------------------------------------------
   Centralized, independent from Wallpaper Blur (which only blurs the
   wallpaper image, see --wallpaper-blur) and from the Interface Theme
   system (Glassmorphism / Glowmorphism / Fluent UI keep their own
   hardcoded blur regardless of this setting).

   State is written once, in app/themes.js:applyUiBlurSettings():
     - html.ui-blur-enabled            toggles the whole system on/off
     - --ui-blur-strength (on <html>)  the chosen blur radius

   When UI Blur is off, html has no .ui-blur-enabled class, so none of the
   rules below match - backdrop-filter is entirely absent from these
   surfaces (not merely set to a near-zero radius), avoiding the
   compositing cost on ordinary/default OrbitOS UI.

   Only surfaces that are genuinely translucent and have real detail behind
   them are listed here: status bar, lock screen, floating Vex/Agentic AI
   bubble & chat, every app's dropdown/context menu (News Reader's feed
   picker, calc/wiki/weather/notes/gallery top menus - they all share the
   .audius-dropdown-menu class), the music player and its mini widget, and
   the terminal header/command input when a wallpaper is showing through
   them. Fullscreen app windows (Settings, dialogs, News Reader's article
   view, etc.) paint a flat solid background with nothing translucent
   behind their headers, so blurring them would be a pure GPU cost with no
   visible effect - intentionally left out. Nested surfaces that would
   otherwise double-blur the same backdrop (the music player's header/
   player bar/queue panel inside its already-blurred container) rely on
   their own translucent background instead of a second backdrop-filter
   pass.
   ========================================================================== */
html.ui-blur-enabled #status-bar,
html.ui-blur-enabled #lock-screen,
html.ui-blur-enabled .floating-ai-bubble,
html.ui-blur-enabled .compact-ai-chat,
html.ui-blur-enabled .audius-dropdown-menu,
html.ui-blur-enabled .audius-container,
html.ui-blur-enabled #audius-mini-widget {
    backdrop-filter: blur(var(--ui-blur-strength)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--ui-blur-strength)) saturate(150%);
}

html.ui-blur-enabled #lock-screen.hidden {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

/* The status bar backdrop stacks the independent Wallpaper Blur (always
   applied behind the status bar when a wallpaper is set) with UI Blur -
   each setting works whether or not the other is enabled. */
html.ui-blur-enabled #status-bar::before {
    backdrop-filter: blur(var(--wallpaper-blur, 0px)) blur(var(--ui-blur-strength));
    -webkit-backdrop-filter: blur(var(--wallpaper-blur, 0px)) blur(var(--ui-blur-strength));
}

/* The terminal header and command input keep their existing semi-opaque
   tint (unchanged) and sit above the wallpaper layer (.terminal::before)
   only when a wallpaper is actually set - that's the one case where they
   have real detail behind them worth blurring instead of just tinting. */
html.ui-blur-enabled .terminal.has-wallpaper .terminal-header,
html.ui-blur-enabled .terminal.has-wallpaper .command {
    backdrop-filter: blur(var(--ui-blur-strength));
    -webkit-backdrop-filter: blur(var(--ui-blur-strength));
}