/* Basic Reset & Body Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 2.2em;
}

.site-title {
    text-align: center;
    margin-bottom: 15px; /* Adjust as needed */
    font-size: 2.2em; /* Ensure consistency with header h1 */
}

.site-title a {
    color: inherit; /* Inherit color from parent h1 */
    text-decoration: none; /* Remove underline */
    display: block; /* Make the whole area clickable */
}

.site-title a:hover {
    text-decoration: underline; /* Add underline on hover for UX */
}

/* Navigation */
nav {
    text-align: center;
    margin-top: 10px;
}

nav a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: inline-block;
}

nav a:hover,
nav a.active {
    background-color: #34495e;
}

/* Main Content Section (for individual converter pages) */
#converter-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
    margin-bottom: 30px;
}

#page-title {
    text-align: center;
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
}

#upload-instructions {
    text-align: center;
    margin-bottom: 25px;
    color: #666;
    font-size: 1.1em;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #bdc3c7;
    padding: 40px 20px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    margin-bottom: 30px;
}

.upload-area.drag-over {
    background-color: #e8f0fe;
    border-color: #3498db;
}

.upload-area p {
    margin: 10px 0;
    color: #7f8c8d;
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-decoration: none; /* For download links acting as buttons */
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Settings Panel */
.settings-panel {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.settings-panel h3 {
    margin-top: 0;
    color: #2c3e50;
}

.setting-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.setting-item label {
    margin-right: 15px;
    min-width: 80px;
}

.setting-item input[type="range"] {
    flex-grow: 1;
    margin-right: 15px;
}

.setting-item input[type="checkbox"] {
    margin-right: 8px;
    width: 20px; /* Adjust as needed */
    height: 20px; /* Adjust as needed */
    cursor: pointer;
}

/* Conversion Queue */
#conversion-queue h3, #results-section h3 {
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.queue-items, .results-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    margin-bottom: 20px;
}

.queue-item, .result-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.queue-item img, .result-item img {
    max-width: 100%;
    height: auto;
    max-height: 150px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #eee;
}

.queue-item p, .result-item p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #555;
}

.progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-top: 10px;
    height: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: #2ecc71;
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* Results Section */
.result-item .download-btn {
    margin-top: 10px;
    padding: 8px 15px;
}

/* Footer */
footer {
    background-color: #34495e;
    color: #ecf0f1;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9em;
}

footer p {
    margin: 0 0 10px 0;
}

footer nav a {
    color: #bdc3c7;
    padding: 5px 10px;
}

footer nav a:hover {
    background-color: #2c3e50;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8em;
    }

    nav a {
        display: block;
        margin: 5px auto;
        width: fit-content;
    }

    #converter-section {
        padding: 20px;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .queue-items, .results-grid {
        grid-template-columns: 1fr; /* Stack items on small screens */
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .setting-item label {
        margin-bottom: 5px;
    }
}

/* --- Homepage Specific Styles --- */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 8px;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 3em;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-section .subtitle {
    font-size: 1.3em;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-buttons .btn-primary {
    background-color: #2ecc71;
    border-color: #27ae60;
    font-size: 1.1em;
    padding: 12px 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-buttons .btn-primary:hover {
    background-color: #27ae60;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.converter-grid-section, .info-section, .faq-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.converter-grid-section h2, .info-section h2, .faq-section h2 {
    text-align: center;
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 30px;
}

.converter-group {
    margin-bottom: 30px;
}

.converter-group h3 {
    color: #34495e;
    font-size: 1.5em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.converter-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.converter-card {
    background-color: #ecf0f1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #34495e;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.converter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    color: #2c3e50;
}

.converter-card span {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.converter-card small {
    font-size: 0.85em;
    color: #7f8c8d;
}

.info-section ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.info-section li {
    background-color: #ecf0f1;
    padding: 15px;
    border-left: 5px solid #3498db;
    margin-bottom: 10px;
    border-radius: 5px;
}

.info-section strong {
    color: #2c3e50;
}

.faq-items {
    margin-top: 20px;
}

.faq-item {
    background-color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

.faq-item h3 {
    margin-top: 0;
    color: #34495e;
    font-size: 1.2em;
    cursor: pointer; /* Indicate it's clickable for potential accordion behavior */
}

.faq-item p {
    margin-bottom: 0;
    color: #555;
}

/* Responsive Adjustments for Homepage */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 15px;
    }

    .hero-section h1 {
        font-size: 2.2em;
    }

    .hero-section .subtitle {
        font-size: 1em;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .hero-buttons .btn-primary {
        width: 100%;
        max-width: 250px;
    }

    .converter-cards-grid {
        grid-template-columns: 1fr;
    }

    .converter-grid-section h2, .info-section h2, .faq-section h2 {
        font-size: 1.8em;
    }

    .converter-group h3 {
        font-size: 1.3em;
    }
}
