/* OCR Converter Tool Styles */
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #e0f7ff, #ffffff); /* Light blue to white gradient */
    margin: 0;
    padding: 10px; /* Reduced padding to decrease empty space */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.ocr-converter {
    background: linear-gradient(135deg, #ffffff, #e0f7ff); /* Gradient background for the box */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    margin: 0 auto; /* Center the box horizontally */
    border: 1px solid #ddd; /* Optional: Add a subtle border */
}

.ocr-converter .converter-container {
    text-align: center;
}

.ocr-converter h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px; /* Reduced margin to decrease space */
}

.ocr-converter h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px; /* Reduced margin to decrease space */
}

.ocr-converter .form-group {
    margin-bottom: 10px; /* Reduced margin to decrease space */
    text-align: left;
}

.ocr-converter label {
    display: block;
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

.ocr-converter .file-upload-box {
    border: 2px dashed #28a745;
    border-radius: 10px;
    padding: 15px; /* Reduced padding to decrease space */
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(40, 167, 69, 0.05));
    text-align: center;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.ocr-converter .file-upload-box:hover {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2), rgba(40, 167, 69, 0.1));
    border-color: #218838;
}

.ocr-converter .file-upload-label {
    display: inline-block;
    padding: 8px 16px; /* Reduced padding to decrease space */
    background: linear-gradient(135deg, #28a745, #218838);
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.ocr-converter .file-upload-label:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: scale(1.05);
}

.ocr-converter input[type="file"] {
    display: none;
}

/* Image Preview Area */
.image-preview-area {
    display: flex;
    justify-content: center;
    margin-top: 15px; /* Reduced margin to decrease space */
}

.image-preview-area img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 5px;
    border: 2px dashed #28a745;
    padding: 5px;
    background: #fff;
    transition: transform 0.2s ease;
}

.image-preview-area img:hover {
    transform: scale(1.05);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px; /* Reduced margin to decrease space */
}

.convert-button,
.clear-button {
    padding: 8px 16px; /* Reduced padding to decrease space */
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    flex: 1;
}

.convert-button {
    background: linear-gradient(135deg, #28a745, #218838);
    color: #fff;
}

.convert-button:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: scale(1.05);
}

.clear-button {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
}

.clear-button:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: scale(1.05);
}

/* Horizontal Line */
.converter-line {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 15px auto; /* Reduced margin to decrease space */
    width: 80%;
}

/* Text Output Area */
.text-output-area {
    background: #f9f9f9;
    padding: 10px; /* Reduced padding to decrease space */
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    font-family: monospace;
}

/* Status Message */
.status-message {
    color: #28a745; /* Green color for status */
    font-weight: bold;
    margin-bottom: 10px; /* Reduced margin to decrease space */
    text-align: center;
    display: none; /* Hidden by default */
}

/* Copy to Clipboard Button */
.copy-button {
    display: none; /* Hidden by default */
    padding: 8px 16px;
    background: linear-gradient(135deg, #007bff, #0056b3); /* Blue gradient */
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin: 10px auto; /* Center the button horizontally */
    display: block; /* Ensure it behaves as a block-level element */
}

.copy-button:hover {
    background: linear-gradient(135deg, #0056b3, #004080); /* Darker blue gradient on hover */
    transform: scale(1.05);
}