/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Navigation */
.main-nav {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #667eea;
    color: white;
}

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

.content-section {
    background: white;
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.content-section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-left: 5px solid #667eea;
    padding-left: 1rem;
}

.welcome-section {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.welcome-section h2 {
    color: white;
    border-left: none;
}

/* Interactive Cards */
.interactive-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    border-left: 4px solid #667eea;
}

.interactive-card h3 {
    color: #333;
    margin-bottom: 1rem;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1rem 0;
}

.card {
    padding: 1.5rem;
    border-radius: 10px;
    color: white;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card.predictive {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card.descriptive {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.card.holdout {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.card.kfold {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.card h4 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.card ul {
    list-style: none;
}

.card li {
    margin: 0.5rem 0;
    padding-left: 1rem;
    position: relative;
}

.card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: rgba(255,255,255,0.8);
}

/* Buttons */
.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* Decision Tree */
.decision-tree {
    text-align: center;
}

.step {
    margin: 1rem 0;
}

.result-card {
    background: #e8f5e8;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 4px solid #4caf50;
}

/* K-Fold Visualizer */
.kfold-visualizer {
    text-align: center;
}

.kfold-display {
    margin: 1rem 0;
    padding: 1rem;
    background: #f0f0f0;
    border-radius: 10px;
    min-height: 100px;
}

/* Confusion Matrix */
.confusion-matrix table {
    margin: 1rem auto;
    border-collapse: collapse;
}

.confusion-matrix td {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    text-align: center;
}

.confusion-matrix input {
    width: 60px;
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.metrics-result {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.metric-explanations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.metric-card {
    background: #f0f0f0;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.metric-card h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

/* Overfitting Simulator */
.overfitting-simulator {
    text-align: center;
}

.simulation-controls {
    margin: 1rem 0;
}

.simulation-controls label {
    display: block;
    margin: 0.5rem 0;
    font-weight: 600;
}

.simulation-result {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    min-height: 80px;
}

/* Improvement Techniques */
.technique-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.technique-list li {
    background: #e8f5e8;
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    border-left: 4px solid #4caf50;
}

/* Quiz Styles */
.quiz-container {
    text-align: center;
}

.quiz-options {
    margin: 1.5rem 0;
}

.quiz-option {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
    padding: 1rem;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    background: #667eea;
    color: white;
}

.quiz-option.correct {
    background: #4caf50;
    color: white;
}

.quiz-option.incorrect {
    background: #f44336;
    color: white;
}

.quiz-result {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .metric-explanations {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

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

.content-section {
    animation: fadeIn 0.6s ease;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}