* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

<<<<<<< HEAD
=======
:root {
    --bg: white;
    --border: #ddd;
    --text: #333;
    --hover: #f0f0f0;
}

>>>>>>> 2fe41c2 (Initial commit)
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 20px;
<<<<<<< HEAD
    
=======

>>>>>>> 2fe41c2 (Initial commit)
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideIn 0.5s ease;
}

.container-small {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
<<<<<<< HEAD
    color: white;
    padding: 25px 30px;
        padding-bottom: 10px;
=======
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    padding-bottom: 10px;
>>>>>>> 2fe41c2 (Initial commit)
    display: flex;
    justify-content: space-between;
    align-items: center;
}

<<<<<<< HEAD
.app-mode{    overflow: hidden;}
=======
.app-mode {
    overflow: hidden;
}
>>>>>>> 2fe41c2 (Initial commit)

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
}

#doc-title {
    background: rgba(255, 255, 255, 0);
    border: 2px solid transparent;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 500;
    outline: none;
    transition: all 0.3s;
    min-width: 200px;
    width: 100%;
    margin-right: 10px;
}

#doc-title:hover {
    background: rgba(255, 255, 255, 0.3);
}

#doc-title:focus {
    background: rgba(255, 255, 255, 0.11);

    border-color: white;
}

.header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.toggle-btn {
    padding: 8px 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: white;
    color: #2d2d2d
}

.save-dropdown {
    position: relative;
}

.save-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.save-btn:hover {
    background: white;
    color: #2d2d2d
}

.save-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    z-index: 1000;
}

.save-menu.visible {
    display: block;
}

.save-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.save-menu-item:last-child {
    border-bottom: none;
}

.save-menu-item:hover {
    background: #f8f9fa11;
}

.toolbar {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 0px;
}

<<<<<<< HEAD
=======
.toolbar.hidden {
    display: none;
}

>>>>>>> 2fe41c2 (Initial commit)
.heading-select {
    padding: 8px 16px;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.heading-select:hover {
    border-color: #2d2d2d
}

.heading-select:focus {
    outline: none;
    border-color: #2d2d2d;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Highlight active line */
.active-line-editor {
    background-color: rgba(102, 126, 234, 0.1) !important;
}

.active-line-preview {
    background-color: rgba(102, 126, 234, 0.08) !important;
    border-left: 4px solid #667eea !important;
    padding-left: 16px !important;
    margin-left: -20px !important;
    transition: all 0.2s ease;
}

body.dark-theme .active-line-preview {
    background: linear-gradient(135deg, #091623 0%, #34495e 100%);
}

.preview-content sup {
    color: #2d2d2d;
    font-weight: bold;
    cursor: pointer;
}

.preview-content mark {
    background: #fff59d;
    padding: 2px 4px;
    border-radius: 3px;
}

body.dark-theme .preview-content mark {
    background: #f9a825;
    color: #000;
}

.preview-content u {
    text-decoration: underline;
    text-decoration-color: #2d2d2d;
    text-decoration-thickness: 2px;
}

.preview-content .footnote {
    font-size: 0.9em;
    color: #666;
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
    margin-top: 20px;
}

body.dark-theme .preview-content .footnote {
    color: #999;
    border-top-color: #3e3e42;
}

.btn {
    padding: 8px 16px;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    background: #2d2d2d;
    color: white;
    border-color: #2d2d2d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn.danger {
    background: #ff4757;
    color: white;
    border-color: #ff4757;
}

.btn.danger:hover {
    background: #ff3838;
}

.btn.success {
    background: #2ed573;
    color: white;
    border-color: #2ed573;
}

.divider {
    width: 1px;
    height: 30px;
    background: #ddd;
    margin: 0 5px;
}

.editor-container {
    display: flex;
    height: calc(100vh - 280px);
    min-height: 500px;
}

.pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pane.hidden {
    flex: 0 0 0;
    min-width: 0;
    overflow: hidden;
    opacity: 0;
}

.pane-header {
    background: #f8f9fa;
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editor-pane {
    border-right: 1px solid #242424;
}

#markdown-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 20px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.8;
    resize: none;
    background: #fafafa;
    color: #333;
}

#markdown-input:focus {
    background: #fff;
}

.preview-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    line-height: 1.8;
    background: white;
    cursor: text;
    min-height: 100%;
}

.preview-content:focus {
    outline: 2px solid #2d2d2d;
    outline-offset: -2px;
}

.preview-content:empty:before {
    content: 'Start typing in the editor or click here to edit...';
    color: #999;
    text-align: center;
    display: block;
    padding: 50px;
}

.preview-content h1 {
    font-size: 2.5em;
    margin: 0.5em 0;
    border-bottom: 3px solid #2d2d2d;
    padding-bottom: 0.3em;
    color: #2c3e50;
}

.preview-content h2 {
    font-size: 2em;
    margin: 0.6em 0;
    border-bottom: 2px solid #764ba2;
    padding-bottom: 0.3em;
    color: #34495e;
}

.preview-content h3 {
    font-size: 1.5em;
    margin: 0.7em 0;
    color: #2d2d2d
}

.preview-content p {
    margin: 1em 0;
    color: #2c3e50;
}

.preview-content ul,
.preview-content ol {
    margin: 1em 0;
    padding-left: 2.5em;
}

.preview-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.preview-content pre {
    background: #282c34;
    color: #abb2bf;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.preview-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.preview-content blockquote {
    border-left: 4px solid #2d2d2d;
    padding-left: 20px;
    margin: 1em 0;
    color: #666;
    font-style: italic;
}

.preview-content table {
    border-collapse: collapse;
    margin: 1.5em 0;
    width: 100%;
}

.preview-content th,
.preview-content td {
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    text-align: left;
}

.preview-content th {
    background: #2d2d2d;
    color: white;
    font-weight: 600;
}

.preview-content a {
    color: #2d2d2d;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.preview-content a:hover {
    border-bottom-color: #2d2d2d
}

.preview-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    margin: 2em 0;
}

