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

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

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.home-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.home-btn:active {
    transform: translateY(0);
}

.title {
    font-size: 48px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 18px;
    color: #718096;
    margin-bottom: 15px;
}

.description {
    font-size: 14px;
    color: #4a5568;
    font-style: italic;
}

/* Main Content */
.main-content {
    background: white;
    padding: 40px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* File Selection Section */
.file-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.file-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.icon {
    font-size: 24px;
}

.input-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
}

.file-input-display {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #f7fafc;
    color: #2d3748;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-input-display.selected {
    border-color: #667eea;
    background: #edf2f7;
}

.file-input-hidden {
    display: none;
}

.select-btn {
    padding: 15px 30px;
    background: #5a67d8;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.select-btn:hover {
    background: #4c51bf;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(90, 103, 216, 0.3);
}

.select-btn:active {
    transform: translateY(0);
}

/* Action Section */
.action-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 30px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.action-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.action-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-icon {
    font-size: 24px;
}

.warning-text {
    font-size: 12px;
    color: #e53e3e;
    font-style: italic;
}

/* Progress Section */
.progress-section {
    padding: 30px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 15px;
    margin-bottom: 30px;
    border: 2px solid #e2e8f0;
}

.progress-header {
    text-align: center;
    margin-bottom: 20px;
}

.progress-title {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
    border-radius: 10px;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #4a5568;
    font-weight: 600;
}

/* Results Section */
.results-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-title {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    padding: 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 15px;
    border: 2px solid #28a745;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 25px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #cbd5e0;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
    word-break: break-all;
}

.stat-label {
    font-size: 14px;
    color: #4a5568;
    font-weight: 600;
}

/* Details Section */
.details-section {
    margin-top: 30px;
}

.details-title {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
}

.details-table-wrapper {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.details-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.details-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.details-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s ease;
}

.details-table tbody tr:hover {
    background: #f7fafc;
}

.details-table td {
    padding: 12px 15px;
    font-size: 13px;
    color: #4a5568;
}

.details-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Error Message */
.error-section {
    padding: 20px;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
    border-radius: 15px;
    margin-bottom: 20px;
}

.error-title {
    font-size: 20px;
    font-weight: 700;
    color: #721c24;
    margin-bottom: 10px;
}

.error-message {
    font-size: 14px;
    color: #721c24;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: white;
    font-size: 12px;
    margin-top: 20px;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 32px;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .action-btn {
        padding: 15px 30px;
        font-size: 16px;
    }

    .stat-value {
        font-size: 24px;
    }
}
