/* PromptMindManager - Main Stylesheet */

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --border-radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --transition: all 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--gray-100);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand a {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.navbar-menu a {
    color: var(--gray-600);
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 0.875rem;
}

.navbar-menu a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-user span {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Container */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    flex: 1;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 0.5rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    gap: 0.4rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-secondary:hover {
    background: var(--gray-600);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-100);
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-container {
    max-width: 100%;
    width: 100%;
    background: white;
    padding: 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 0.875rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.65rem;
    font-size: 0.9rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea:not(#content-editor):not(#modal-textarea) {
    resize: vertical;
    min-height: 120px;
    width: 100%;
    box-sizing: border-box;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Alerts */
.alert {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* Auth Pages */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
}

.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--gray-500);
    text-align: center;
    margin-bottom: 2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-500);
}

.auth-footer a {
    color: var(--primary);
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.page-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.page-header-compact {
    margin-bottom: 0.75rem;
}

.page-header-compact h1 {
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--gray-600);
    margin: 0.25rem 0;
    font-size: 0.875rem;
}

.stat-link {
    font-size: 0.875rem;
    color: var(--primary);
}

.stat-card-highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.stat-card-highlight .stat-icon {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-card-highlight .stat-label {
    color: rgba(255,255,255,0.9);
}

.stat-card-highlight .stat-link {
    color: white;
}

.dashboard-section {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.section-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.section-link {
    font-size: 0.875rem;
    color: var(--primary);
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-item {
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.recent-item h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.recent-item h3 a {
    color: var(--dark);
    text-decoration: none;
}

.recent-item h3 a:hover {
    color: var(--primary);
}

.recent-meta {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.recent-preview {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Tables */
.table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.8rem;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table .actions {
    display: flex;
    gap: 0.5rem;
}

.inline-form {
    display: inline;
}

/* Tags and Keywords */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gray-200);
    color: var(--gray-700);
    border-radius: 9999px;
    font-size: 0.875rem;
}

.tag-sm {
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
}

.keyword-tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: var(--info);
    color: white;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.keywords-list, .keywords-sm {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.text-muted {
    color: var(--gray-400);
}

.tag-admin {
    background: var(--primary);
    color: white;
}

.tag-warning {
    background: #f59e0b;
    color: white;
}

.tag-info {
    background: #0ea5e9;
    color: white;
}

.tag-user {
    background: var(--gray-300);
    color: var(--gray-700);
}

.btn-disabled {
    background: var(--gray-200);
    color: var(--gray-400);
    cursor: not-allowed;
    border: 1px solid var(--gray-300);
}

.nav-admin {
    color: var(--primary) !important;
    font-weight: 500;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Filters */
.filters {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--gray-700);
    white-space: nowrap;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
}

.filter-form-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-form-vertical .form-group {
    margin-bottom: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.empty-state h3 {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

/* Topics List */
.topics-list {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.topic-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

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

.topic-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topic-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.topic-name {
    font-weight: 500;
}

.topic-indent {
    color: var(--gray-400);
    margin-right: 0.5rem;
}

.topic-actions {
    display: flex;
    gap: 0.5rem;
}

.help-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.help-section h3 {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.help-section ul {
    margin-left: 1.5rem;
    color: var(--gray-600);
}

.help-section ul ul {
    margin-top: 0.25rem;
}

/* Snippet Detail */
.snippet-detail {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.snippet-meta {
    padding: 1.5rem;
    background: var(--gray-100);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-label {
    font-weight: 500;
    color: var(--gray-600);
}

.snippet-content-wrapper {
    padding: 1.5rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.snippet-content {
    background: var(--gray-100);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    white-space: pre-wrap;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.5;
    min-height: 50vh;
    overflow-x: auto;
    width: 100%;
    box-sizing: border-box;
}

.snippet-actions {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* Composer */
.composer-page {
    min-height: calc(100vh - 180px);
}

.composer-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
}

.composer-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 80px;
}

.composer-sidebar h3 {
    font-size: 1rem;
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.composer-sidebar hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 1.5rem 0;
}

.selection-info {
    text-align: center;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--gray-700);
}

.snippets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.snippet-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.snippet-card:hover {
    box-shadow: var(--shadow-md);
}

.snippet-card.selected {
    border-color: var(--primary);
}

.snippet-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.snippet-card-header h4 {
    font-size: 1rem;
    color: var(--gray-800);
    flex: 1;
}

.snippet-card-meta {
    margin-bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.snippet-card-preview {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

/* Checkbox */
.checkbox-container {
    display: block;
    position: relative;
    cursor: pointer;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: white;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    transition: var(--transition);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-body textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.9375rem;
    line-height: 1.6;
    resize: vertical;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* Notification Toast */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

.notification-success {
    background: var(--success);
    color: white;
}

.notification-danger {
    background: var(--danger);
    color: white;
}

.notification-warning {
    background: var(--warning);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 0.5rem;
    }

    .navbar-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .composer-layout {
        grid-template-columns: 1fr;
    }

    .composer-sidebar {
        position: static;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .table th, .table td {
        padding: 0.4rem 0.5rem;
    }

    .container {
        padding: 0.75rem;
    }
}

/* Wide Form Container */
.form-container-wide {
    max-width: 100%;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-group-half {
    flex: 1;
}

/* Editor with Tabs */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.editor-tabs, .view-tabs, .modal-tabs {
    display: flex;
    gap: 0.25rem;
}

.editor-tab, .view-tab, .modal-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    background: var(--gray-100);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    cursor: pointer;
    font-size: 0.875rem;
    transition: var(--transition);
}

.editor-tab:hover, .view-tab:hover, .modal-tab:hover {
    background: var(--gray-200);
}

.editor-tab.active, .view-tab.active, .modal-tab.active {
    background: white;
    border-bottom-color: white;
    color: var(--primary);
    font-weight: 500;
}

.editor-container {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    width: 100% !important;
    background: white;
    display: block;
}

textarea.editor-textarea {
    width: 100% !important;
    min-height: 60vh !important;
    height: 60vh;
    padding: 1.5rem;
    border: none !important;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 15px !important;
    line-height: 1.5;
    resize: vertical;
    tab-size: 4;
    box-sizing: border-box !important;
    display: block;
    max-width: 100%;
}

textarea.editor-textarea:focus {
    outline: none;
    box-shadow: none !important;
}

.editor-preview {
    width: 100% !important;
    min-height: 60vh !important;
    padding: 1.5rem;
    background: white;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Content Actions */
.content-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Snippet Content Raw */
.snippet-content-raw {
    background: var(--gray-100);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    white-space: pre-wrap;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    overflow-x: auto;
    min-height: 50vh;
    width: 100%;
    box-sizing: border-box;
}

/* Modal Wide */
.modal-content-wide {
    max-width: 95vw;
    width: 95vw;
    max-height: 95vh;
}

.modal-textarea {
    width: 100%;
    min-height: 65vh;
    padding: 1.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    tab-size: 4;
    box-sizing: border-box;
}

.modal-preview {
    width: 100%;
    min-height: 65vh;
    padding: 1.5rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    overflow-y: auto;
    box-sizing: border-box;
}

/* Markdown Body Styles */
.markdown-body {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--dark);
}

.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.markdown-body h1 { font-size: 1.75rem; border-bottom: 1px solid var(--gray-200); padding-bottom: 0.5rem; }
.markdown-body h2 { font-size: 1.5rem; border-bottom: 1px solid var(--gray-200); padding-bottom: 0.5rem; }
.markdown-body h3 { font-size: 1.25rem; }
.markdown-body h4 { font-size: 1.125rem; }
.markdown-body h5 { font-size: 1rem; }
.markdown-body h6 { font-size: 0.875rem; color: var(--gray-600); }

.markdown-body p {
    margin-bottom: 1rem;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

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

.markdown-body code {
    background: var(--gray-200);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.875em;
}

.markdown-body pre {
    background: var(--gray-800);
    color: var(--gray-100);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1rem;
    color: var(--gray-600);
    font-style: italic;
}

.markdown-body hr {
    border: none;
    border-top: 1px solid var(--gray-300);
    margin: 1.5rem 0;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.markdown-body th, .markdown-body td {
    border: 1px solid var(--gray-300);
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.markdown-body th {
    background: var(--gray-100);
    font-weight: 600;
}

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

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

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.markdown-body strong {
    font-weight: 600;
}

.markdown-body em {
    font-style: italic;
}

/* Responsive for mobile only */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .editor-textarea, .editor-preview, .modal-textarea, .modal-preview {
        min-height: 50vh;
    }

    .editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .modal-content-wide {
        width: 98vw;
    }
}
