body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
    background-color: #f7f9fc;
}

.info-banner {
    background-color: #ecf0f1;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.info-banner p {
    margin: 5px 0;
}

.info-banner .formats {
    font-size: 0.85em;
    color: #7f8c8d;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dropzone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
    background-color: #f9f9f9;
    cursor: pointer;
}

.dropzone.highlight {
    border-color: #3498db;
    background-color: #e3f2fd;
}

.dropzone p {
    margin: 5px 0;
    color: #7f8c8d;
}

.url-input {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.url-input input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.url-input button, .file-input {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    transition: background-color 0.3s;
}

.url-input button:hover, .file-input:hover {
    background-color: #2980b9;
}

.file-input {
    margin: 20px auto;
    display: block;
}

/* View Toggle Styles */
.view-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-text {
    margin: 0 10px;
    font-size: 14px;
    color: #7f8c8d;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 34px;
    transition: .4s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked + .toggle-text + .toggle-slider {
    background-color: #3498db;
}

input:checked + .toggle-text + .toggle-slider:before {
    transform: translateX(26px);
}

/* Markdown Result Area Styles */
.result {
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    background-color: #f5f5f5;
    min-height: 300px;
    overflow: auto;
    display: none;
}

.result.active {
    display: block;
}

/* Raw markdown styles */
#result {
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
}

/* Rendered markdown styles */
.rendered-result {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    background-color: white;
}

/* GitHub-style markdown content */
.markdown-body {
    padding: 20px;
}

.markdown-body h1,
.markdown-body h2 {
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3em;
    margin-top: 24px;
    margin-bottom: 16px;
}

.markdown-body pre {
    background-color: #f6f8fa;
    border-radius: 3px;
    padding: 16px;
    overflow: auto;
}

.markdown-body code {
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
    padding: 0.2em 0.4em;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

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

.loading {
    display: none;
    text-align: center;
    margin: 20px 0;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.file-info {
    margin-top: 10px;
    font-size: 0.9em;
    color: #7f8c8d;
    text-align: center;
}

.button-group {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.action-button {
    flex: 1;
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.action-button:hover {
    background-color: #2980b9;
}

.action-button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.action-button.clear {
    background-color: #e74c3c;
}

.action-button.clear:hover {
    background-color: #c0392b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .url-input {
        flex-direction: column;
    }

    .url-input button {
        width: 100%;
    }

    .button-group {
        flex-direction: column;
    }
}