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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ffffff;
    overflow-x: hidden;
    background: #0a0e27;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    padding: 40px 20px;
    background: rgba(26, 32, 53, 0.9);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2em;
    color: #a0aec0;
}

section {
    background: rgba(26, 32, 53, 0.95);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #667eea;
}

.model-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.model-card {
    background: linear-gradient(135deg, #1a2035 0%, #2d3561 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    border-color: #667eea;
}

.model-card.best-model {
    border-color: #48bb78;
    background: linear-gradient(135deg, #1a3520 0%, #2d5e3b 100%);
}

.model-card h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.model-card.best-model h3 {
    color: #48bb78;
}

.model-card p {
    color: #a0aec0;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.model-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.metric {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 6px;
}

.metric-label {
    font-size: 0.8em;
    color: #a0aec0;
}

.metric-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #667eea;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e2e8f0;
    font-weight: 500;
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(66, 153, 225, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    width: 100%;
    font-size: 1.3em;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(72, 187, 120, 0.5);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #1a2035 0%, #2d3561 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    display: block;
    margin-top: 5px;
    color: #a0aec0;
    font-size: 0.9em;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.model-selection-options {
    margin-bottom: 20px;
}

.model-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.data-info {
    margin-top: 20px;
}

.results-section {
    background: rgba(26, 32, 53, 0.95);
}

.result-card {
    background: linear-gradient(135deg, #1a2035 0%, #2d3561 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.result-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.confusion-matrix {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 400px;
    margin: 20px auto;
}

.confusion-cell {
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    text-align: center;
    border-radius: 8px;
}

.confusion-cell .value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.confusion-cell .label {
    display: block;
    margin-top: 5px;
    color: #a0aec0;
    font-size: 0.9em;
}

.comparison-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
}

.comparison-table th {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    font-weight: 600;
}

.comparison-table td {
    color: #e2e8f0;
}

.comparison-table tr:hover {
    background: rgba(102, 126, 234, 0.1);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(102, 126, 234, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    margin-top: 20px;
    font-size: 1.2em;
    color: #667eea;
}

footer {
    text-align: center;
    padding: 30px;
    color: #a0aec0;
    margin-top: 40px;
}

footer p {
    margin: 10px 0;
}

footer a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(72, 187, 120, 0.2);
    border: 2px solid #48bb78;
    color: #48bb78;
}

.alert-error {
    background: rgba(245, 101, 101, 0.2);
    border: 2px solid #f56565;
    color: #f56565;
}

.alert-info {
    background: rgba(66, 153, 225, 0.2);
    border: 2px solid #4299e1;
    color: #4299e1;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .model-cards,
    .stats-grid,
    .input-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-table {
        font-size: 0.9em;
    }
}

