body {
    font-family: Arial, sans-serif;
    background-color: #eef1f5;
    color: #333;
    margin: 0;
    padding: 20px 10px;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Aligned to top for better content flow */
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    margin: 0;
    color: #2c3e50;
}

header p {
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 14px;
}

/* --- Drop Zone / Upload Area --- */
.drop-zone {
    border: 2px dashed #a0c4ff;
    border-radius: 8px;
    background-color: #f7f9fc;
    padding: 40px 20px;
    text-align: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.drop-zone.dragover {
    background-color: #e0eaff;
    border-color: #3b82f6;
}

.drop-zone p {
    margin: 10px 0;
    color: #606f85;
}

.upload-button {
    background-color: #3b82f6;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: bold;
}

.upload-button:hover {
    background-color: #2563eb;
}

.privacy-note {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 15px !important;
}

/* --- File Info & Clear Button --- */
.file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #e8f5e9; /* Light green background */
    border: 1px solid #c8e6c9;
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 15px;
}

#fileName {
    font-weight: bold;
    color: #388e3c;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.clear-button {
    background: none;
    border: none;
    color: #e57373;
    font-size: 16px;
    cursor: pointer;
}

/* --- Action Bar & Convert Button --- */
.action-bar {
    text-align: center;
    margin: 20px 0;
}

.convert-button {
    background-color: #f39c12;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: bold;
    width: 100%;
    max-width: 300px;
}

.convert-button:hover:not(:disabled) {
    background-color: #e67e22;
}

.convert-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* --- Loader Style --- */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Output Area --- */
.output-container h2 {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
    color: #2c3e50;
    margin-top: 0;
}

.output-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.action-button {
    padding: 8px 15px;
    border: 1px solid #3b82f6;
    background-color: white;
    color: #3b82f6;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.action-button:hover {
    background-color: #e0eaff;
}

.action-button.download {
    background-color: #27ae60;
    border-color: #27ae60;
    color: white;
}
.action-button.download:hover {
    background-color: #2ecc71;
    border-color: #2ecc71;
}


#textContent {
    background-color: #fcfcfc;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    padding: 15px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #34495e;
    outline: none; /* For the editable text area */
}

.edit-note {
    font-size: 12px;
    color: #888;
    text-align: right;
    margin-top: 5px;
}

/* --- Footer --- */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #95a5a6;
    font-size: 13px;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .container {
        padding: 20px 15px;
    }
    header h1 {
        font-size: 24px;
    }
    .convert-button {
        padding: 10px 20px;
        font-size: 16px;
    }
    .output-actions {
        flex-direction: column;
    }
    .action-button {
        width: 100%;
        text-align: center;
    }
}