:root {
    /* Default Theme: Cosmic */
    --bg-gradient: radial-gradient(circle at top left, #2b1055, #7597de);
    --blob-1: #7d5fff;
    --blob-2: #ff4d6d;
    --blob-3: #00d2d3;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent: #6c5ce7;
    --accent-hover: #5b4bc4;
    --accent-text: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.07);
    --card-hover: rgba(255, 255, 255, 0.12);
    --font-main: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="aurora"] {
    --bg-gradient: linear-gradient(135deg, #000428, #004e92);
    --blob-1: #00f260;
    --blob-2: #0575e6;
    --blob-3: #64f38c;
    --accent: #00d2d3;
    --accent-hover: #01a3a4;
}

[data-theme="midnight"] {
    --bg-gradient: linear-gradient(160deg, #0d0d0d 0%, #111118 60%, #0d0d0d 100%);
    --blob-1: #1a1a2e;
    --blob-2: #16213e;
    --blob-3: #0f3460;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #e2e8f0;
    --text-secondary: rgba(226, 232, 240, 0.55);
    --accent: #818cf8;
    --accent-hover: #6366f1;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.09);
}

[data-theme="sunset"] {
    --bg-gradient: linear-gradient(45deg, #ff9a9e, #fad0c4, #fad0c4);
    --blob-1: #ff9a9e;
    --blob-2: #fbc2eb;
    --blob-3: #a18cd1;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card-bg: rgba(255, 255, 255, 0.6);
    --accent: #ff6b6b;
    --accent-hover: #ee5253;
}

/* ===== OBSIDIAN THEME — Perfect Dark Mode ===== */
[data-theme="obsidian"] {
    /* Background: deep charcoal with a barely-there blue warmth */
    --bg-gradient: linear-gradient(160deg, #0a0a10 0%, #0e0e18 40%, #0c0c14 100%);

    /* Blobs: very deep purples — adds depth without brightness */
    --blob-1: #3730a3;
    --blob-2: #1e1b4b;
    --blob-3: #312e81;

    /* Glass surfaces */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.07);

    /* Typography: warm off-white for comfort */
    --text-primary: #f0f0f5;
    --text-secondary: rgba(240, 240, 245, 0.52);

    /* Accent: soft violet-indigo — sophisticated, not harsh */
    --accent: #a78bfa;
    --accent-hover: #8b5cf6;

    /* Cards: barely lifted from background */
    --card-bg: rgba(255, 255, 255, 0.045);
    --card-hover: rgba(255, 255, 255, 0.085);
}

/* ===== MONOCHROME THEME — Murdered-Out All Black ===== */
[data-theme="monochrome"] {
    /* Background: absolute black */
    --bg-gradient: linear-gradient(160deg, #000000 0%, #030303 40%, #000000 100%);

    /* Blobs: near-invisible — just the faintest depth */
    --blob-1: #0d0d0d;
    --blob-2: #080808;
    --blob-3: #111111;

    /* Glass surfaces: ultra-subtle dark borders */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Typography: muted gray — not bright white */
    --text-primary: #b0b0b0;
    --text-secondary: rgba(180, 180, 180, 0.45);

    /* Accent: dark charcoal buttons — NOT white */
    --accent: #1a1a1a;
    --accent-hover: #2a2a2a;
    --accent-text: #999999;

    /* Cards: barely visible dark panels */
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-hover: rgba(255, 255, 255, 0.06);
}

[data-theme="monochrome"] .modal-content {
    background: #0d0d0d !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="monochrome"] .modal-content.read-mode {
    background: #000000 !important;
}

[data-theme="monochrome"] .icon-btn.danger {
    color: #888888 !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="monochrome"] .icon-btn.danger:hover {
    background: #222222 !important;
    color: #ffffff !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="monochrome"] .primary-btn.danger-bg {
    background: #2a2a2a !important;
    color: #aaaaaa !important;
}

[data-theme="monochrome"] .primary-btn.danger-bg:hover {
    background: #333333 !important;
    color: #ffffff !important;
}

[data-theme="monochrome"] .read-header h2 {
    color: #ffffff !important;
}

[data-theme="monochrome"] .read-body h1,
[data-theme="monochrome"] .read-body h2,
[data-theme="monochrome"] .read-body h3 {
    color: #dddddd !important;
}

[data-theme="monochrome"] pre,
[data-theme="monochrome"] code {
    background: #111111 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #cccccc !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background: var(--bg-gradient);
    background-attachment: fixed;
    background-size: 400% 400%;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    animation: gradientBG 15s ease infinite;
    display: flex;
    flex-direction: column;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--blob-1);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--blob-2);
    bottom: -50px;
    right: -50px;
    animation-delay: 2s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: var(--blob-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    backdrop-filter: blur(15px);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    min-height: 70px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* App Container Spacing for Fixed Nav */
#app-container {
    padding-top: 100px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}

.icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.icon-btn.small {
    width: 32px;
    height: 32px;
    font-size: 1rem;
}

.icon-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Views */
.view {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    display: none;
}

.view.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* Home View */
.hero {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(to right, var(--blob-1), var(--blob-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-btn {
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.cta-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Dashboard */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.search-bar {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 300px;
    min-height: 40px;
}

.search-bar i {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 100%;
    outline: none;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.note-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.note-card:hover {
    background: var(--card-hover);
    transform: translateY(-5px);
    border-color: var(--accent);
}

.note-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.note-card .meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-top: 0.5rem;
}

.note-card .lock-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.badges {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

/* AI Button on Note Cards */
.note-card-ai-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.3), rgba(125, 95, 255, 0.3));
    border: 1px solid rgba(108, 92, 231, 0.4);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 2;
}

.note-card:hover .note-card-ai-btn {
    opacity: 1;
}

.note-card-ai-btn:hover {
    background: linear-gradient(135deg, var(--accent), var(--blob-1));
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.5);
}

/* Active Nav Icon */
.icon-btn.active-nav {
    background: var(--accent);
    border-color: var(--accent);
}

/* AI Glass Button (for editor/read modal) */
.ai-glass-btn {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(125, 95, 255, 0.2));
    border: 1px solid rgba(108, 92, 231, 0.4);
}

.ai-glass-btn:hover {
    background: linear-gradient(135deg, var(--accent), var(--blob-1));
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
}

/* Immutable Checkbox */
.immutable-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.password-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.password-panel {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-top: 4px;
    border: 1px solid var(--glass-border);
}

.password-panel .glass-input {
    flex: 1;
    font-size: 0.82rem;
    padding: 4px 8px;
    min-height: 28px;
}

.immutable-wrapper input {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.immutable-wrapper label {
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

/* Editor View Container */
#editor-view {
    max-width: 1550px;
    width: 96%;
    padding: 1.2rem 0;
}

.editor-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.editor-header {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
    gap: 1rem;
}

.meta-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.editor-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.glass-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.primary-btn {
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.primary-btn:hover {
    background: var(--accent-hover);
}

.glass-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Lock Toggle & Password Panel */
.password-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

#lock-toggle-btn {
    font-size: 1.1rem;
    padding: 8px 12px;
    transition: all 0.3s;
}

#lock-toggle-btn.locked {
    color: #ffd93d;
    border-color: #ffd93d44;
    background: rgba(255, 217, 61, 0.1);
}

.password-panel {
    display: flex;
    align-items: center;
    gap: 6px;
    animation: fadeSlideIn 0.25s ease;
}

.password-panel.hidden {
    display: none !important;
}

.password-panel .glass-input {
    width: 160px;
    padding: 7px 12px;
    font-size: 0.85rem;
}

.password-panel .icon-btn.small {
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.password-panel .icon-btn.small:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Title Input Bar */
.editor-title-bar {
    padding: 0.8rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.05);
}

.note-title-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
    font-family: var(--font-main);
    outline: none;
    padding: 0;
}

.note-title-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Editor Formatting Toolbar & View Mode Switcher */
.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 1.2rem;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--glass-border);
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-format-btns {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tb-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: all 0.2s ease;
}

.tb-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.toolbar-view-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.view-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.view-tab:hover {
    color: var(--text-primary);
}

.view-tab.active {
    background: var(--accent);
    color: var(--accent-text);
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

/* Canvas Split Mode & Live Preview Pane */
.editor-canvas {
    flex: 1;
    position: relative;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    overflow: hidden;
}

.editor-canvas.split-mode textarea {
    width: 50%;
    border-right: 1px solid var(--glass-border);
}

.editor-canvas.split-mode .note-preview-pane {
    width: 50%;
    display: block !important;
}

.editor-canvas.preview-mode .note-preview-pane {
    width: 100%;
    display: block !important;
}

.note-preview-pane {
    flex: 1;
    height: 100%;
    padding: 2rem;
    overflow-y: auto;
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.7;
    font-family: var(--font-main);
    background: rgba(0, 0, 0, 0.05);
}

.note-preview-pane b {
    font-weight: 700;
    color: #ffffff;
}

.note-preview-pane i {
    font-style: italic;
    color: #e2e8f0;
}

.note-preview-pane h1 {
    font-size: 1.8rem;
    margin: 1rem 0 0.5rem 0;
    color: var(--accent);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.3rem;
}

.note-preview-pane h2 {
    font-size: 1.4rem;
    margin: 0.8rem 0 0.4rem 0;
    color: var(--text-primary);
}

.note-preview-pane h3 {
    font-size: 1.15rem;
    margin: 0.6rem 0 0.3rem 0;
    color: var(--text-secondary);
}

.note-preview-pane blockquote {
    border-left: 3px solid var(--accent);
    padding: 8px 16px;
    margin: 0.8rem 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.note-preview-pane pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    overflow-x: auto;
    margin: 0.8rem 0;
}

.note-preview-pane code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    color: #a78bfa;
}

.note-preview-pane li {
    margin-left: 1.5rem;
    margin-bottom: 0.3rem;
}

.note-preview-pane a {
    color: var(--accent);
    text-decoration: underline;
}

.preview-empty {
    color: var(--text-secondary);
    opacity: 0.5;
    font-style: italic;
}

textarea {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    padding: 2rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.6;
    resize: none;
    outline: none;
    font-family: var(--font-mono);
}

.editor-footer {
    padding: 0.8rem 2rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-height: 50px;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Lock Screen */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.lock-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lock-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    margin-top: 1.5rem;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    outline: none;
}

.unlock-btn {
    background: var(--accent);
    border: none;
    width: 40px;
    border-radius: 8px;
    color: var(--accent-text);
    cursor: pointer;
    font-size: 1.2rem;
}

/* Theme Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: #1e1e2e;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

/* Confirm Modal Specifics */
.modal-content.confirm-mode {
    max-width: 400px;
    text-align: center;
    padding: 2.5rem;
}

.confirm-mode h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.confirm-mode p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.primary-btn.danger-bg {
    background: #ff6b6b;
}

.primary-btn.danger-bg:hover {
    background: #ee5253;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* Read Modal Specifics - Full Screen */
.modal-content.read-mode {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    background: rgba(30, 30, 46, 0.98);
    backdrop-filter: blur(20px);
    padding: 3rem 5rem;
    /* More padding for readability */
}

/* Adjust for mobile */
@media (max-width: 768px) {
    .modal-content.read-mode {
        padding: 1.5rem;
    }
}

.read-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.read-header h2 {
    font-size: 1.5rem;
    color: var(--accent);
}

.read-actions {
    display: flex;
    gap: 10px;
}

.icon-btn.danger {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
}

.icon-btn.danger:hover {
    background: #ff6b6b;
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.read-body {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 10px;
}

/* Markdown Styles */
.read-body h1,
.read-body h2,
.read-body h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.read-body h1 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.read-body h2 {
    font-size: 1.5rem;
}

.read-body h3 {
    font-size: 1.2rem;
}

.read-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-body blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 0 8px 8px 0;
}

.read-body code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: #ff9f43;
}

.read-body pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.read-body pre code {
    background: transparent;
    padding: 0;
    color: var(--text-primary);
}

.read-body ul,
.read-body ol {
    margin-left: 20px;
    margin-bottom: 1rem;
}

.read-body li {
    margin-bottom: 5px;
}

.read-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent);
}

