/* Tool-specific styles only - base styles are in tool-layout.css */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
}

.tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.tab-btn {
    background-color: transparent;
    color: #9ca3af;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.tab-btn:hover {
    color: #e5e7eb;
    background-color: #1a1a1a;
}

.tab-btn.active {
    background-color: #3b82f6;
    color: #ffffff;
}

.toolbar {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid #374151;
    margin-bottom: 12px;
}

.toolbar-btn {
    background-color: #1a1a1a;
    color: #d1d5db;
    border: 1px solid #374151;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    line-height: 1;
}

.toolbar-btn:hover {
    background-color: #374151;
    color: #ffffff;
}

.toolbar-btn:active {
    background-color: #4b5563;
}

#markdown-input {
    background-color: #0a0a0a;
    color: #e5e7eb;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 12px 16px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
    min-height: 300px;
    width: 100%;
    resize: vertical;
    outline: none;
    tab-size: 4;
    display: block;
}

#markdown-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

#markdown-input::placeholder {
    color: #6b7280;
}

.input-mode {
    margin-bottom: 12px;
}

.drop-zone {
    border: 2px dashed #374151;
    border-radius: 8px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
    outline: none;
}

.drop-zone:hover,
.drop-zone:focus-visible {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.05);
}

.drop-zone.drag-active {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.drop-zone-primary {
    font-size: 15px;
    font-weight: 400;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.drop-zone-secondary {
    font-size: 13px;
    color: #9ca3af;
}

.file-name {
    font-size: 13px;
    color: #10b981;
    padding: 8px 0;
}

.stats-bar {
    display: flex;
    gap: 16px;
    padding-top: 8px;
}

.stats-bar span {
    font-size: 12px;
    color: #6b7280;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.output-pane {
    min-height: 200px;
}

.preview-content {
    word-break: break-word;
}

.preview-placeholder {
    color: #6b7280;
    font-style: italic;
    padding: 24px 0;
}

.preview-content h1 {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #374151;
    line-height: 1.3;
}

.preview-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #374151;
    line-height: 1.3;
}

.preview-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 18px 0 8px;
    line-height: 1.4;
}

.preview-content h4 {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    margin: 16px 0 8px;
    line-height: 1.4;
}

.preview-content h5 {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin: 14px 0 6px;
    line-height: 1.4;
}

.preview-content h6 {
    font-size: 14px;
    font-weight: 600;
    color: #d1d5db;
    margin: 12px 0 6px;
    line-height: 1.4;
}

.preview-content h1:first-child,
.preview-content h2:first-child,
.preview-content h3:first-child,
.preview-content h4:first-child,
.preview-content h5:first-child,
.preview-content h6:first-child {
    margin-top: 0;
}

.preview-content p {
    line-height: 1.7;
    margin: 12px 0;
    color: #d1d5db;
}

.preview-content a {
    color: #3b82f6;
    text-decoration: none;
}

.preview-content a:hover {
    text-decoration: underline;
}

.preview-content strong {
    color: #ffffff;
    font-weight: 600;
}

.preview-content em {
    font-style: italic;
}

.preview-content code {
    background-color: #1a1a1a;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: #e06c75;
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
}

.preview-content pre {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}

.preview-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 13px;
    border-radius: 0;
}

.preview-content blockquote {
    border-left: 3px solid #3b82f6;
    margin: 16px 0;
    padding: 8px 16px;
    color: #9ca3af;
    background-color: rgba(17, 17, 17, 0.5);
}

.preview-content blockquote p {
    margin: 4px 0;
}

.preview-content ul,
.preview-content ol {
    padding-left: 24px;
    margin: 12px 0;
}

.preview-content li {
    margin: 4px 0;
    line-height: 1.6;
    color: #d1d5db;
}

.preview-content li > ul,
.preview-content li > ol {
    margin: 2px 0;
}

.preview-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.preview-content th {
    background-color: #1a1a1a;
    padding: 8px 12px;
    border: 1px solid #374151;
    text-align: left;
    font-weight: 600;
    color: #e5e7eb;
}

.preview-content td {
    padding: 8px 12px;
    border: 1px solid #374151;
    color: #d1d5db;
}

.preview-content tr:nth-child(even) td {
    background-color: rgba(26, 26, 26, 0.3);
}

.preview-content img {
    max-width: 100%;
    border-radius: 4px;
}

.preview-content hr {
    border: none;
    border-top: 1px solid #374151;
    margin: 24px 0;
}

.preview-content input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #3b82f6;
}

.preview-content del {
    color: #6b7280;
}

.html-source {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    margin: 0;
}

.html-source code {
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    font-size: 13px;
    color: #d1d5db;
    white-space: pre-wrap;
    word-break: break-all;
}

.toc-list {
    padding: 8px 0;
}

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

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

.toc-list li {
    margin: 4px 0;
}

.toc-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.8;
    transition: color 150ms ease;
}

.toc-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.toc-link.toc-h1 {
    font-weight: 600;
    font-size: 15px;
}

.toc-link.toc-h2 {
    font-weight: 500;
}

.theme-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.theme-label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    flex-shrink: 0;
}

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

.theme-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #d1d5db;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.theme-btn:hover {
    background-color: #374151;
}

.theme-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.theme-github .preview-content h1,
.theme-github .preview-content h2,
.theme-github .preview-content h3,
.theme-github .preview-content h4,
.theme-github .preview-content h5,
.theme-github .preview-content h6 {
    color: #e5e7eb;
}

.theme-github .preview-content {
    font-size: 15px;
}

.theme-github .preview-content p {
    line-height: 1.8;
}

