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

body {
    background: #0f0f1a;
    color: #e0e0e0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 480px;
    text-align: center;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: #888;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

/* Переключатель режимов */
.mode-selector {
    display: flex;
    background: #1a1a2e;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
    gap: 4px;
}

.mode-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #888;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
}

/* Панель */
.panel {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 28px 24px;
    border: 1px solid #2a2a3e;
}

.panel h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #fff;
}

.hint {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.hint.small {
    font-size: 0.8rem;
    margin-top: 8px;
    margin-bottom: 16px;
}

/* Большой код */
.code-display {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 12px;
    color: #fff;
    background: #0f0f1a;
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
    font-family: 'Courier New', monospace;
    border: 2px solid #667eea;
}

/* Поле ввода кода */
.code-input {
    width: 100%;
    padding: 16px;
    font-size: 1.8rem;
    text-align: center;
    letter-spacing: 8px;
    background: #0f0f1a;
    border: 2px solid #2a2a3e;
    border-radius: 12px;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-family: 'Courier New', monospace;
    outline: none;
    transition: border-color 0.2s;
}

.code-input:focus {
    border-color: #667eea;
}

/* Область перетаскивания файла */
.file-drop-area {
    border: 2px dashed #2a2a3e;
    border-radius: 12px;
    padding: 32px 20px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.file-drop-area:hover,
.file-drop-area.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-drop-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.file-drop-text {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.file-drop-hint {
    color: #555;
    font-size: 0.8rem;
}

/* Выбранный файл */
.selected-file {
    background: #0f0f1a;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    text-align: left;
    font-size: 0.85rem;
    color: #aaa;
    border: 1px solid #2a2a3e;
    word-break: break-all;
}

/* Кнопки */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-bottom: 10px;
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: transparent;
    color: #888;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: #667eea;
    color: #ccc;
}

/* Статусы */
.status-badge {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.status-badge.waiting {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.status-badge.ready {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.status-badge.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Информация о файле */
.file-info {
    background: #0f0f1a;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    text-align: left;
    border: 1px solid #2a2a3e;
    font-size: 0.85rem;
    color: #aaa;
    word-break: break-all;
}

/* Прогресс загрузки */
.progress-wrap {
    background: #0f0f1a;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

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

/* Адаптация для мобильных */
@media (max-width: 480px) {
    .code-display {
        font-size: 2.8rem;
        letter-spacing: 8px;
    }

    .panel {
        padding: 20px 16px;
    }
}
