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

body {
    font-family: 'Roboto Slab', serif;
    background: linear-gradient(to bottom, #F0F8FF 0%, #E0F6FF 50%, #87CEEB 100%);
    min-height: 100vh;
    color: #333;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Футер */
.footer {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: auto;
    padding: 20px 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer a {
    color: #9d32a2 !important;
}

/* Хедер */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 75px;
    width: auto;
}

.login-btn {
    background: transparent;
    border: 1px solid #333;
    padding: 8px 16px;
    border-radius: 4px;
    font-family: 'Roboto Slab', serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #333;
    color: white;
}

/* Основной контент с фоновым изображением */
.main-content {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-image: url('./img/ebatya.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 10px;
}

.upload-section {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    z-index: 2;
}

.upload-area {
    border: 2px dashed #999;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    min-width: 300px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #666;
    background: rgba(255, 255, 255, 0.7);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
    font-weight: 500;
}

.info-section {
    flex: 0 0 auto;
    max-width: 300px;
    z-index: 2;
}

.info-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.12;
    color: #333;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

/* Стили для уровня сжатия */
.compression-level {
    margin-top: 20px;
}

.compression-title {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.compression-option {
    margin-right: 20px;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: block;
}

.compression-option:last-child {
    margin-right: 0;
}

.compression-option input[type="radio"] {
    margin-right: 5px;
}

/* Контейнер результатов */
.results-container {
    position: relative;
    z-index: 2;
    margin-top: -50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    display: none;
}

/* Результаты сжатия */
.compression-results {
    background: #4d4f56;
    border-radius: 12px 12px 0 0;
    padding: 20px;
    color: white;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.savings {
    font-size: 35px;
    font-weight: 600;
    color: #90EE90;
}

.download-all-btn {
    background: #90EE90;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-family: 'Roboto Slab', serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-all-btn:hover {
    background: #7FDD7F;
    transform: translateY(-1px);
}

.stats {
    font-size: 14px;
    color: #ccc;
    display: flex;
    gap: 10px;
}

/* Список файлов */
.file-list {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0 0 12px 12px;
    padding: 20px;
    margin-bottom: 40px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.file-item:last-child {
    border-bottom: none;
}

.file-preview {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-name {
    font-weight: 600;
    font-size: 14px;
}

.file-type {
    color: #4A90E2;
    font-size: 12px;
    font-weight: 500;
}

.file-size {
    color: #666;
    font-size: 12px;
}

.file-savings {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-right: 20px;
}

.savings-percent {
    color: #90EE90;
    font-weight: 600;
    font-size: 14px;
}

.new-size {
    color: #666;
    font-size: 12px;
}

.download-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Roboto Slab', serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

/* Прогресс бар */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4A90E2, #90EE90);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Анимация загрузки */
.progress-fill.loading {
    background: linear-gradient(90deg, #4A90E2, #90EE90, #4A90E2);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Эффект при перетаскивании */
.upload-area.dragover {
    border-color: #4A90E2 !important;
    background: rgba(74, 144, 226, 0.2) !important;
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Анимация появления результатов */
.results-container.show {
    display: block;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.magic-number {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #00000040;
    font-size: 12px;
    font-weight: 600;
}

.magic-number span {
    color: #00000040;
    font-weight: 700;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .main-content {
        background-position: 24% center;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 40px 20px;
        background-position: 10% center;
    }

    .upload-section {
        order: 1;
    }

    .info-section {
        order: 2;
        max-width: none;
        margin-bottom: 30px;
    }

    .info-title {
        font-size: 24px;
        color: white;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }

    .compression-title {
        color: white;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }

    .compression-option {
        color: white;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
        display: block;
        margin-bottom: 8px;
        margin-right: 0;
    }

    .compression-option:last-child {
        margin-bottom: 0;
    }

    .results-header {
        flex-direction: column;
        gap: 10px;
    }

    .file-item {
        flex-wrap: wrap;
        gap: 10px;
    }

    .file-savings {
        flex-direction: row;
        align-items: center;
        margin-right: 0;
    }


}

@media (max-width: 566px) {
    .main-content {
        background-position: 14% center;
    }

    .header {
        margin-bottom: 20px;
    }

    .footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .magic-number {
        position: static;
        transform: none;
        order: 2;
    }

}