* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: orange;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2em;
}

.input-section {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.pr-input {
    flex: 1;
    min-width: 300px;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.pr-input:focus {
    outline: none;
    border-color: #667eea;
}

.compare-btn {
    padding: 15px 30px;
    font-size: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.compare-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.compare-btn:active {
    transform: translateY(0);
}

.compare-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.progress-section {
    margin: 30px 0;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 15px;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.results-section {
    margin-top: 40px;
}

.results-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.file-item {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: #fafafa;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.diff-container {
    margin-top: 20px;
}

.mode-selector {
    margin-bottom: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

.mode-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.mode-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 8px 16px;
    font-size: 14px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.mode-btn:hover {
    background: #f0f0ff;
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

blaze-diff-viewer {
    display: block;
    width: 100%;
    min-height: 400px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

blaze-diff-viewer img {
    max-width: 100%;
    height: auto;
    display: block;
}

.image-diff-viewer {
    width: 100%;
    min-height: 400px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    position: relative;
}

.diff-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.two-up-container {
    padding: 20px;
}

.two-up-container .diff-image {
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.swipe-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    cursor: col-resize;
    user-select: none;
    /* Высота будет устанавливаться динамически через JS */
}

.swipe-container img {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.swipe-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #667eea;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    transform: translateX(-50%);
}

.swipe-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #667eea;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.onion-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    overflow: hidden;
    /* Высота будет устанавливаться динамически через JS */
}

.onion-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.1s;
    object-fit: contain;
}

.onion-container img:first-child {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.onion-container img:last-child {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.onion-slider-container {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.onion-slider-label {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
    white-space: nowrap;
}

.onion-slider {
    flex: 1;
    min-width: 200px;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.onion-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.onion-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.onion-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.onion-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.onion-slider-value {
    display: none;
    font-weight: 600;
    color: #667eea;
    min-width: 50px;
    text-align: right;
    font-size: 0.95em;
}

.difference-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.difference-canvas {
    max-width: 100%;
    height: auto;
    display: block;
    background: repeating-conic-gradient(#f0f0f0 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
}

.single-image-container {
    padding: 20px;
    text-align: center;
}

.single-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.images-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.image-wrapper {
    text-align: center;
}

.image-label {
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.image-label.before {
    color: #e74c3c;
}

.image-label.after {
    color: #27ae60;
}

.image-container {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: white;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-container .placeholder {
    color: #999;
    font-style: italic;
}

.error-section {
    margin-top: 20px;
    padding: 15px;
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 8px;
    color: #c33;
}

.hidden {
    display: none;
}

.comment-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.comment-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.comment-input {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    border: 2px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
    transition: border-color 0.3s;
}

.comment-input:focus {
    outline: none;
    border-color: #667eea;
}

.comment-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.comment-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.comment-button:active:not(:disabled) {
    transform: translateY(0);
}

.comment-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.comment-message {
    margin: 0 0 0 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    box-sizing: border-box;
}

.comment-message.success {
    background: #d4edda;
    color: #155724;
}

.comment-message.error {
    background: #f8d7da;
    color: #721c24;
}

@media (max-width: 768px) {
    .images-container {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 20px;
    }
}

