/* ====================================
   Snip Note Clone - Premium Theme System
   ==================================== */

/* ===== DARK THEME (Default) ===== */
:root {
    --bg-primary: #0f0f12;
    --bg-secondary: #18181d;
    --bg-tertiary: #1f1f26;
    --bg-elevated: #252530;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --accent-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --accent-soft: rgba(99, 102, 241, 0.08);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-overlay: rgba(15, 15, 18, 0.8);

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Menlo', monospace;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --gradient-1: rgba(99, 102, 241, 0.08);
    --gradient-2: rgba(139, 92, 246, 0.05);
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #e2e8f0;

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --accent-glow: 0 0 20px rgba(99, 102, 241, 0.2);
    --accent-soft: rgba(99, 102, 241, 0.05);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-overlay: rgba(248, 250, 252, 0.8);

    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.1);

    --gradient-1: rgba(99, 102, 241, 0.04);
    --gradient-2: rgba(139, 92, 246, 0.03);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-primary);
    height: 100vh;
    overflow: hidden;
    line-height: 1.5;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* App Container */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    background:
        radial-gradient(ellipse at 0% 0%, var(--gradient-1) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, var(--gradient-2) 0%, transparent 50%),
        var(--bg-primary);
    transition: background var(--transition-normal);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

/* Sidebar Gradient Overlay */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(180deg, var(--gradient-1) 0%, transparent 100%);
    pointer-events: none;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    position: relative;
    z-index: 1;
}

.brand i {
    font-size: 28px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.3));
}

.brand span {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search Box */
.search-box {
    padding: 0 16px 16px;
    position: relative;
    z-index: 1;
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all var(--transition-normal);
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-box i {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

/* New Note Button */
.new-note-btn {
    padding: 0 16px 20px;
    position: relative;
    z-index: 1;
}

.new-note-btn button {
    width: 100%;
    padding: 12px 16px;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md), var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.new-note-btn button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.new-note-btn button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.4);
}

.new-note-btn button:hover::before {
    left: 100%;
}

.new-note-btn button:active {
    transform: translateY(0);
}

.new-note-btn button i {
    font-size: 1.1rem;
}

/* Note List */
.note-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px;
}

.note-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-bottom: 4px;
    position: relative;
    border: 1px solid transparent;
}

.note-item:hover {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

.note-item.active {
    background: var(--accent-soft);
    border-color: rgba(99, 102, 241, 0.2);
}

.note-item.active .note-title {
    color: var(--accent-primary);
}

.note-item.active .note-icon {
    color: var(--accent-primary);
}

.note-icon {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 2px;
    transition: color var(--transition-fast);
}

.note-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.note-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--transition-fast);
}

.note-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Delete Button */
.note-delete-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    background: var(--error);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.note-item:hover .note-delete-btn {
    opacity: 1;
}

.note-delete-btn:hover {
    background: #dc2626;
    transform: translateY(-50%) scale(1.1);
}

/* User Profile */
.user-profile {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-tertiary);
    margin: 12px;
    border-radius: var(--radius-md);
}

.avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    box-shadow: var(--accent-glow);
}

.user-profile span {
    font-weight: 500;
    color: var(--text-primary);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-primary);
    transition: background-color var(--transition-normal);
}

/* Top Bar */
.top-bar {
    height: 64px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--glass-overlay);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.breadcrumbs i {
    font-size: 1rem;
}

.current-note-name {
    color: var(--text-primary);
    font-weight: 500;
}

.actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Icon Buttons */
.icon-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.icon-btn:active {
    transform: translateY(0);
}

.divider-vertical {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 4px;
}

/* Primary Button */
.primary-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), var(--accent-glow);
}

.primary-btn:active {
    transform: translateY(0);
}

/* ===== EDITOR CONTAINER ===== */
.editor-container {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

.editor-pane,
.preview-pane {
    overflow-y: auto;
    height: 100%;
    transition: background-color var(--transition-normal);
}

/* Editor Pane */
.editor-pane {
    flex: 1;
    min-width: 300px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    position: relative;
}

/* Preview Pane */
.preview-pane {
    flex: 1;
    min-width: 300px;
    background: var(--bg-primary);
    padding: 32px 48px;
    position: relative;
}

/* ===== RESIZER ===== */
.resizer {
    width: 6px;
    background: var(--border-color);
    cursor: col-resize;
    flex-shrink: 0;
    position: relative;
    transition: background-color var(--transition-fast);
    z-index: 5;
}

.resizer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 40px;
    background: var(--text-muted);
    border-radius: 2px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.resizer:hover {
    background: var(--accent-primary);
}

.resizer:hover::before {
    opacity: 0.5;
}

.resizer.dragging {
    background: var(--accent-primary);
}

.resizer.dragging::before {
    opacity: 0.8;
}

/* Prevent text selection during resize */
body.resizing {
    cursor: col-resize !important;
    user-select: none !important;
}

body.resizing * {
    cursor: col-resize !important;
}

/* Title Input */
.title-input {
    font-size: 1.75rem;
    font-weight: 700;
    border: none;
    outline: none;
    width: 100%;
    padding: 24px 24px 0;
    color: var(--text-primary);
    font-family: var(--font-sans);
    background: transparent;
    letter-spacing: -0.02em;
}

.title-input::placeholder {
    color: var(--text-muted);
}

/* Toolbar */
.toolbar {
    display: flex;
    gap: 4px;
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    flex-wrap: wrap;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.toolbar button {
    background: transparent;
    border: none;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar button:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.toolbar button:active {
    transform: scale(0.95);
}

.toolbar .divider {
    width: 1px;
    background: var(--border-color);
    margin: 0 8px;
    align-self: stretch;
}

/* Markdown Input */
#markdown-input {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 24px;
    caret-color: var(--accent-primary);
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

#markdown-input::placeholder {
    color: var(--text-muted);
}

#markdown-input::selection {
    background: rgba(99, 102, 241, 0.3);
}

/* Status Bar */
.status-bar {
    padding: 8px 24px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.status-bar .stat {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-bar .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-bar .stat-item i {
    font-size: 0.85rem;
}

.status-bar .save-status {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--success);
}

.status-bar .save-status i {
    font-size: 0.85rem;
}

/* Preview Pane Header */
.preview-pane::before {
    content: 'PREVIEW';
    position: absolute;
    top: 12px;
    right: 24px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    opacity: 0.6;
}

/* Markdown Rendered Styles */
.preview-pane h1,
.preview-pane h2,
.preview-pane h3,
.preview-pane h4,
.preview-pane h5,
.preview-pane h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.preview-pane h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 0.3em;
    border-bottom: 2px solid var(--border-color);
}

.preview-pane h2 {
    font-size: 1.5rem;
    position: relative;
    padding-left: 16px;
}

.preview-pane h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.preview-pane h3 {
    font-size: 1.25rem;
}

.preview-pane p {
    margin-bottom: 1em;
    line-height: 1.8;
    color: var(--text-secondary);
}

.preview-pane ul,
.preview-pane ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
    color: var(--text-secondary);
}

