/* 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);
    position: relative;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.home-btn {
    position: absolute;
    right: 40px;
    top: 40px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

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

.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);
}

/* Section Headings */
.section-heading {
    font-size: 1.2em;
    color: #667eea;
    margin-bottom: 20px;
    font-weight: 600;
}

/* File Selection Section */
.file-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.file-section:last-of-type {
    border-bottom: none;
}

.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;
}

.file-path-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #f7fafc;
    color: #2d3748;
    cursor: default;
}

.file-path-input:focus {
    outline: none;
    border-color: #667eea;
}

.config-input {
    text-align: center;
    font-weight: bold;
    cursor: text;
}

.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);
}

/* Configuration Grid */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.help-text {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

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

.compare-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 50px;
    background: #cbd5e0;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.compare-btn.enabled {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.compare-btn.enabled:active {
    transform: translateY(-1px);
}

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

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

.info-text {
    font-size: 12px;
    color: #4a5568;
    font-style: italic;
}

/* Progress Section */
.progress-section {
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 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);
    }
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 25px;
    text-align: center;
}

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

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

.stat-sheets {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
}

.stat-added {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
}

.stat-modified {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
}

.stat-removed {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
}

.stat-icon {
    font-size: 36px;
}

.stat-content {
    flex: 1;
}

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

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
}

/* Total Changes */
.total-changes {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    margin-bottom: 30px;
}

.total-label {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.total-value {
    font-size: 36px;
    font-weight: 700;
    color: white;
}

/* Success Message */
.success-message {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
    border-radius: 15px;
    margin-bottom: 30px;
}

.success-icon {
    font-size: 48px;
}

.success-content {
    flex: 1;
}

.success-title {
    font-size: 18px;
    font-weight: 700;
    color: #155724;
    margin-bottom: 10px;
}

.success-desc {
    font-size: 14px;
    color: #155724;
    margin-bottom: 5px;
}

/* Color Legend */
.color-legend {
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
    margin-top: 20px;
}

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

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #4a5568;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 5px;
}

/* Error Section */
.error-section {
    animation: fadeIn 0.5s ease;
}

.error-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
    border-radius: 15px;
}

.error-icon {
    font-size: 48px;
}

.error-content {
    flex: 1;
}

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

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

.retry-btn {
    padding: 10px 25px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

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

.footer a {
    color: white;
    text-decoration: underline;
}

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

    .home-btn {
        position: static;
        margin-top: 10px;
    }

    .header-content {
        flex-direction: column;
    }

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

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

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

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

    .legend-items {
        flex-direction: column;
    }
}
