body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

#response {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 100px;
}

label {
    font-weight: bold;
    margin-bottom: 4px;
}

.markdown-response {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    white-space: pre-wrap;
    --base-font-size: 14px;
    font-size: var(--base-font-size);
}

.markdown-response p,
.markdown-response li,
.markdown-response table {
    font-size: var(--base-font-size);
}

.markdown-response h1 {
    font-size: calc(var(--base-font-size) * 1.6);
}

.markdown-response h2 {
    font-size: calc(var(--base-font-size) * 1.4);
}

.markdown-response h3 {
    font-size: calc(var(--base-font-size) * 1.2);
}

.markdown-response table {
    font-size: 14px;
}

.markdown-response th,
.markdown-response td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.markdown-response th {
    background-color: #f1f1f1;
}

.markdown-response tr:nth-child(even) {
    background-color: #f9f9f9;
}

.markdown-response ul,
.markdown-response ol {
    padding-left: 24px;
    margin: 0px 0;
}

.markdown-response li {
    margin: 8px 0;
    font-size: 14px;
}

.markdown-response p {
    font-size: 14px;
    margin: 8px 0;
}

.markdown-response code {
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

.markdown-response pre {
    background-color: #f0f0f0;
    padding: 16px;
    border-radius: 4px;
    overflow-x: auto;
}

.markdown-response blockquote {
    border-left: 4px solid #ddd;
    margin: 16px 0;
    padding-left: 16px;
    color: #666;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

.loading-spinner p {
    margin-top: 10px;
    color: #666;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.hidden {
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.size-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.size-control label {
    margin-bottom: 0;
    white-space: nowrap;
}

.slider {
    flex: 1;
    height: 5px;
    background: #ddd;
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: #007bff;
    border-radius: 50%;
    cursor: pointer;
}

#fontSizeValue {
    min-width: 45px;
    text-align: right;
}