.status-bar {
<<<<<<< HEAD
        background: #2d2d30;
    color: white;
=======
    background: #f0f0f0;
    color: #333;
>>>>>>> 2fe41c2 (Initial commit)
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
<<<<<<< HEAD
=======
    border-top: 1px solid #ddd;
}

.status-bar.hidden {
    display: none;
>>>>>>> 2fe41c2 (Initial commit)
}

.status-left {
    display: flex;
    gap: 20px;
}

.status-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shortcuts-link {
    color: #fff;
    text-decoration: none;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 11px;
}

.shortcuts-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Dark Theme */
body.dark-theme {
    background: linear-gradient(135deg, #3e3e3e 0%, #3e3e3e 100%);
<<<<<<< HEAD
=======
    --bg: #3e3e42;
    --border: #3e3e42;
    --text: #d4d4d4;
    --hover: #2d2d2d;
}

body.dark-theme .header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-theme .status-bar {
    background: #2d2d30;
    color: white;
    border-top-color: #3e3e42;
>>>>>>> 2fe41c2 (Initial commit)
}

body.dark-theme .container {
    background: #2d2d30;
}

body.dark-theme .toolbar {
    background: #2d2d30;
    border-bottom-color: #3e3e42;
}

body.dark-theme .btn {
    background: #3e3e42;
    color: #d4d4d4;
    border-color: #3e3e42;
}

body.dark-theme .btn:hover {
    background: #2d2d2d;
    color: white;
}

body.dark-theme .heading-select {
    background: #3e3e42;
    color: #d4d4d4;
    border-color: #3e3e42;
}

body.dark-theme .pane-header {
    background: #2d2d30;
    color: #d4d4d4;
    border-bottom-color: #3e3e42;
}

body.dark-theme #markdown-input {
    background: #1e1e1e;
    color: #d4d4d4;
}

body.dark-theme .preview-content {
    background: #252526;
    color: #d4d4d4;
}

body.dark-theme .preview-content h1,
body.dark-theme .preview-content h2,
body.dark-theme .preview-content h3,
body.dark-theme .preview-content p {
    color: #d4d4d4;
}

body.dark-theme .preview-content code {
    background: #3e3e42;
    color: #ce9178;
}

body.dark-theme .preview-content:empty:before {
    color: #666;
}

/* Templates Sidebar */
.templates-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    bottom: 0;
    width: 400px;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.templates-sidebar.visible {
    right: 0;
}

body.dark-theme .templates-sidebar {
    background: #1e1e1e;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
}

.templates-header {
    background: #2d2d2d;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.templates-header h3 {
    font-size: 18px;
}

