/* --- ALGEMENE INSTELLINGEN --- */
:root {
    --primary: #2563eb;       /* Modern Blauw */
    --primary-dark: #1e40af;
    --secondary: #f8fafc;     /* Lichte achtergrond */
    --text-main: #1e293b;     /* Donkergrijs voor tekst */
    --text-light: #64748b;
    --accent: #f59e0b;        /* Oranje voor highlights */
    --code-bg: #1e1e1e;       /* Donker voor code blokken */
    --sidebar-width: 260px;
}

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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-color: var(--secondary);
    color: var(--text-main);
    line-height: 1.6;
}

/* --- HEADER --- */
.top-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.logo span {
    color: var(--primary);
}

/* --- LAYOUT (Sidebar + Content) --- */
.layout-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 70px);
}

/* --- SIDEBAR MENU (Gevuld door JS) --- */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 20px;
    flex-shrink: 0;
}

.nav-list {
    list-style: none;
    position: sticky;
    top: 90px; /* Blijft hangen als je scrollt */
}

.nav-list li {
    margin-bottom: 8px;
}

.nav-list a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-main);
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-list a:hover {
    background-color: #eff6ff;
    color: var(--primary);
}

/* De 'active' class wordt door menu.js toegevoegd */
.nav-list a.active {
    background-color: var(--primary);
    color: white;
}

/* --- MAIN CONTENT --- */
.content {
    flex: 1;
    padding: 40px;
    background: var(--secondary);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; color: var(--text-main); }
h2 { font-size: 1.8rem; margin-top: 2rem; margin-bottom: 1rem; color: var(--primary-dark); border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; }
h3 { font-size: 1.3rem; margin-top: 1.5rem; margin-bottom: 0.5rem; color: var(--text-main); }

p { margin-bottom: 1rem; color: #334155; }

/* Nieuwe styling voor regelnummers in foutmeldingen */
.line-badge {
    display: inline-block;
    background: #e2e8f0;
    color: #475569;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.85em;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
    border: 1px solid #cbd5e1;
}

/* Zorg dat de lijst met fouten netjes uitlijnt */
.error-list li {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    line-height: 1.5;
}

.error-text {
    flex: 1;
}

/* --- KAARTEN & BOXEN --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.term-box {
    background: white;
    border-left: 4px solid var(--accent);
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.next-step-box {
    margin-top: 40px;
    padding: 20px;
    background: #dbeafe;
    border-radius: 8px;
    text-align: center;
    color: var(--primary-dark);
    font-weight: bold;
}

/* --- CODE BLOKKEN (Voor volgende pagina's) --- */
pre {
    background: var(--code-bg);
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
    position: relative;
}

code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
}

/* Syntax Highlighting Sim (Basic) */
.sql-keyword { color: #569cd6; font-weight: bold; } /* Blauw voor SELECT etc */
.sql-string { color: #ce9178; } /* Oranje voor tekst */
.sql-number { color: #b5cea8; } /* Groen voor nummers */

/* Kopieer knop stijl */
.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover { background: rgba(255,255,255,0.2); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .layout-wrapper { flex-direction: column; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid #e2e8f0; }
    .nav-list { position: static; }
}
/* --- TOOL SPECIFIEKE STYLING --- */
.tool-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

textarea#sql-input {
    width: 100%;
    height: 200px;
    padding: 20px;
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1.1rem;
    border: 2px solid #333;
    border-radius: 8px;
    resize: vertical;
}

textarea#sql-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.check-btn {
    background: var(--primary);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.check-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }
.check-btn:active { transform: translateY(0); }

/* Feedback Boxen */
.feedback-box {
    display: block; /* Belangrijk: Zichtbaar maken */
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-header {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Kleuren statussen */
.status-danger { background: #fee2e2; border: 2px solid #ef4444; color: #991b1b; }
.status-warning { background: #ffedd5; border: 2px solid #f97316; color: #9a3412; }
.status-success { background: #dcfce7; border: 2px solid #22c55e; color: #166534; }

/* Foutenlijst & Regelnummers */
.error-list { list-style: none; padding: 0; }
.error-list li { display: flex; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.1); }
.error-list li:last-child { border-bottom: none; }

.line-badge {
    display: inline-block;
    background: rgba(0,0,0,0.1);
    color: inherit;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.85em;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 10px;
    min-width: 65px;
    text-align: center;
}

/* Suggestie Box */
.fix-box {
    background: white;
    padding: 15px;
    margin-top: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.fix-code {
    display: block;
    font-family: monospace;
    background: #f1f5f9;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ddd;
    color: #333;
}