.read-body a:hover {
    border-bottom-style: solid;
}

.read-footer {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: right;
}

/* Scrollbar for modal */
.read-body::-webkit-scrollbar {
    width: 8px;
}

.read-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.read-body::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

.read-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 1.5rem 0;
}

/* Obsidian spans full width as the featured dark theme */
.theme-option[data-theme="obsidian"] {
    grid-column: 1 / -1;
    border-color: rgba(167, 139, 250, 0.3);
    background: linear-gradient(135deg, rgba(10, 10, 16, 0.8), rgba(30, 27, 75, 0.6));
    position: relative;
    overflow: hidden;
}

.theme-option[data-theme="obsidian"]::after {
    content: 'DARK MODE';
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: #a78bfa;
    font-weight: 700;
    opacity: 0.8;
}

.theme-option[data-theme="obsidian"]:hover {
    border-color: rgba(167, 139, 250, 0.6);
    background: linear-gradient(135deg, rgba(14, 14, 24, 0.9), rgba(55, 48, 163, 0.5));
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.2);
}

/* Monochrome spans full width as the featured B&W theme */
.theme-option[data-theme="monochrome"] {
    grid-column: 1 / -1;
    border-color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, #000000, #0a0a0a);
    position: relative;
    overflow: hidden;
}

.theme-option[data-theme="monochrome"]::after {
    content: 'BLACKOUT';
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: #666666;
    font-weight: 700;
    opacity: 0.8;
}

