/* Дополнительные стили для проверки файлов */

/* Анимация для зоны перетаскивания */
#dropzone.dragover {
    background-color: #e0f2fe;
    border-color: #0288d1;
}

/* Стили для превью файлов */
.file-preview {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

/* Стили для цветовых компаньонов */
.color-companion {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.color-companion:hover {
    border-color: #374151;
    transform: scale(1.1);
}

.color-companion.active {
    border-color: #3b82f6;
    transform: scale(1.1);
}

/* Стили для результатов проверки */
.check-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.check-item:last-child {
    border-bottom: none;
}

.check-status {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    font-size: 12px;
}

.check-status.success {
    background-color: #10b981;
    color: white;
}

.check-status.warning {
    background-color: #f59e0b;
    color: white;
}

.check-status.error {
    background-color: #ef4444;
    color: white;
}

/* ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА */
#seamlessModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* Паттерн на весь экран */
#patternPreview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-repeat: repeat;
    background-size: auto;
    background-position: 0 0;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    cursor: move;
}

/* Заголовок поверх паттерна */
.modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
	    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Управление внизу поверх паттерна */
.modal-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
        background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(15px);
    padding: 1.5rem;
}

/* Эффект стекла для модального окна (обновлено) */
.glass-panel {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Стили для прогресс-бара */
.progress-wrapper {
    position: relative;
    background-color: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 8px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transition: width 0.3s ease;
    border-radius: 9999px;
}

/* Стили для карточек файлов */
.file-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

/* Стили для рекомендаций */
.recommendation {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px;
    border-radius: 4px;
    margin: 8px 0;
}

.recommendation.success {
    background-color: #d1fae5;
    border-left-color: #10b981;
}

.recommendation.error {
    background-color: #fee2e2;
    border-left-color: #ef4444;
}

/* Анимация загрузки */
@keyframes pulse {
    0%, 100% {
    opacity: 1;
    }
    50% {
    opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Стили для кнопок */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

/* Респонсивность */
@media (max-width: 768px) {
    .file-preview {
    width: 150px;
    height: 150px;
    }

    .color-companion {
    width: 50px;
    height: 35px;
    }

    .modal-header {
    padding: 0.75rem;
    }

    .modal-header h3 {
    font-size: 1rem !important;
    }

    .modal-controls {
    padding: 1rem;
    }

    .modal-controls button {
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    }
}

/* Стили для полноэкранного режима */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    position: relative;
}

/* Стили для слайдера масштаба */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    height: 6px;
}

input[type="range"]::-webkit-slider-track {
    background: rgba(255, 255, 255, 0.3);
    height: 6px;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #ffffff;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    margin-top: -7px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-moz-range-track {
    background: rgba(255, 255, 255, 0.3);
    height: 6px;
    border-radius: 3px;
    border: none;
}

input[type="range"]::-moz-range-thumb {
    background: #ffffff;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Курсор для перетаскивания */
.dragging {
    cursor: grabbing !important;
}

/* Стили для мобильных устройств */
@media (max-width: 640px) {
    .container {
    padding-left: 1rem;
    padding-right: 1rem;
    }

    .grid {
    grid-template-columns: 1fr;
    }

    .file-card .grid {
    grid-template-columns: 1fr;
    }

    .modal-controls .space-x-6 {
    flex-direction: column;
    gap: 1rem;
    }

    .modal-controls .space-x-6 > * {
    margin: 0;
    }

    /* Улучшения для touch устройств */
    #dropzone {
    min-height: 200px;
    padding: 2rem 1rem;
    }

    .btn {
    min-height: 44px;
    padding: 12px 16px;
    }

    input[type="file"] {
    font-size: 16px; /* Предотвращает зум на iOS */
    }
}

/* Стили для улучшенной поддержки touch */
@media (pointer: coarse) {
    .color-companion {
    min-width: 44px;
    min-height: 44px;
    }

    .btn {
    min-height: 44px;
    }

    #scaleSlider {
    height: 44px;
    }

    input[type="range"]::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
    margin-top: -11px;
    }

    input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    }
}

/* Стили для accessibility */
.btn:focus,
input:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Анимация для модального окна */
#seamlessModal {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#seamlessModal:not(.hidden) {
    opacity: 1;
}

/* Стили для индикатора загрузки */
.file-loading {
    position: relative;
}

.file-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}