:root {
    --primary-color: #3b82f6;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #334155;
    --border-color: #e2e8f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 1rem;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.drop-zone-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 2rem;
}

.drop-zone {
    width: 100%;
    max-width: 500px;
    height: 300px;
    border: 3px dashed var(--border-color);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    transition: all 0.3s ease;
    background-color: var(--card-bg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.05);
}

.drop-zone-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.drop-zone-text {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.drop-zone-subtext {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #2563eb;
}

.file-input {
    display: none;
}

.markdown-content {
    flex: 1;
    overflow: auto;
    display: none;
    padding: 0;
    width: 100%;
    height: 100vh;
}

.markdown-content.active {
    display: block;
}

#markdown-display {
    padding: 2rem;
    min-height: 100vh;
    overflow: auto;
}

#markdown-display h1,
#markdown-display h2,
#markdown-display h3,
#markdown-display h4,
#markdown-display h5,
#markdown-display h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.25;
}

#markdown-display h1 {
    font-size: 2em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3em;
}

#markdown-display h2 {
    font-size: 1.5em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3em;
}

#markdown-display p {
    margin-bottom: 1em;
}

#markdown-display ul,
#markdown-display ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

#markdown-display blockquote {
    padding: 0 1em;
    border-left: 0.25em solid var(--border-color);
    color: #6b7280;
}

#markdown-display code {
    padding: 0.2em 0.4em;
    background-color: rgba(175, 184, 193, 0.2);
    border-radius: 0.25em;
    font-family: monospace;
}

#markdown-display pre code {
    display: block;
    padding: 1em;
    overflow: auto;
}

#markdown-display a {
    color: var(--primary-color);
    text-decoration: none;
}

#markdown-display a:hover {
    text-decoration: underline;
}

#markdown-display img {
    max-width: 100%;
}

#markdown-display .mermaid {
    margin: 1.5em 0;
    overflow-x: auto;
}

#markdown-display table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
}

#markdown-display table th,
#markdown-display table td {
    border: 1px solid var(--border-color);
    padding: 0.5em;
}

#markdown-display table th {
    background-color: rgba(0, 0, 0, 0.05);
}

.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    opacity: 0.3;
    transition: opacity 0.2s;
}

.back-button:hover,
.back-button.show-back-button {
    opacity: 1;
    background-color: #2563eb;
}

footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.hidden {
    display: none;
}

.recent-files {
    margin-top: 2rem;
    width: 100%;
    max-width: 500px;
}

.recent-files h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.recent-files-list {
    list-style: none;
    padding: 0;
}

.recent-files-list li {
    margin-bottom: 0.5rem;
}

.recent-files-list a {
    color: var(--primary-color);
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.recent-files-list a:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.recent-files-list .file-path {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}