.theme-option[data-theme="monochrome"]:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, #050505, #111111);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}


.theme-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    transition: all 0.2s;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.cosmic {
    background: linear-gradient(to right, #2b1055, #7597de);
}

.aurora {
    background: linear-gradient(to right, #000428, #004e92);
}

.midnight {
    background: linear-gradient(160deg, #0d0d0d, #111118);
    border: 1px solid #1a1a2e;
}

.sunset {
    background: linear-gradient(to right, #ff9a9e, #fad0c4);
}

.obsidian {
    background: linear-gradient(135deg, #0a0a10 0%, #1e1b4b 60%, #3730a3 100%);
    border: 1px solid rgba(167, 139, 250, 0.3);
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.15);
}

.monochrome {
    background: linear-gradient(135deg, #000000 0%, #0d0d0d 50%, #1a1a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

/* Utilities */
.hidden {
    display: none !important;
}

.timestamp {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

.error-msg {
    color: #ff6b6b;
    margin-top: 10px;
    font-size: 0.9rem;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent);
    color: var(--accent-text);
    padding: 12px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    z-index: 9999;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Shared Input Modal Styles */
.input-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.input-modal-content {
    background: #1e1e2e;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
}

.input-modal-content h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.input-modal-content input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    outline: none;
    margin-bottom: 1.5rem;
    font-family: var(--font-main);
}

.input-modal-content input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.input-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Site Footer Styles */
.site-footer {
    text-align: center;
    padding: 2.5rem 1rem;
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    width: 100%;
    z-index: 50;
}

.site-footer p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    font-weight: 400;
}

.site-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: var(--blob-1);
    text-decoration: underline;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 0.8rem;
}

.footer-socials a {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-socials a:hover {
    color: var(--accent);
    transform: translateY(-4px);
    text-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

/* Page Flex Layout Fixes */
#app-container, .folder-page, .gallery-page, .upload-page {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Skeleton Loading styles */
.skeleton-card {
    pointer-events: none;
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.skeleton-title, .skeleton-text, .skeleton-date, .skeleton-badge, .skeleton-icon, .skeleton-folder-title, .skeleton-folder-sub, .skeleton-image-placeholder {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.04) 25%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.04) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.6s infinite linear;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-title {
    height: 1.2rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-text {
    height: 0.85rem;
    width: 90%;
    margin-bottom: 0.6rem;
}

.skeleton-text.short {
    width: 50%;
}

.skeleton-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    width: 100%;
}

.skeleton-date {
    height: 0.75rem;
    width: 25%;
}

.skeleton-badge {
    height: 0.75rem;
    width: 20%;
}

/* Folders / Files Skeletons */
.skeleton-folder {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1.25rem 1.5rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px;
    height: 70px;
}

.skeleton-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
}

.skeleton-folder-info {
    flex: 1;
}

.skeleton-folder-title {
    height: 1rem;
    width: 55%;
    margin-bottom: 0.4rem;
}

.skeleton-folder-sub {
    height: 0.75rem;
    width: 30%;
}

/* Gallery Skeletons */
.skeleton-gallery-card {
    height: 200px;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px;
    padding: 12px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.skeleton-image-placeholder {
    flex: 1;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Enforce 3-Column Desktop Grid Layout */
@media (min-width: 1024px) {
    .notes-grid, .items-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .gallery-grid {
        columns: 3 !important;
    }
}

/* ===== NOTE CARD META ENHANCEMENTS ===== */
.note-card .meta-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.note-card .meta-time {
    opacity: 0.7;
    font-size: 0.75rem;
}

.read-time-badge {
    background: rgba(255, 255, 255, 0.08);
    padding: 3px 7px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ===== EDITOR FOOTER EXTRA STATS ===== */
#word-count {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

#read-time-est {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

#read-time-est i {
    color: var(--accent);
    font-size: 1rem;
}

.posted-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 500;
    animation: fadeIn 0.4s ease;
}

.posted-time i {
    font-size: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== KEYBOARD SHORTCUTS MODAL ===== */
.shortcuts-modal-content {
    max-width: 560px;
    padding: 0;
    overflow: hidden;
}

.shortcuts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.4rem 1.8rem;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.shortcuts-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    margin: 0;
    color: var(--text-primary);
}

.shortcuts-header h3 i {
    color: var(--accent);
    font-size: 1.4rem;
}

.shortcuts-list {
    padding: 1.4rem 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    max-height: 65vh;
    overflow-y: auto;
}

.shortcut-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.8rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.shortcut-item:hover {
    color: var(--text-primary);
}

.shortcut-item span {
    margin-left: auto;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom-width: 2px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-primary);
    min-width: 28px;
    text-align: center;
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
    letter-spacing: 0;
}

/* Scrollbar for shortcuts list */
.shortcuts-list::-webkit-scrollbar { width: 6px; }
.shortcuts-list::-webkit-scrollbar-track { background: transparent; }
.shortcuts-list::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 3px; }
.shortcuts-list::-webkit-scrollbar-thumb:hover { background: var(--accent); }

@media (max-width: 768px) {
    .shortcuts-modal-content {
        width: 96%;
        max-width: 100%;
    }
    .shortcuts-header { padding: 1rem 1.2rem; }
    .shortcuts-list { padding: 1rem 1.2rem; }
    .shortcut-item { font-size: 0.82rem; }
}

/* ===== ONLY ME (OWNER PROTECTION) STYLES ===== */
.only-me-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.only-me-wrapper label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.only-me-wrapper input[type="checkbox"] {
    accent-color: #38bdf8;
    cursor: pointer;
}

.only-me-wrapper.active {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.only-me-wrapper.active label {
    color: #38bdf8;
    font-weight: 500;
}

.owner-badge {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
}

.owner-protected-badge {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

/* ===== 3-DOTS MORE MENU & DROPDOWN STYLES ===== */
.more-menu-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.icon-only-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border-radius: 8px;
}

.editor-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(18, 18, 28, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 8px;
    min-width: 210px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.2);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform-origin: top right;
    animation: dropdownSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dropdown-section-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    opacity: 0.65;
    padding: 6px 10px 2px 10px;
    font-weight: 600;
}

.dropdown-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 4px 6px;
}

.dropdown-full-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: var(--font-main);
}

.dropdown-full-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
}

.dropdown-full-btn.locked {
    color: #f87171;
}

/* Adjust checkbox wrappers inside dropdown */
.editor-dropdown .only-me-wrapper,
.editor-dropdown .immutable-wrapper {
    width: 100%;
    box-sizing: border-box;
    border: none;
    background: transparent;
    padding: 8px 12px;
    border-radius: 8px;
}

.editor-dropdown .only-me-wrapper:hover,
.editor-dropdown .immutable-wrapper:hover {
    background: rgba(255, 255, 255, 0.06);
}

.editor-dropdown .only-me-wrapper.active {
    background: rgba(56, 189, 248, 0.12);
}

/* ===== UNIVERSAL FLOATING TOOLTIP & HELP INFO ENGINE ===== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 10000;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 8px);
    background: rgba(12, 12, 22, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #f0f0f5;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 10px rgba(108, 92, 231, 0.15);
    line-height: 1.4;
    font-family: var(--font-main);
    letter-spacing: 0.01em;
}

[data-tooltip]::before {
    content: '';
    bottom: calc(100% + 2px);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: rgba(12, 12, 22, 0.96) transparent transparent transparent;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip Positions */
[data-tooltip-pos="bottom"]::after {
    bottom: auto;
    top: calc(100% + 8px);
}
[data-tooltip-pos="bottom"]::before {
    bottom: auto;
    top: calc(100% + 2px);
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent rgba(12, 12, 22, 0.96) transparent;
}

[data-tooltip-pos="bottom-left"]::after {
    bottom: auto;
    top: calc(100% + 8px);
    left: auto;
    right: 0;
    transform: translateY(4px);
}
[data-tooltip-pos="bottom-left"]::before {
    bottom: auto;
    top: calc(100% + 2px);
    left: auto;
    right: 12px;
    transform: translateY(4px);
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent rgba(12, 12, 22, 0.96) transparent;
}
[data-tooltip-pos="bottom-left"]:hover::after,
[data-tooltip-pos="bottom-left"]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

[data-tooltip-pos="left"]::after {
    bottom: auto;
    left: auto;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
}
[data-tooltip-pos="left"]::before {
    bottom: auto;
    left: auto;
    right: calc(100% + 2px);
    top: 50%;
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent rgba(12, 12, 22, 0.96);
}
[data-tooltip-pos="left"]:hover::after {
    transform: translateY(-50%) translateX(0);
}
[data-tooltip-pos="left"]:hover::before {
    transform: translateY(-50%) translateX(0);
}

/* Help Info Badge (?) Icon */
.info-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono);
    cursor: help;
    margin-left: 5px;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.info-help-icon:hover {
    background: var(--accent);
    color: var(--accent-text);
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.4);
}

/* ===== SLEEK TOGGLE SWITCH COMPONENT ===== */
.switch-control {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
    margin-right: 8px;
}

.switch-control input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--glass-border);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 20px;
}

.switch-slider::before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: #f0f0f5;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.switch-control input:checked + .switch-slider {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(108, 92, 231, 0.35);
}

.only-me-wrapper .switch-control input:checked + .switch-slider {
    background: #38bdf8;
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.switch-control input:checked + .switch-slider::before {
    transform: translateX(16px);
    background-color: #ffffff;
}

.switch-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    flex: 1;
}

.editor-dropdown .only-me-wrapper,
.editor-dropdown .immutable-wrapper {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.2s ease;
}