.close-templates {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.close-templates:hover {
    background: rgba(255, 255, 255, 0.3);
}

.templates-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.template-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.template-item:hover {
    border-color: #2d2d2d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

body.dark-theme .template-item {
    background: #2d2d30;
}

.template-item h4 {
    color: #2d2d2d;
    margin-bottom: 8px;
    font-size: 16px;
}

.template-item p {
    color: #666;
    font-size: 13px;
    margin: 0;
}

body.dark-theme .template-item p {
    color: #999;
}

<<<<<<< HEAD
=======
/* Dark Theme - Text Style Menu */
body.dark-theme .text-style-menu {
    background: #1e1e1e;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

body.dark-theme .text-style-preview-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .more-styles {
    color: #888 !important;
}

body.dark-theme .text-style-trigger {
    background: #3e3e42;
    color: #e0e0e0;
}

body.dark-theme .text-style-trigger:hover {
    background: #4a4a4e;
}

>>>>>>> 2fe41c2 (Initial commit)
.save-template-btn {
    width: 100%;
    padding: 12px;
    background: #2ed573;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    transition: all 0.3s;
}

.save-template-btn:hover {
    background: #26de81;
    transform: translateY(-2px);
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
<<<<<<< HEAD
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(4px);
=======
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

/* About Modal - smaller and centered */
#about-modal .modal {
    max-width: 400px;
    padding: 30px;
    text-align: center;
>>>>>>> 2fe41c2 (Initial commit)
}

.modal-overlay.visible {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

<<<<<<< HEAD
.modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlide 0.3s ease;
}
=======
>>>>>>> 2fe41c2 (Initial commit)

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal input,
.modal textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons .btn {
    flex: 1;
    justify-content: center;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.shortcut-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.shortcut-item strong {
    color: #2d2d2d;
    font-size: 13px;
}

.shortcut-item small {
    display: block;
    margin-top: 4px;
    color: #666;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f100;
}

::-webkit-scrollbar-thumb {
    background: #3d3d3d;
    border-radius: 5px;
}

.save-menu-item {
    display: flex;
    align-items: center;
}

.save-menu-item i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
    color: #2d2d2d
}




.focus-mode .header,
.focus-mode .toolbar,
.focus-mode .status-bar,
.focus-mode .pane-header {
    display: none !important;
}

.focus-mode .editor-container {
    height: 100vh !important;
    border: none;
}

.focus-mode .pane {
    border: none;
}





























.divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 5px;
}

/* Editor Area */
.editor-container {
    display: flex;
    height: calc(100vh - 170px);
    /* Adjust based on header/toolbar/footer */
    position: relative;
}



.menu-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 5px 0;
<<<<<<< HEAD
=======
}

/* Text Style Dropdown */
.text-style-dropdown {
    position: relative;
}

.text-style-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    height: 32px;
}

.text-style-trigger:hover {
    background: var(--hover);
}

.text-style-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 100;
    min-width: 240px;
    padding: 8px 0;
    max-height: 400px;
    overflow-y: auto;
}

.text-style-menu.visible {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* Vertical Text Style Preview Panel */
.text-style-preview-panel {
    padding: 4px 0;
}

.text-style-preview-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.text-style-preview-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.style-preview-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-style-option {
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #333;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.text-style-option:last-child {
    border-bottom: none;
}

.text-style-option:hover {
    background: #f0f0f0;
}

.text-style-option span {
    color: #888;
    font-size: 12px;
}

.text-style-option:hover span {
    color: #333;
}

.text-style-divider {
    padding: 8px 15px;
    font-size: 11px;
    text-transform: uppercase;
    color: #999;
    border-top: 1px solid #eee;
    margin-top: 5px;
}

/* Text Template Modal */
.text-template-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.text-template-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.text-template-item:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.text-template-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.text-template-preview {
    display: flex;
    gap: 10px;
    color: #666;
}

.text-template-custom {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.text-template-custom h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 14px;
}

#custom-css-input {
    width: 100%;
    height: 150px;
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
}

/* Recent Files Modal */
.recent-list {
    max-height: 400px;
    overflow-y: auto;
}

.recent-item {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.recent-item:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.recent-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.recent-date {
    font-size: 12px;
    color: #999;
}

.no-recent {
    text-align: center;
    color: #999;
    padding: 20px;
}

/* Modal textarea */
.modal textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.modal .text-template-custom textarea {
    font-family: monospace;
    font-size: 13px;
    background: #f8f9fa;
>>>>>>> 2fe41c2 (Initial commit)
}