/*
Theme Name: PNG to JPG Converter
Description: A modern WordPress theme featuring a PNG to JPG image converter tool with drag-and-drop functionality, batch processing, and customizable quality settings.
Version: 1.0.0
Author: Your Name
Text Domain: png-converter
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: converter, image, png, jpg, tool, utility, modern, responsive
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 50%, #f0fdf4 100%);
    min-height: 100vh;
}

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

/* Header Styles */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    text-decoration: none;
}

.site-title:hover {
    color: #1d4ed8;
}

.site-description {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: color 0.2s;
}

.main-navigation a:hover {
    color: #1e40af;
}

/* Main Content */
.site-main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Converter Styles */
.converter-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.converter-header {
    text-align: center;
    margin-bottom: 3rem;
}

.converter-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.converter-title svg {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.converter-description {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.settings-panel {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.settings-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-title svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.setting-group {
    display: flex;
    flex-direction: column;
}

.setting-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.quality-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.quality-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.quality-slider::-webkit-slider-thumb:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.color-picker {
    width: 48px;
    height: 40px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    appearance: none;
    background: none;
}

.color-text-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-family: monospace;
    transition: border-color 0.2s;
}

.color-text-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Upload Area */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    margin-bottom: 2rem;
}

.upload-area:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.upload-area.dragging {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: scale(1.02);
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: #9ca3af;
    display: block;
}

.upload-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.upload-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.upload-button {
    background: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.upload-button:hover {
    background: #2563eb;
}

.file-input {
    display: none;
}

/* Task List */
.task-list {
    margin-top: 2rem;
}

.task-list-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.task-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.2s;
}

.task-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.task-status-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.task-status-icon.completed {
    color: #10b981;
}

.task-status-icon.error {
    color: #ef4444;
}

.task-status-icon.converting {
    color: #3b82f6;
    animation: spin 1s linear infinite;
}

.task-details h4 {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.task-details p {
    font-size: 0.875rem;
    color: #6b7280;
}

.task-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.download-button svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.download-button:hover {
    background: #059669;
}

.remove-button {
    padding: 0.5rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.2s;
}

.remove-button svg {
    width: 16px;
    height: 16px;
}

.remove-button:hover {
    color: #ef4444;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    transition: width 0.3s ease;
}

.error-message {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 0.875rem;
}

/* Statistics */
.conversion-stats {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.stats-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #166534;
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-item {
    font-size: 0.875rem;
}

.stat-label {
    color: #166534;
}

.stat-value {
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Footer */
.site-footer {
    background: #1f2937;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .converter-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .converter-title svg {
        width: 40px;
        height: 40px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        width: 40px;
        height: 40px;
    }
    
    .task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .task-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .converter-container {
        padding: 0 0.5rem;
    }
    
    .settings-panel {
        padding: 1.5rem;
    }
    
    .task-item {
        padding: 1rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}