/* ========================================
   FLYING BOOK - IMPORT STYLES
   ======================================== */

:root {
    --primary-color: #667eea;
    --primary-dark: #5a6fd8;
    --primary-light: #e0e7ff;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-card: #ffffff;
    
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --border-focus: #667eea;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0 auto 0.75rem;
    color: var(--text-light);
    transition: var(--transition);
}

.progress-step.active .step-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.progress-step.completed .step-icon {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.progress-percentage {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ========================================
   HELP SECTION
   ======================================== */

.help-section {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 3rem;
}

.help-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.help-section h2 i {
    color: var(--info-color);
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.help-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
}

.help-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.help-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.help-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.help-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .progress-step {
        flex: none;
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .import-content {
        padding: 1rem 0;
    }
    
    .page-header {
        margin-bottom: 2rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .header-icon {
        font-size: 3rem;
    }
    
    .import-wizard {
        gap: 2rem;
    }
    
    .step-content {
        padding: 1.5rem;
    }
    
    .upload-zone {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-content h3 {
        font-size: 1.25rem;
    }
    
    .help-grid {
        grid-template-columns: 1fr;
    }
    
    .help-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .progress-steps {
        flex-direction: column;
        align-items: center;
    }
    
    .progress-steps::before {
        display: none;
    }
    
    .progress-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 640px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
        gap: 1rem;
    }
    
    .step-header {
        padding: 1.5rem;
    }
    
    .step-header h2 {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .option-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .file-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -20px, 0);
    }
    70% {
        transform: translate3d(0, -10px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

.slide-in-top {
    animation: slideInFromTop 0.5s ease-out;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

.bounce {
    animation: bounce 2s infinite;
}

/* ========================================
   LOADING STATES
   ======================================== */

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.loading {
    position: relative;
    color: transparent !important;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   DRAG & DROP STATES
   ======================================== */

.upload-zone.drag-over {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: scale(1.02);
}

.upload-zone.drag-over .upload-icon {
    animation: bounce 1s infinite;
}

/* ========================================
   SUCCESS STATES
   ======================================== */

.import-success .upload-zone {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.import-success .upload-icon {
    color: var(--success-color);
}

.import-error .upload-zone {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

.import-error .upload-icon {
    color: var(--error-color);
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.visible { display: block !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }

.flex { display: flex; }
.flex-column { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .import-header,
    .help-section,
    .progress-section {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .import-step {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
};
    padding: 0;
    box-sizing: border-box;
}

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

/* ========================================
   HEADER
   ======================================== */

.import-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo a:hover {
    opacity: 0.8;
}

.logo i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    min-height: 2.5rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    min-height: 3rem;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.import-content {
    flex: 1;
    padding: 2rem 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========================================
   PAGE HEADER
   ======================================== */

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.header-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert i {
    font-size: 1.25rem;
}

.redirect-info {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ========================================
   IMPORT WIZARD
   ======================================== */

.import-wizard {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.import-step {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.step-header {
    background: linear-gradient(135deg, var(--primary-light), rgba(118, 75, 162, 0.1));
    padding: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.step-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.step-header h2 i {
    color: var(--primary-color);
}

.step-content {
    padding: 2rem;
}

/* ========================================
   INFO GRID
   ======================================== */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.info-card:nth-child(1) .info-icon {
    color: var(--success-color);
}

.info-card:nth-child(2) .info-icon {
    color: var(--primary-color);
}

.info-card:nth-child(3) .info-icon {
    color: var(--warning-color);
}

.info-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.info-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ========================================
   TIPS SECTION
   ======================================== */

.tips-section {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.tips-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tips-section h3 i {
    color: var(--warning-color);
}

.tips-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.tip i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

/* ========================================
   UPLOAD ZONE
   ======================================== */

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: var(--bg-secondary);
    margin-bottom: 2rem;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.upload-zone.dragover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

.upload-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.upload-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
    transition: var(--transition);
}

.upload-btn:hover {
    color: var(--primary-dark);
}

.upload-content small {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* ========================================
   FILE INFO
   ======================================== */

.file-info {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 2rem;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-icon {
    font-size: 2rem;
    color: var(--error-color);
}

.file-meta {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.remove-file {
    width: 2rem;
    height: 2rem;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* ========================================
   IMPORT OPTIONS
   ======================================== */

.import-options {
    margin-bottom: 2rem;
}

.import-options h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.import-options h3 i {
    color: var(--primary-color);
}

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

.option-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
}

.option-label:hover {
    background: var(--bg-tertiary);
}

.option-label input {
    display: none;
}

.option-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.option-label input:checked + .option-checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.option-label input:checked + .option-checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.option-content {
    flex: 1;
}

.option-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.option-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========================================
   FORM ACTIONS
   ======================================== */

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

/* ========================================
   PROGRESS SECTION
   ======================================== */

.progress-section {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.progress-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.progress-header p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-light);
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0