/* Reset en basis styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

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

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Loading spinner */
.loading {
    text-align: center;
    color: white;
    font-size: 1.2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Notebook styling */
.notebook {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.lesson {
    margin-bottom: 40px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 30px;
}

.lesson:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.lesson h2 {
    color: #4a5568;
    margin-bottom: 25px;
    font-size: 1.8rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.exercise {
    margin-bottom: 30px;
    background: #f7fafc;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.exercise h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.exercise p {
    margin-bottom: 15px;
    color: #4a5568;
    line-height: 1.6;
}

/* Code editor styling */
.code-section {
    background: #1a202c;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.code-editor {
    width: 100%;
    min-height: 200px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    border: 1px solid #4a5568;
    border-radius: 5px;
    padding: 15px;
    background: #2d3748;
    color: #e2e8f0;
    resize: vertical;
    outline: none;
    line-height: 1.4;
}

.code-editor:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.run-button {
    background: #48bb78;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.run-button:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.run-button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

/* Output area */
.output {
    background: #1a202c;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    min-height: 80px;
    white-space: pre-wrap;
    border: 1px solid #4a5568;
    line-height: 1.4;
}

.error {
    background: #742a2a;
    color: #fed7d7;
    border-color: #e53e3e;
}

/* Interactive demo */
.interactive-demo {
    background: #edf2f7;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.demo-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin: 5px;
    transition: all 0.3s ease;
}

.demo-button:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

/* Card styling voor poker voorbeelden */
.card {
    display: inline-block;
    background: white;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 2px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card.hearts, .card.diamonds {
    color: #e53e3e;
}

.card.clubs, .card.spades {
    color: #2d3748;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .notebook {
        padding: 20px;
    }
    
    .exercise {
        padding: 15px;
    }
    
    .code-editor {
        font-size: 12px;
        min-height: 150px;
    }
    
    .output {
        font-size: 12px;
    }
}

/* Syntax highlighting voor code */
.code-editor::placeholder {
    color: #a0aec0;
}

/* Focus states */
.code-editor:focus,
.run-button:focus,
.demo-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Success states */
.run-button.success {
    background: #38a169;
}

/* Loading states */
.run-button.loading {
    background: #a0aec0;
    cursor: not-allowed;
}