.theme-github .preview-content code {
    background-color: rgba(110, 118, 129, 0.2);
    color: #e5e7eb;
}

.theme-github .preview-content blockquote {
    border-left-color: #374151;
    color: #9ca3af;
}

.theme-serif .preview-content {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
}

.theme-serif .preview-content h1,
.theme-serif .preview-content h2,
.theme-serif .preview-content h3,
.theme-serif .preview-content h4,
.theme-serif .preview-content h5,
.theme-serif .preview-content h6 {
    font-family: Georgia, 'Times New Roman', serif;
}

.theme-serif .preview-content p {
    line-height: 1.9;
    color: #d4c8b8;
}

.theme-serif .preview-content li {
    color: #d4c8b8;
}

.theme-terminal .preview-content {
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    font-size: 14px;
    background-color: #000000;
    padding: 16px;
    border-radius: 6px;
}

.theme-terminal .preview-content h1,
.theme-terminal .preview-content h2,
.theme-terminal .preview-content h3,
.theme-terminal .preview-content h4,
.theme-terminal .preview-content h5,
.theme-terminal .preview-content h6 {
    color: #00ff00;
    border-bottom-color: #003300;
}

.theme-terminal .preview-content p,
.theme-terminal .preview-content li {
    color: #00ff00;
}

.theme-terminal .preview-content a {
    color: #00cc00;
}

.theme-terminal .preview-content code {
    color: #00ff00;
    background-color: #001a00;
}

.theme-terminal .preview-content pre {
    background-color: #001a00;
    border-color: #003300;
}

.theme-terminal .preview-content pre code {
    color: #00ff00;
}

.theme-terminal .preview-content blockquote {
    border-left-color: #00ff00;
    background-color: #001a00;
    color: #00cc00;
}

.theme-terminal .preview-content th,
.theme-terminal .preview-content td {
    border-color: #003300;
    color: #00ff00;
}

.theme-terminal .preview-content th {
    background-color: #001a00;
}

.theme-terminal .preview-content strong {
    color: #00ff00;
}

.theme-terminal .preview-content del {
    color: #006600;
}

.theme-terminal .preview-content hr {
    border-top-color: #003300;
}

.mermaid-container {
    margin: 16px 0;
    padding: 16px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
    text-align: center;
    overflow-x: auto;
}

.mermaid-error {
    background-color: rgba(127, 29, 29, 0.3);
    border: 1px solid #dc2626;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 16px 0;
    color: #fca5a5;
    font-size: 13px;
    font-family: monospace;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.save-load-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.save-load-buttons {
    display: flex;
    gap: 8px;
}

.saved-docs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.saved-doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
}

.saved-doc-info {
    flex: 1;
    min-width: 0;
}

.saved-doc-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-doc-date {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.saved-doc-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.saved-doc-actions button {
    background: none;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.saved-doc-actions button:hover {
    color: #e5e7eb;
    border-color: #6b7280;
}

.saved-doc-actions button.delete-btn:hover {
    color: #ef4444;
    border-color: #ef4444;
}

.autosave-banner {
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.autosave-banner p {
    font-size: 14px;
    color: #93c5fd;
    flex: 1;
}

.autosave-banner button {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 150ms ease;
}

.autosave-restore {
    background-color: #3b82f6;
    color: #ffffff;
}

.autosave-restore:hover {
    background-color: #2563eb;
}

.autosave-dismiss {
    background-color: transparent;
    color: #9ca3af;
    border: 1px solid #374151 !important;
}

.autosave-dismiss:hover {
    color: #e5e7eb;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 4px;
}

.pro-feature {
    opacity: 0.6;
}

.pro-feature.unlocked {
    opacity: 1;
}

.pro-cta-content {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.modal-feature-name {
    font-size: 15px;
    color: #9ca3af;
    margin-bottom: 20px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.modal-hidden {
    display: none;
}

.error-message {
    background-color: rgba(127, 29, 29, 0.3);
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.success-message {
    background-color: rgba(6, 78, 59, 0.3);
    border: 1px solid #059669;
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 300;
    opacity: 0;
    transition: opacity 200ms ease;
    pointer-events: none;
}

.toast.toast-visible {
    opacity: 1;
}

.toast.toast-success {
    border-color: #059669;
    color: #6ee7b7;
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.bug-report-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 24px;
}

.bug-report-content {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 24px;
    max-width: 480px;
    width: 100%;
}

.bug-report-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

.bug-report-content textarea {
    width: 100%;
    min-height: 120px;
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 6px;
    color: #e5e7eb;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    outline: none;
    margin-bottom: 16px;
}

.bug-report-content textarea:focus {
    border-color: #3b82f6;
}

.bug-report-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.bug-report-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 150ms ease;
}

#bug-cancel {
    background-color: #1a1a1a;
    color: #d1d5db;
    border: 1px solid #374151;
}

#bug-cancel:hover {
    background-color: #374151;
}

#bug-submit {
    background-color: #3b82f6;
    color: #ffffff;
}

#bug-submit:hover {
    background-color: #2563eb;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .input-section {
        padding: 16px;
    }

    .output-section {
        padding: 16px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons button {
        width: 100%;
    }

    .save-load-buttons {
        flex-direction: column;
    }

    .save-load-buttons button {
        width: 100%;
    }

    .pro-cta-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .toolbar {
        gap: 3px;
    }

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

    .drop-zone {
        padding: 32px 16px;
    }

    .theme-selector {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        flex-direction: column;
        gap: 4px;
    }

    .tab-bar {
        flex-wrap: wrap;
    }

    .tab-btn {
        font-size: 13px;
        padding: 6px 12px;
    }
}