﻿:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --background-color: #ffffff;
    --text-color: #333333;
    --sidebar-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --code-bg: #f4f4f4;
    --link-color: #3498db;
    --header-height: 60px;
    --sidebar-width: 300px;
    --reading-width: 1000px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size: 17px;
    --line-height: 1.8;
    --paragraph-spacing: 1.2em;
    --heading-font-family: var(--font-family);
    --code-font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Dark theme */
[data-theme="dark"] {
    --background-color: #1a1a1a;
    --text-color: #e0e0e0;
    --sidebar-bg: #2a2a2a;
    --border-color: #404040;
    --code-bg: #2a2a2a;
    --link-color: #5dade2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: var(--line-height);
    font-size: var(--font-size);
    overflow: hidden;
    transition: font-family 0.3s ease, font-size 0.3s ease;
}

/* ====== HEADER - Gradient Premium ====== */
.header {
    height: var(--header-height);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

[data-theme="dark"] .header {
    background: linear-gradient(135deg, #0d0d1a 0%, #111827 50%, #0a1628 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.header h1 {
    font-size: 18px;
    font-weight: 500;
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
    transition: opacity 0.2s;
}

.header h1 span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
}

.header h1:hover span {
    opacity: 1;
}

.header h1 i {
    flex-shrink: 0;
    font-size: 20px;
    opacity: 0.8;
}

.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

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

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

/* ====== SEARCH BAR ====== */
.search-bar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: 0;
    overflow: hidden;
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 10px;
    transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-bar.show {
    height: 50px;
}

.search-bar input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background-color: var(--sidebar-bg);
    color: var(--text-color);
    transition: border-color 0.2s;
}

.search-bar input:focus {
    border-color: var(--secondary-color);
}

.search-bar .search-info {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.search-bar button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.search-bar button:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.search-highlight {
    background-color: rgba(255, 235, 59, 0.5);
    border-radius: 2px;
    padding: 1px 0;
}

.search-highlight.active {
    background-color: rgba(255, 152, 0, 0.7);
    outline: 2px solid rgba(255, 152, 0, 0.9);
}

.has-search .container {
    margin-top: calc(var(--header-height) + 50px);
    height: calc(100vh - var(--header-height) - 50px);
}

/* ====== SETTINGS PANEL ====== */
.settings-panel {
    position: fixed;
    top: var(--header-height);
    right: -400px;
    width: 400px;
    height: calc(100vh - var(--header-height));
    background-color: var(--background-color);
    border-left: 1px solid var(--border-color);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.settings-panel.show {
    right: 0;
}

.settings-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--sidebar-bg);
}

.settings-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.settings-close-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.settings-close-btn:hover {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.settings-content {
    padding: 20px;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.settings-group {
    margin-bottom: 20px;
}

.settings-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.settings-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 14px;
    transition: border-color 0.3s;
}

.settings-select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.settings-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    outline: none;
    transition: background 0.3s;
}

.settings-slider:hover {
    background: #ccc;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.settings-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.settings-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.settings-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.settings-value {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--secondary-color);
}

