/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeInUp 0.8s ease-out;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* Main Content */
.main {
    position: relative;
}

/* Section Transitions */
.upload-section,
.processing-section,
.summary-section {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* Upload Card */
.upload-card {
    background: white;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 2px dashed #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.upload-card.dragover {
    border-color: #667eea;
    background: #f8faff;
    transform: scale(1.02);
}

.upload-icon {
    color: #667eea;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.upload-description {
    color: #6b7280;
    margin-bottom: 32px;
    font-size: 1rem;
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(102, 126, 234, 0.3);
}

.upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(102, 126, 234, 0.4);
}

.upload-button:active {
    transform: translateY(0);
}

/* Processing Card */
.processing-card {
    background: white;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

.processing-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.processing-description {
    color: #6b7280;
    font-size: 1rem;
}

/* Summary Card */
.summary-card {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.reset-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8faff;
    color: #667eea;
    border: 1px solid #e0e7ff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.summary-content {
    max-height: 500px;
    overflow-y: auto;
    line-height: 1.8;
    color: #374151;
    font-size: 1rem;
    padding-right: 8px;
}

.summary-content::-webkit-scrollbar {
    width: 6px;
}

.summary-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.summary-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.summary-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .upload-card,
    .processing-card,
    .summary-card {
        padding: 32px 24px;
    }
    
    .summary-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .reset-button {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .title {
        font-size: 1.75rem;
    }
    
    .upload-card,
    .processing-card,
    .summary-card {
        padding: 24px 20px;
    }
}