.preview-pane li {
    margin-bottom: 0.25em;
    line-height: 1.7;
}

.preview-pane li::marker {
    color: var(--accent-primary);
}

.preview-pane blockquote {
    border-left: 4px solid var(--accent-primary);
    padding: 16px 20px;
    margin: 1em 0;
    background: var(--accent-soft);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.preview-pane code {
    background: var(--bg-tertiary);
    padding: 0.2em 0.5em;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
}

.preview-pane pre {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1em 0;
    border: 1px solid var(--border-color);
}

.preview-pane pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: var(--text-primary);
}

.preview-pane img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 1em 0;
    box-shadow: var(--shadow-md);
}

.preview-pane a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.preview-pane a:hover {
    border-bottom-color: var(--accent-primary);
}

.preview-pane table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.preview-pane th,
.preview-pane td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.preview-pane th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

.preview-pane tr:last-child td {
    border-bottom: none;
}

.preview-pane tr:hover td {
    background: var(--accent-soft);
}

.preview-pane hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 2em 0;
}

/* KaTeX Math Styling */
.preview-pane .katex-display {
    margin: 1.5em 0;
    padding: 20px;
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.preview-pane .katex {
    font-size: 1.1em;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
    background-clip: padding-box;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-slow);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--success);
}

.toast.success i {
    color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

.toast.error i {
    color: var(--error);
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.modal-message {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.modal-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-btn.secondary:hover {
    background: var(--bg-elevated);
}

.modal-btn.danger {
    background: var(--error);
    color: white;
}

.modal-btn.danger:hover {
    background: #dc2626;
}

/* ===== THEME TOGGLE ICON ===== */
.theme-icon {
    transition: transform var(--transition-normal);
}

[data-theme="light"] .theme-icon {
    transform: rotate(180deg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }

    .preview-pane {
        padding: 24px 32px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 100;
        transition: left var(--transition-normal);
    }

    .sidebar.open {
        left: 0;
    }

    .editor-container {
        flex-direction: column;
    }

    .editor-pane {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        min-height: 50%;
    }

    .preview-pane {
        min-height: 50%;
        padding: 24px;
    }

    .preview-pane::before {
        display: none;
    }

    .resizer {
        display: none;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.note-item {
    animation: fadeIn 0.3s ease;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 0.9rem;
}

/* ===== ICON PICKER MODAL ===== */
.icon-picker-modal {
    max-width: 320px !important;
    width: 90% !important;
    padding: 16px !important;
    border: 1px solid var(--accent-primary) !important;
    box-shadow: none !important;
    background: var(--bg-secondary) !important;
}

.icon-picker-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.icon-picker-modal .modal-title {
    font-size: 1rem;
    font-weight: 600;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.close-modal:hover {
    color: var(--error);
}

.icon-picker-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.icon-picker-tabs::-webkit-scrollbar {
    display: none;
}

.icon-picker-tabs .tab-btn {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.icon-picker-tabs .tab-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.icon-picker-tabs .tab-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: none;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 2px;
}

.icon-select-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.icon-select-btn:hover {
    transform: scale(1.05);
    background: var(--accent-soft);
    border-color: var(--accent-primary);
    box-shadow: none;
}

.icon-select-btn:active {
    transform: scale(0.95);
}

/* ===== SLASH COMMAND MENU ===== */
.slash-menu {
    position: fixed;
    width: 260px;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.2s ease;
}

.slash-menu.show {
    display: flex;
}

.slash-menu-search {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.slash-menu-search i {
    color: var(--text-muted);
    margin-right: 8px;
    font-size: 0.9rem;
}

.slash-menu-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 100%;
}

.slash-menu-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
}

.slash-command-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.slash-command-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: var(--text-muted);
}

.slash-command-item .command-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.slash-command-item .command-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.slash-command-item .command-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.slash-command-item .command-shortcut {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.slash-command-item:hover,
.slash-command-item.active {
    background: var(--accent-soft);
    color: var(--accent-primary);
}

.slash-command-item:hover i,
.slash-command-item.active i {
    color: var(--accent-primary);
}

.slash-menu-footer {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.slash-menu-footer kbd {
    background: var(--bg-elevated);
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
}