* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
}

p {
    text-align: center;
    margin-bottom: 20px;
    color: #7f8c8d;
}

.upload-container {
    margin: 25px 0;
}

.upload-area {
    border: 2px dashed #3498db;
    border-radius: 5px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #2980b9;
    background-color: #f7f9fa;
}

.upload-area p {
    margin-bottom: 15px;
    color: #7f8c8d;
}

input[type="file"] {
    display: none;
}

.upload-btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #2980b9;
}

.preview-container {
    margin-top: 20px;
    text-align: center;
}

.preview-container img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.options {
    margin: 20px 0;
}

.options h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.language-selector {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.language-selector input[type="radio"] {
    margin-right: 5px;
}

.convert-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.convert-btn:hover {
    background-color: #27ae60;
}

.result-container {
    margin-top: 30px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.result-container h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.result {
    min-height: 100px;
    padding: 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    font-family: 'Noto Sans', 'Arial Unicode MS', sans-serif;
    line-height: 1.8;
    font-size: 16px;
    direction: auto;
    text-align: left;
    letter-spacing: 0.5px;
    word-spacing: 2px;
}

/* Special styling for Hindi text */
.result p {
    text-align: left;
    margin-bottom: 15px;
    color: #333;
    padding: 5px 0;
}

/* Add better styling for Hindi text */
.hindi-text {
    font-family: 'Noto Sans Devanagari', 'Mangal', 'Arial Unicode MS', sans-serif;
    line-height: 2;
    font-size: 18px;
    letter-spacing: 0.8px;
    word-spacing: 4px;
}

/* Bold for paragraph beginnings */
.result p::first-letter {
    font-weight: bold;
    font-size: 1.05em;
}

/* Add subtle spacing between paragraphs */
.result p:not(:last-child) {
    border-bottom: 1px dotted #eee;
    padding-bottom: 10px;
}

.copy-btn, .download-btn {
    padding: 10px 18px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    transition: background-color 0.3s;
    font-weight: 500;
}

.copy-btn:hover, .download-btn:hover {
    background-color: #2980b9;
}

.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

footer {
    text-align: center;
    margin: 20px 0;
    color: #7f8c8d;
    font-size: 14px;
}

.info-text {
    font-size: 14px;
    color: #666;
    font-style: italic;
    text-align: center;
    margin-top: 10px;
}

/* Advanced options styling */
.advanced-options {
    margin: 15px auto;
    max-width: 400px;
}

.advanced-options summary {
    cursor: pointer;
    color: #3498db;
    font-weight: 500;
    margin-bottom: 10px;
    text-align: center;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    cursor: pointer;
}

.button-group {
    display: flex;
    gap: 10px;
}

.supported-formats {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        margin: 15px;
        padding: 15px;
    }
    
    .language-selector {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}