:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --accent-primary: #3182ce;
    --accent-hover: #2c5aa0;
    --success-bg: #f0fff4;
    --success-border: #9ae6b4;
    --success-text: #22543d;
    --error-bg: #fed7d7;
    --error-border: #feb2b2;
    --error-text: #c53030;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
}


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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 1rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    min-height: 80vh;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.header {
    background: var(--card-bg);
    padding: 1.5rem 2rem 1rem 2rem;
    text-align: center;
}

.app-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    font-size: 2rem;
}

.app-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

.header-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.content {
    padding: 1rem 2rem 1.5rem 2rem;
}

.step {
    display: none;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
    animation: slideInFromRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    text-align: center;
}


.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-primary);
}

.upload-area:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
}

.upload-area.dragover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: scale(1.01);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.upload-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.upload-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.upload-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-info {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.file-info-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.file-info-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-info-size {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-primary);
    border-color: var(--border-hover);
    box-shadow: none;
    transform: translateY(-1px);
}

.success {
    text-align: center;
    padding: 1rem 0 0.5rem 0;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success-icon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.success h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.success p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.error-msg {
    padding: 0.75rem 1rem;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: 8px;
    color: var(--error-text);
    font-size: 0.875rem;
    margin-top: 0.75rem;
    display: none;
}


.progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    justify-content: center;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .main-container { min-height: auto; padding: 0.5rem; }
    .header { padding: 1.25rem 1.25rem 0.75rem; }
    .content { padding: 1rem 1.25rem 1.25rem; }
    .btn { min-height: 52px; font-size: 1rem; }
}
