:root {
    --primary-color: #4472C4;
    --secondary-color: #70AD47;
    --accent-color: #FFC000;
    --danger-color: #C00000;
    --background-color: #f5f7fa;
    --card-background: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), #66a3ff);
    color: white;
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
}

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

.header-content h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.header-content h1 i {
    margin-right: 10px;
}

.built-with {
    font-size: 0.9rem;
    opacity: 0.9;
}

.built-with a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.built-with a:hover {
    text-decoration: underline;
}

/* Main Content */
main {
    padding: 2rem 0;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.hero h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Configuration Section */
.config-section {
    margin-bottom: 2rem;
}

.config-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.config-main, .config-help {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.config-main h3, .config-help h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    height: 100%;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
}

.slider-group {
    display: flex;
    flex-direction: column;
}

.slider-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.slider-group input[type="range"] {
    width: 100%;
    cursor: pointer;
}

.btn-primary, .btn-success, .btn-info {
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #66a3ff);
    color: white;
    width: 100%;
    justify-content: center;
}

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

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), #8bc34a);
    color: white;
}

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

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    color: white;
}

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

/* Config Help */
.config-help ol {
    padding-left: 1.5rem;
}

.config-help li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.config-help li strong {
    color: var(--text-primary);
}

.config-help ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

.config-help code {
    background: var(--background-color);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

/* Progress Section */
.progress-section {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.progress-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar-container {
    position: relative;
    background: var(--background-color);
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 15px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: var(--text-primary);
}

.progress-status {
    color: var(--text-secondary);
    font-style: italic;
}

/* Results Section */
.results-section {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.results-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stats-panel, .log-panel {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 8px;
}

.stats-panel h4, .log-panel h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: bold;
    color: var(--primary-color);
}

.log-content {
    background: white;
    padding: 1rem;
    border-radius: 5px;
    height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* Data Preview */
.data-preview {
    margin-bottom: 2rem;
}

.data-preview h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

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

.data-table th {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:nth-child(even) {
    background: var(--background-color);
}

.data-table tr:hover {
    background: #f0f4f8;
}

/* Download Section */
.download-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

footer p {
    margin-bottom: 0.5rem;
}

footer p:last-child {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .download-section {
        flex-direction: column;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
}

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

.progress-section, .results-section {
    animation: fadeIn 0.5s ease;
}

/* Loading Spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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