/* style.css - Responsive styles for HEIC to JPG Converter */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
.hero {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 2.8rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

/* Converter widget */
.converter-widget {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 40px;
}

/* Upload section */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #3498db;
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 25px;
}

.upload-area:hover {
    border-color: #2980b9;
    background: #e8f4fc;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #27ae60;
    background: #e8f8f0;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 15px;
}

.upload-area h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.upload-area p {
    color: #7f8c8d;
    margin: 10px 0;
}

.file-info {
    font-size: 0.9rem;
    color: #95a5a6;
    margin-top: 15px;
}

/* Quality control */
.quality-control {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.quality-control label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

#qualitySlider {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #e74c3c, #f39c12, #27ae60);
    border-radius: 4px;
    outline: none;
}

#qualitySlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#qualitySlider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#qualityValue {
    font-weight: bold;
    color: #3498db;
    font-size: 1.2rem;
    min-width: 50px;
}

/* Queue section */
.queue-section {
    margin: 30px 0;
}

.queue-section h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.file-queue {
    max-height: none !important; /* Отключает ограничение по высоте */
    overflow-y: visible !important; /* Показывает весь контент без скролла */
    margin-bottom: 20px;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    padding: 10px;
}

.queue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 4px solid #3498db;
}

.queue-item:last-child {
    margin-bottom: 0;
}

.queue-item-info {
    flex: 1;
}

.queue-item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    word-break: break-all;
}

.queue-item-size {
    font-size: 0.85rem;
    color: #7f8c8d;
}

.queue-item-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    width: 150px;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.3s ease;
}

.status-text {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

.status-pending { color: #f39c12; }
.status-uploading { color: #3498db; }
-status-converting { color: #9b59b6; }
.status-success { color: #27ae60; }
.status-error { color: #e74c3c; }

.queue-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Results section */
.results-section {
    margin-top: 30px;
}

.results-section h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.result-item:hover {
    transform: translateY(-5px);
}

.result-preview {
    height: 180px;
    overflow: hidden;
    background: #f8f9fa;
}

.result-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.result-item:hover .result-preview img {
    transform: scale(1.05);
}

.result-info {
    padding: 15px;
}

.result-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    word-break: break-all;
}

.result-size {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.download-all {
    text-align: center;
    padding: 20px;
    border-top: 2px solid #ecf0f1;
}

/* Button styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1c6ea4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #219653);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #219653, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* SEO Content */
.seo-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-bottom: 40px;
}

.seo-section {
    margin-bottom: 40px;
}

.seo-section:last-child {
    margin-bottom: 0;
}

.seo-section h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.seo-section p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.7;
}

.seo-section ul {
    list-style: none;
    padding-left: 20px;
}

.seo-section li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    color: #555;
}

.seo-section li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* FAQ */
.faq {
    margin-top: 20px;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px;
    background: #f8f9fa;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question.active {
    background: #e3f2fd;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.faq-answer.active {
    padding: 20px;
    max-height: 500px;
}

.faq-answer p {
    color: #555;
    line-height: 1.6;
}

/* Ad banners */
.ad-banner {
    background: #f8f9fa;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #7f8c8d;
    margin: 20px 0;
    font-style: italic;
}

.top-banner {
    margin-top: 20px;
    margin-bottom: 40px;
}

.middle-banner {
    margin: 40px 0;
}

.footer-banner {
    margin-top: 20px;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

.footer p {
    color: #bdc3c7;
    margin-bottom: 20px;
}

/* File input */
.file-input {
    display: none;
}

/* Responsive styles */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .converter-widget,
    .seo-content {
        padding: 20px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    .upload-area h3 {
        font-size: 1.3rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .queue-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .queue-item-status {
        width: 100%;
        justify-content: space-between;
    }
    
    .progress-bar {
        width: 100%;
    }
    
    .queue-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .slider-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    #qualityValue {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .seo-section h2 {
        font-size: 1.5rem;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 15px;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Success/Error messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 600;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Анимация вращения */
.loader-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Контейнер для превью, когда оно еще грузится */
.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100px;
    background: #f9f9f9;
    border: 1px dashed #ccc;
}