.settings-preview {
    padding: 20px;
    margin-top: 15px;
    background-color: var(--sidebar-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.settings-preview-text {
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: var(--line-height);
    margin-bottom: 10px;
}

.settings-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

.settings-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.settings-btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.settings-btn-primary:hover {
    background-color: #2980b9;
}

.settings-btn-secondary {
    background-color: var(--sidebar-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.settings-btn-secondary:hover {
    background-color: var(--border-color);
}

/* ====== LAYOUT CONTAINER ====== */
.container {
    display: flex;
    height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
    transition: margin-top 0.25s, height 0.25s;
}

/* ====== SIDEBAR TOC - Smooth Animation ====== */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.sidebar.hidden {
    transform: translateX(-100%);
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 100%;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--sidebar-bg);
    position: sticky;
    top: 0;
    z-index: 1;
}

.sidebar-close-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.sidebar-close-btn:hover {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

.toc {
    padding: 20px;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc ul ul {
    padding-left: 20px;
}

.toc li {
    margin: 3px 0;
}

.toc a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.toc a:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--link-color);
}

.toc a.active {
    background-color: rgba(52, 152, 219, 0.15);
    color: var(--link-color);
    font-weight: 600;
    border-left: 3px solid var(--secondary-color);
}

/* ====== MAIN CONTENT AREA ====== */
.main {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* Editor Panel */
.editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    display: none;
}

.editor-panel.active {
    display: flex;
}

.editor-toolbar {
    padding: 10px;
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.editor-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.3s;
}

.editor-btn:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

#editor {
    flex: 1;
    padding: 20px;
    font-family: var(--code-font-family);
    font-size: 14px;
    border: none;
    outline: none;
    resize: none;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* ====== PREVIEW PANEL ====== */
.preview-panel {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.preview-content {
    padding: 40px;
    max-width: var(--reading-width);
    margin: 0 auto;
    padding-bottom: 60px;
    /* Room for status bar */
}

/* Book Mode */
.book-mode .preview-content {
    column-count: 2;
    column-gap: 40px;
    column-rule: 1px solid var(--border-color);
    max-width: 1200px;
}

/* ====== STATUS BAR ====== */
.status-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background-color: var(--sidebar-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 12px;
    color: #888;
    z-index: 10;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.status-bar:hover {
    opacity: 1;
}

.status-bar-left,
.status-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-bar-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-bar-item i {
    font-size: 11px;
    opacity: 0.7;
}

/* ====== MARKDOWN CONTENT ====== */
.markdown-body {
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: var(--line-height);
    display: none;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    font-family: var(--heading-font-family);
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
    break-inside: avoid;
}

.markdown-body h1 {
    font-size: calc(var(--font-size) * 2);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3em;
}

.markdown-body h2 {
    font-size: calc(var(--font-size) * 1.5);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3em;
}

.markdown-body h3 {
    font-size: calc(var(--font-size) * 1.25);
}

.markdown-body h4 {
    font-size: calc(var(--font-size) * 1);
}

.markdown-body h5 {
    font-size: calc(var(--font-size) * 0.875);
}

.markdown-body h6 {
    font-size: calc(var(--font-size) * 0.85);
}

.markdown-body p {
    margin-bottom: var(--paragraph-spacing);
    text-align: justify;
}

.markdown-body a {
    color: var(--link-color);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body code {
    font-family: var(--code-font-family);
    background-color: var(--code-bg);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 85%;
}

.markdown-body pre {
    font-family: var(--code-font-family);
    background-color: var(--code-bg);
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    border-radius: 6px;
    margin-bottom: 16px;
}

.markdown-body pre code {
    background-color: transparent;
    padding: 0;
    white-space: pre-wrap;
}

.markdown-body blockquote {
    padding: 0 1em;
    color: #6a737d;
    border-left: 0.25em solid #dfe2e5;
    margin-bottom: 16px;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 2em;
    margin-bottom: 16px;
}

.markdown-body li {
    margin-bottom: 0.25em;
}

.markdown-body table {
    display: block;
    width: 100%;
    overflow: auto;
    margin-bottom: 16px;
    border-collapse: collapse;
}

.markdown-body table th,
.markdown-body table td {
    padding: 6px 13px;
    border: 1px solid var(--border-color);
}

.markdown-body table tr {
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
}

.markdown-body table tr:nth-child(2n) {
    background-color: var(--sidebar-bg);
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    box-sizing: content-box;
}

.markdown-body hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: var(--border-color);
    border: 0;
}

/* ====== FAB BUTTONS ====== */
.fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 900;
}

.fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), #2ecc71);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
    z-index: 999;
}

/* Bookmarks Menu */
.bookmarks-menu {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 10px;
    display: none;
    z-index: 901;
    min-width: 250px;
    max-height: 400px;
    overflow-y: auto;
}

.bookmarks-menu.show {
    display: block;
}

.bookmarks-header {
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.bookmark-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.bookmark-item:hover {
    background-color: var(--sidebar-bg);
}

.bookmark-item-content {
    flex: 1;
    overflow: hidden;
}

.bookmark-item-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-item-time {
    font-size: 12px;
    color: #999;
}

.bookmark-item-number {
    color: #999;
    margin-left: 10px;
    font-weight: bold;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    :root {
        --header-height: 50px;
    }

    .sidebar {
        position: absolute;
        z-index: 998;
        height: 100%;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .book-mode .preview-content {
        column-count: 1;
    }

    .preview-content {
        padding: 20px;
    }

    .header h1 {
        font-size: 14px;
    }

    .header-buttons {
        gap: 4px;
        flex-wrap: wrap;
    }

    .btn {
        padding: 5px 8px;
        font-size: 12px;
    }

    .btn span {
        display: none;
    }

    .settings-panel {
        width: 100%;
        right: -100%;
    }

    .status-bar {
        font-size: 11px;
        padding: 0 10px;
    }
}

/* ====== ANIMATIONS ====== */
.highlight-target {
    animation: highlight 2s ease-in-out;
}

@keyframes highlight {

    0%,
    100% {
        background-color: transparent;
    }

    50% {
        background-color: rgba(52, 152, 219, 0.2);
    }
}

html {
    scroll-behavior: smooth;
}

/* Reading Mode */
.reading-mode {
    font-family: 'Lora', 'Georgia', 'Times New Roman', serif;
}

.reading-mode .markdown-body {
    font-size: calc(var(--font-size) * 1.125);
    line-height: 1.8;
}

/* Fullscreen */
.fullscreen .header {
    display: none;
}

.fullscreen .container {
    margin-top: 0;
    height: 100vh;
}

.fullscreen .fab-container {
    opacity: 0.3;
    transition: opacity 0.3s;
}

.fullscreen .fab-container:hover {
    opacity: 1;
}

.fullscreen .search-bar {
    top: 0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Drag and Drop */
.drop-zone {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(52, 152, 219, 0.08);
    border: 3px dashed var(--secondary-color);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--secondary-color);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.drop-zone.dragover {
    display: flex;
}

/* ====== NOTIFICATION - Toast Style ====== */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    left: auto;
    transform: translateX(120%);
    background-color: var(--primary-color);
    color: white;
    padding: 14px 20px 14px 16px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    max-width: 400px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.notification.error {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
}

.notification.info {
    background: linear-gradient(135deg, #2980b9, #3498db);
}

.notification::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 16px;
    flex-shrink: 0;
}

.notification.success::before {
    content: '\f058';
}

.notification.error::before {
    content: '\f057';
}

.notification.info::before {
    content: '\f05a';
}

/* ====== WELCOME SCREEN - Enhanced ====== */
.welcome-screen {
    text-align: center;
    padding: 50px 40px;
    max-width: 800px;
    margin: 0 auto;
    display: block;
}

.welcome-screen h2 {
    margin-bottom: 12px;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 36px;
    font-weight: 700;
}

[data-theme="dark"] .welcome-screen h2 {
    background: linear-gradient(135deg, #5dade2, #3498db);
    -webkit-background-clip: text;
    background-clip: text;
}

.welcome-screen .subtitle {
    color: #888;
    margin-bottom: 40px;
    font-size: 17px;
}

.welcome-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.option-card {
    padding: 28px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    background-color: var(--background-color);
}

.option-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.12);
}

.option-card i {
    font-size: 44px;
    color: var(--secondary-color);
    margin-bottom: 14px;
}

.option-card h3 {
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 16px;
}

.option-card p {
    color: #888;
    font-size: 13px;
    line-height: 1.5;
}

/* Recent files list in welcome */
.recent-files {
    text-align: left;
    margin-top: 30px;
    padding: 20px;
    background: var(--sidebar-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.recent-files h4 {
    font-size: 14px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.recent-file-item {
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--text-color);
}

.recent-file-item:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.recent-file-item i {
    color: var(--secondary-color);
    font-size: 14px;
    flex-shrink: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    text-align: left;
    padding: 24px;
    background: var(--sidebar-bg);
    border-radius: 10px;
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.feature-item i {
    color: var(--success-color);
    margin-top: 2px;
}

.shortcuts-hint {
    color: #888;
    font-size: 13px;
    margin-top: 20px;
}

.shortcuts-hint kbd {
    background-color: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 2px 6px;
    font-family: var(--code-font-family);
    font-size: 12px;
}

/* ====== COPY BUTTONS ====== */
.code-container {
    position: relative;
}

.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(52, 152, 219, 0.9);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
}

.code-container:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background-color: rgba(52, 152, 219, 1);
    transform: scale(1.05);
}

.copy-button:active {
    transform: scale(0.95);
}

.copy-button.copied {
    background-color: rgba(39, 174, 96, 0.9);
}

.copy-button.copied:hover {
    background-color: rgba(39, 174, 96, 1);
}

.inline-code-wrapper {
    position: relative;
    display: inline-block;
}

.inline-copy-button {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(52, 152, 219, 0.9);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
    white-space: nowrap;
    pointer-events: none;
}

.inline-code-wrapper:hover .inline-copy-button {
    opacity: 1;
    pointer-events: auto;
}

.blockquote-container {
    position: relative;
}

.blockquote-copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(52, 152, 219, 0.7);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.blockquote-container:hover .blockquote-copy-button {
    opacity: 1;
}

/* ====== EXPORT MENU ====== */
.export-menu {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 10px;
    display: none;
    z-index: 901;
    min-width: 200px;
}

.export-menu.show {
    display: block;
}

.export-option {
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.export-option:hover {
    background-color: var(--sidebar-bg);
}

.export-option i {
    width: 20px;
    text-align: center;
}

/* ====== COLOR PICKER ====== */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-swatch.active {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px var(--secondary-color);
}

.color-swatch.active::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: bold;
    color: var(--secondary-color);
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.color-picker-input {
    width: 48px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: none;
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-picker-value {
    font-family: var(--code-font-family);
    font-size: 13px;
    color: #888;
}

/* Text Color Swatches */
.text-color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.text-color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.text-color-swatch.active {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px var(--secondary-color);
}

.text-color-swatch.active::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}