/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Контейнер */
.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Заголовок */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 16px;
}

/* Секции */
.auth-section,
.upload-section {
    margin-bottom: 30px;
}

.hidden {
    display: none !important;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Кнопки */
button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 100%;
    font-family: inherit;
}

button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.logout-btn {
    background: transparent !important;
    color: #667eea !important;
    border: 1px solid #667eea !important;
    padding: 8px 16px !important;
    width: auto !important;
    font-size: 14px !important;
}

.logout-btn:hover {
    background: #667eea !important;
    color: white !important;
}

/* Загрузка файлов */
.file-drop-zone {
    border: 2px dashed #667eea;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9ff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: #764ba2;
    background: #f0f2ff;
}

.file-drop-zone p {
    margin: 0;
}

.file-drop-zone p:first-child {
    font-weight: 500;
    color: #333;
}

.file-drop-zone p:last-child {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* Информация о файле */
#file-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

#file-info p {
    margin: 5px 0;
    font-size: 14px;
}

/* Сообщения */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

/* Вкладки */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #e1e5e9;
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #666;
}

.tab:hover {
    color: #667eea;
    background: #f8f9ff;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9ff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Информация о пользователе */
.user-info {
    background: #f8f9ff;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #667eea;
}

.user-info span {
    font-weight: 500;
    color: #333;
}

/* Обработка */
.processing {
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.processing p:first-of-type {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.processing p:last-of-type {
    font-size: 14px;
    color: #666;
}

/* Анимации */
@keyframes spin {
    0% { 
        transform: rotate(0deg); 
    }
    100% { 
        transform: rotate(360deg); 
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .user-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logout-btn {
        width: 100% !important;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        border-bottom: 1px solid #e1e5e9;
        border-right: none;
    }
    
    .tab.active {
        border-bottom-color: #667eea;
        border-right: none;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    .file-drop-zone {
        padding: 20px 15px;
    }
    
    .file-drop-zone p:first-child {
        font-size: 14px;
    }
    
    .file-drop-zone p:last-child {
        font-size: 12px;
    }
}