/* Base styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.6; color: #333; background: #f5f5f5; }

/* Navigation */
nav { background: #1a1a2e; color: white; padding: 1rem 0; }
.nav-container { max-width: min(1800px, 96vw); margin: 0 auto; padding: 0 1rem; display: flex; justify-content: space-between; align-items: center; }
.nav-brand { color: white; text-decoration: none; font-size: 1.4rem; font-weight: bold; }
.nav-links a { color: #ccc; text-decoration: none; margin-left: 1.5rem; }
.nav-links a:hover { color: white; }

/* Container */
.container { max-width: min(1800px, 96vw); margin: 2rem auto; padding: 0 1rem; }

/* Alerts */
.alert { padding: 1rem 1.5rem; border-radius: 8px; margin-bottom: 1.5rem; }
.alert-error { background: #fee; border: 1px solid #fcc; color: #c33; }
.alert-success { background: #efe; border: 1px solid #cfc; color: #363; }
.alert-danger { background: #fee; border: 1px solid #fcc; color: #c33; }
.alert h2 { margin-bottom: 0.5rem; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: #555; }
.form-group input, .form-group select { padding: 0.5rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.9rem; }
.form-group input:focus { outline: none; border-color: #4a90d9; box-shadow: 0 0 0 2px rgba(74,144,217,0.2); }

/* Buttons */
.btn { padding: 0.75rem 2rem; border: none; border-radius: 6px; font-size: 1rem; cursor: pointer; font-weight: 600; }
.btn-primary { background: #4a90d9; color: white; }
.btn-primary:hover { background: #357abd; }
.btn-secondary { background: #f2f6fb; color: #1a1a2e; border: 1px solid #c9d8eb; }
.btn-secondary:hover { background: #e8f0f9; }
.btn-tertiary { background: transparent; color: #4a90d9; border: 1px dashed #9ec0e3; }
.btn-tertiary:hover { background: #f4f9ff; }

/* Demo controls */
.demo-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0 1.5rem; }
.demo-actions .btn { padding: 0.55rem 1rem; font-size: 0.9rem; }

/* Info box */
.info-box { background: #e8f4fd; border: 1px solid #b8daff; border-radius: 8px; padding: 1rem 1.5rem; margin-top: 2rem; }
.info-box h3 { margin-bottom: 0.5rem; color: #004085; }

/* Evaluation results */
.evaluation-results { margin-top: 2rem; background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 1rem 0; }
.metric-card { background: #f8f9fa; padding: 1.5rem; border-radius: 8px; text-align: center; }
.metric-card h3 { font-size: 0.9rem; color: #666; margin-bottom: 0.5rem; }
.metric-value { font-size: 1.8rem; font-weight: bold; color: #1a1a2e; }

/* Confusion matrix */
.confusion-matrix { border-collapse: collapse; margin: 1rem 0; }
.confusion-matrix th, .confusion-matrix td { border: 1px solid #ddd; padding: 0.75rem 1.5rem; text-align: center; }
.confusion-matrix th { background: #f8f9fa; font-weight: 600; }

/* Table */
.table-container { 
    max-height: 500px;
    overflow: auto; 
    margin-top: 1rem; 
    border: 1px solid #ddd;
    border-radius: 4px;
}
.table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 0.85rem; 
    background: white;
}
.table th, .table td { 
    border: 1px solid #eee; 
    padding: 0.75rem 1rem; 
    text-align: left; 
    vertical-align: middle;
    white-space: nowrap;
}
.table th { 
    background: #f8f9fa; 
    position: sticky; 
    top: 0; 
    z-index: 10;
    font-weight: 600;
    color: #1a1a2e;
    border-bottom: 2px solid #dee2e6;
}
.table tr:nth-child(even) { background-color: #fafbfc; }
.table tr:hover { background-color: #f1f4f9; }

/* Predictions */
.predictions-results { margin-top: 2rem; background: white; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

/* Footer */
footer { text-align: center; padding: 2rem; color: #999; font-size: 0.85rem; margin-top: 3rem; }
