/* MeltSim Web UI Styles */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --bg-color: #ecf0f1;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --border-color: #bdc3c7;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

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

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

/* Header */
header {
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    display: grid;
    gap: 30px;
}

/* Input Section */
.input-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.input-section h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5em;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input[type="file"],
.form-group input[type="number"] {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-primary:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--primary-color);
    color: white;
    width: 100%;
    margin-top: 20px;
}

.btn-secondary:hover {
    background: #1a252f;
}

/* Progress Indicator */
.progress-section {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Error Message */
.error-message {
    background: #fdeaea;
    color: var(--error-color);
    padding: 15px 20px;
    border-radius: 5px;
    border-left: 4px solid var(--error-color);
    margin-top: 20px;
    font-weight: 500;
}

/* Results Section */
.results-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.results-section h2 {
    margin-bottom: 25px;
    color: var(--primary-color);
    font-size: 1.8em;
}

/* Summary Box */
.summary-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.summary-box h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

.summary-stats {
    display: grid;
    gap: 15px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.stat:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    opacity: 0.9;
}

.stat-value {
    font-size: 1.2em;
    font-weight: 700;
}

/* Plots Container */
.plots-container {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.plot-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.plot-box h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2em;
}

.plot-box img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Downloads Section */
.downloads-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.downloads-section h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.download-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.btn-download {
    padding: 12px 20px;
    background: var(--success-color);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-download:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-download-all {
    background: var(--secondary-color);
    grid-column: 1 / -1;
}

.btn-download-all:hover {
    background: #2980b9;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .container {
        padding: 10px;
    }

    .input-section,
    .results-section {
        padding: 20px;
    }

    .download-buttons {
        grid-template-columns: 1fr;
    }

    .btn-download-all {
        grid-column: 1;
    }
}

@media (min-width: 1024px) {
    .plots-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .plot-box:last-child {
        grid-column: 1 / -1;
    }
}

/* Multi-file upload styles */
.file-list ul {
    list-style: none;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-top: 10px;
}

.file-list li {
    padding: 5px;
    border-bottom: 1px solid #dee2e6;
}

.file-list li:last-child {
    border-bottom: none;
}

.sequence-item {
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    margin: 5px 0;
    border-radius: 5px;
}

.sequence-list {
    margin-top: 15px;
}
