:root {
    --primary: #4a6ee0;
    --primary-dark: #3a5bd0;
    --secondary: #6a11cb;
    --success: #00c853;
    --error: #ff4757;
    --warning: #ffa726;
    --text: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg: #f8f9ff;
    --bg-light: #ffffff;
    --border: #e0e0e0;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 480px;
}

.card {
    background: var(--bg-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    padding: 30px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

/* Хедер */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo i {
    font-size: 2.2rem;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 400;
}

/* Область загрузки */
.upload-section {
    margin-bottom: 25px;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    background: var(--bg);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(74, 110, 224, 0.02);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(74, 110, 224, 0.05);
    border-style: solid;
}

.upload-icon {
    margin-bottom: 20px;
}

.upload-icon i {
    font-size: 3.5rem;
    color: var(--primary);
    opacity: 0.8;
}

.upload-text h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.upload-text p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.file-info {
    font-size: 0.85rem !important;
    color: var(--text-lighter) !important;
    margin-top: 10px !important;
}

.btn-select {
    margin-top: 25px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(74, 110, 224, 0.3);
}

.btn-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 110, 224, 0.4);
}

.btn-select:active {
    transform: translateY(0);
}

/* Хинты */
.hint {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.hint-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.hint-item i {
    font-size: 1.2rem;
    color: var(--primary);
    background: rgba(74, 110, 224, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hint-item span {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.3;
}

/* Прогресс */
.progress-container {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px 0;
}

.progress-circle {
    position: relative;
    flex-shrink: 0;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    stroke-dasharray: 326.56;
    stroke-dashoffset: 326.56;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.progress-info {
    flex: 1;
}

.progress-info p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 15px;
}

.progress-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.detail i {
    color: var(--primary);
    width: 20px;
}

/* Результат */
.result-container {
    text-align: center;
    padding: 30px 0;
}

.success-animation {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success), #00b248);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-animation i {
    font-size: 2.5rem;
    color: white;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-message p {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 10px;
    font-weight: 500;
}

.result-details {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.4;
}

.auto-return {
    margin-top: 30px;
    padding: 15px;
    background: rgba(74, 110, 224, 0.05);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.auto-return i {
    color: var(--primary);
}

#countdown {
    font-weight: 700;
    color: var(--primary);
}

/* Футер */
.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.footer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.8rem !important;
    color: var(--text-lighter) !important;
}

.footer-info i {
    font-size: 0.9rem;
}

/* Уведомление */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification i {
    font-size: 1.2rem;
}

.notification.success i {
    color: var(--success);
}

.notification.error i {
    color: var(--error);
}

.notification.warning i {
    color: var(--warning);
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 110, 224, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(74, 110, 224, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 110, 224, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Адаптивность */
@media (max-width: 768px) {
    .card {
        padding: 25px 20px;
        margin: 0 10px;
    }
    
    .logo h1 {
        font-size: 1.6rem;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon i {
        font-size: 3rem;
    }
    
    .upload-text h3 {
        font-size: 1.2rem;
    }
    
    .progress-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .hint {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .hint-item {
        flex-direction: row;
        justify-content: center;
    }
    
    .notification {
        left: 20px;
        right: 20px;
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .card {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .btn-select {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
}