body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    /* Keep light background usually */
    color: var(--text-dark, #333);
    line-height: 1.6;
}

/* Use new primary gradient for this tool */
.tool-hero {
    background: linear-gradient(45deg, var(--primary, #f36a46), var(--primary-light, #ff7f87));
    /* New Gradient */
    color: white;
    /* Keep text white on gradient */
    padding: 4rem 1rem;
    text-align: center;
}

.tool-content {
    max-width: 1000px;
    margin: -50px auto 3rem;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.converter-tool {
    background: var(--background-white, white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow, rgba(0, 0, 0, 0.1));
}

.upload-container {
    border: 2px dashed var(--border-color, #ddd);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.upload-container:hover,
.upload-container.dragover {
    border-color: var(--primary, #f36a46);
    /* Highlight with primary */
    background-color: var(--accent, #f4b4a4)33;
    /* Use accent with alpha or light primary */
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary, #f36a46);
    /* Primary color for icon */
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.2rem;
    color: var(--text-dark, #555);
    margin-bottom: 1rem;
}

.upload-subtext {
    color: var(--text-light, #6c757d);
    margin-bottom: 1.5rem;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.browse-btn {
    display: inline-block;
    background: var(--primary, #f36a46);
    /* Primary button color */
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.browse-btn:hover {
    background: var(--primary-dark, #e15535);
    /* Darker primary on hover */
    transform: translateY(-2px);
}

.options-container {
    margin-top: 2rem;
    margin-bottom: 2rem;
    border-top: 1px solid var(--border-color, #eee);
    padding-top: 2rem;
}

.option-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark, #444);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark, #555);
    font-weight: 500;
}

.form-group select,
.form-group input[type=number] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group select:focus,
.form-group input[type=number]:focus {
    outline: none;
    border-color: var(--primary, #f36a46);
    /* Primary focus border */
    box-shadow: 0 0 0 3px var(--accent, #f4b4a4)80;
    /* Accent focus shadow with alpha */
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.checkbox-option {
    display: flex;
    align-items: center;
}

.checkbox-option input[type=checkbox] {
    margin-right: 0.5rem;
    width: 1em;
    height: 1em;
    cursor: pointer;
    accent-color: var(--primary, #f36a46);
}

/* Style checkbox color */
.checkbox-option label {
    margin-bottom: 0;
    cursor: pointer;
}

.convert-btn {
    background: var(--primary, #f36a46);
    /* Primary button color */
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    /* Slightly bolder */
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
    text-transform: uppercase;
    /* Optional: Uppercase button text */
}

.convert-btn:hover {
    background: var(--primary-dark, #e15535);
    /* Darker primary on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.convert-btn:disabled {
    background: #ccc;
    /* Keep disabled grey */
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--background-light, #f8f9fa);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color, #eee);
}

.file-info {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.file-icon {
    font-size: 1.5rem;
    color: var(--secondary, #5352ed);
    /* Use secondary color for file icon */
    margin-right: 1rem;
}

.file-name {
    font-weight: 500;
    color: var(--text-dark, #444);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.file-size {
    color: var(--text-light, #6c757d);
    font-size: 0.9rem;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.file-remove {
    color: var(--danger, #dc3545);
    /* Keep remove red */
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    padding-left: 1rem;
    opacity: 0.7;
}

.file-remove:hover {
    color: #ff3344;
    transform: scale(1.1);
    opacity: 1;
}

.progress-container,
.results-section {
    margin-top: 1.5rem;
    display: none;
}

.progress-bar {
    height: 10px;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary, #f36a46);
    /* Primary color for progress */
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    color: var(--text-light, #6c757d);
    font-size: 0.9rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--background-light, #f8f9fa);
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color, #eee);
}

.result-info {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.result-icon {
    font-size: 1.5rem;
    color: var(--success, #28a745);
    /* Keep success green */
    margin-right: 1rem;
}

.result-name {
    font-weight: 500;
    color: var(--text-dark, #444);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.download-btn {
    background-color: var(--success, #28a745);
    /* Keep success green */
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    /* Bolder text */
}

.download-btn:hover {
    background-color: #218838;
    /* Darker green */
    transform: translateY(-2px);
}

/* About Section & Features */
.about-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color, #eee);
}

.about-section h2 {
    color: var(--primary, #f36a46);
    /* Primary for heading */
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-section .about-intro {
    color: var(--text-dark, #333);
    margin-bottom: 2rem;
    text-align: center;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05em;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.feature-item {
    background: var(--background-white, white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow, rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow, rgba(0, 0, 0, 0.1));
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary, #f36a46);
    /* Primary for feature icons */
    margin-bottom: 1rem;
}

.feature-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark, #444);
    font-size: 1.15rem;
}

.feature-desc {
    color: var(--text-light, #6c757d);
    font-size: 0.95rem;
    flex-grow: 1;
}

.about-section .disclaimer {
    margin-top: 2.5rem;
    font-size: 0.9em;
    color: var(--text-light, #6c757d);
    text-align: center;
}

/* Specific styles for conditional option groups */
#image-options-group,
#ocr-options-group {
    display: none;
}

/* Hide by default */
#language-select-group {
    display: none;
    margin-top: 0.5rem;
}

/* Hide language initially */
#ocr-options-group,
#image-options-group {
    border-top: 1px dashed var(--border-color, #eee);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

#image-options-group p {
    margin-top: 0.5rem;
}


/* Responsive */
@media (max-width: 768px) {

    .file-name,
    .result-name {
        max-width: 200px;
    }
}

@media (max-width: 480px) {

    .file-name,
    .result-name {
        max-width: 150px;
    }

    .upload-text {
        font-size: 1.1rem;
    }

    .browse-btn {
        padding: 0.7rem 1.2rem;
    }

    .features-list {
        grid-template-columns: 1fr;
    }
}