:root {
    /* --- ELEMENT / LIGHT THEMA --- */
    --bg-main: #f2f5f8;       /* Zeer lichtgrijs (Element style background) */
    --bg-card: #ffffff;
    
    /* Tekstkleuren */
    --text-main: #17191c;     /* Bijna zwart, scherp contrast */
    --text-muted: #737d8c;    /* Element grijs */
    
    /* ELEMENT GREEN */
    --accent: #0DBD8B; 
    --accent-hover: #0ac792;
    
    /* Contrast kleur voor secundaire knoppen (Dark Mode feel in knoppen) */
    --btn-dark-bg: #17191c;
    --btn-dark-text: #ffffff;

    --border: #e3e8f0;
    
    /* Schaduwen */
    --shadow-card: 0px 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0px 12px 24px rgba(0, 0, 0, 0.1);
    
    --nav-height: 72px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* --- HEADER --- */
.main-header {
    height: var(--nav-height);
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center;
}

.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.nav-links a {
    color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; 
    margin-left: 24px; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-main); }

/* --- HERO & CONTENT --- */
.main-content { flex: 1; padding-top: 60px; }

.hero-section { text-align: center; margin-bottom: 60px; }

.hero-title {
    font-size: 2.8rem; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px;
    color: var(--text-main);
}
.hero-subtitle { color: var(--text-muted); max-width: 600px; margin: 0 auto 40px; font-size: 1.1rem; line-height: 1.6; }

/* Features */
.features-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 24px; margin-bottom: 80px; 
}
.feature-item { 
    background: var(--bg-card); padding: 24px; border-radius: 12px; 
    border: 1px solid var(--border); box-shadow: var(--shadow-card);
}
.feature-item h3 { color: var(--text-main); margin-bottom: 8px; font-size: 1.1rem; display: flex; align-items: center; gap: 8px;}
.feature-item p { font-size: 0.95rem; color: var(--text-muted); }

/* --- SERVER LIST --- */
.section-title { 
    font-size: 1.5rem; margin-bottom: 24px; 
    color: var(--text-main); font-weight: 700; letter-spacing: -0.5px;
    border-left: 4px solid var(--accent); padding-left: 12px;
}

.server-grid { 
    display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); 
    gap: 24px; padding-bottom: 60px; 
}

.server-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px; padding: 24px;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-card);
    /* HOVER GROW EFFECT */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}

.server-card:hover { 
    transform: scale(1.02); /* Groeit iets */
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
    z-index: 10;
}

.server-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.server-header h3 { font-size: 1.25rem; font-weight: 700; }

.tag-container { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tag { 
    font-size: 0.75rem; font-weight: 600;
    background: #f0f2f5; color: var(--text-muted); 
    padding: 4px 10px; border-radius: 6px; 
}

.server-desc { color: var(--text-muted); margin-bottom: 24px; flex-grow: 1; font-size: 0.95rem; }

/* --- KNOPPEN (ELEMENT STIJL) --- */
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }

.btn {
    padding: 10px 16px; border-radius: 8px; text-align: center; text-decoration: none;
    font-weight: 600; font-size: 0.9rem; transition: all 0.2s; cursor: pointer; display: block;
}

/* Primaire knop: Element Green */
.btn-primary {
    background-color: var(--accent); 
    color: white; border: none;
}
.btn-primary:hover { background-color: var(--accent-hover); }

/* Secundaire knop: Donker contrast (Join Server) */
.btn-secondary {
    background-color: var(--btn-dark-bg);
    color: var(--btn-dark-text);
    border: 1px solid var(--btn-dark-bg);
}
.btn-secondary:hover {
    background-color: #363b42; /* Iets lichter zwart */
    border-color: #363b42;
    transform: translateY(-1px);
}

/* Status Badges */
.status-badge { font-family: monospace; font-size: 0.75rem; padding: 4px 8px; border-radius: 6px; font-weight: 600; }
.status-badge.loading { background: #f0f2f5; color: var(--text-muted); }
.status-badge.online { color: #008562; background: #e0fbf4; } /* Donkerder groen op lichtgroen */
.status-badge.outdated { color: #b75500; background: #fff5eb; } 
.status-badge.offline { color: #c53030; background: #fff5f5; }

/* --- FOOTER --- */
.main-footer {
    border-top: 1px solid var(--border); padding: 40px 0;
    background: #ffffff; margin-top: auto; text-align: center;
}
.footer-text { color: var(--text-muted); font-size: 0.9rem; }
.footer-links { margin-top: 12px; }
.footer-links a { color: var(--text-muted); margin: 0 12px; text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: var(--text-main); }

/* --- BROWSER PAGE (KAMERS) --- */
.browser-nav { padding: 20px 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.back-link { 
    color: var(--text-muted); text-decoration: none; font-weight: 600; 
    display: flex; align-items: center; gap: 8px; 
    padding: 8px 12px; border-radius: 8px; transition: background 0.2s;
}
.back-link:hover { background: #f0f2f5; color: var(--text-main); }

.search-wrapper { position: relative; margin-bottom: 30px; }
#room-search { 
    width: 100%; padding: 14px 20px 14px 48px; 
    background: #ffffff; border: 1px solid #cbd5e0;
    color: var(--text-main); border-radius: 8px; font-size: 1rem; 
    transition: all 0.2s;
}
#room-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 189, 139, 0.2); }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* Room Grid */
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.room-card { 
    background: #ffffff; border: 1px solid var(--border); 
    border-radius: 12px; padding: 20px; display: flex; flex-direction: column; height: 100%;
    /* HOVER GROW EFFECT */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.room-card:hover { 
    transform: translateY(-4px); 
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.room-header { display: flex; gap: 16px; margin-bottom: 12px; }
.avatar-container { 
    width: 48px; height: 48px; border-radius: 50%; /* Element rond */
    background: #f0f2f5; overflow: hidden; flex-shrink: 0; 
    display: flex; align-items: center; justify-content: center; 
    border: 1px solid var(--border);
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.avatar-char { font-size: 1.4rem; font-weight: 700; color: #a0aec0; }

.room-info h4 { font-size: 1rem; color: var(--text-main); margin-bottom: 2px; font-weight: 700; }
.room-alias { color: var(--text-muted); font-size: 0.85rem; font-family: monospace; }
.room-topic { font-size: 0.9rem; color: var(--text-muted); flex-grow: 1; margin-bottom: 20px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-height: 1.5; }

.room-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 16px; margin-top: auto;}
.member-count { color: var(--text-muted); font-size: 0.85rem; display: flex; align-items: center; gap: 6px; font-weight: 500; }

/* Nieuwe Room Join Knop styling */
.btn-join { 
    background: rgba(13, 189, 139, 0.1); /* Zeer licht groen */
    color: var(--accent); /* Element green tekst */
    padding: 6px 16px; border-radius: 20px; text-decoration: none;
    font-size: 0.85rem; font-weight: 700; transition: all 0.2s;
}
.btn-join:hover { 
    background: var(--accent); 
    color: white; 
    box-shadow: 0 2px 5px rgba(13, 189, 139, 0.3);
}

.pagination { display: flex; justify-content: center; gap: 8px; padding: 40px 0; }
.page-btn { 
    background: #ffffff; border: 1px solid var(--border); 
    color: var(--text-main); padding: 8px 14px; cursor: pointer; 
    border-radius: 8px; font-weight: 500; transition: all 0.2s; 
}
.page-btn:hover:not(:disabled) { background: #f0f2f5; }
.page-btn.active { background: var(--text-main); color: white; border-color: var(--text-main); }

/* --- SERVER INFO PAGE (Dashboard Style) --- */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Twee kolommen */
    gap: 30px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .info-grid { grid-template-columns: 1fr; }
}

.info-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-card);
}

.info-card h3 {
    font-size: 1.2rem; margin-bottom: 20px;
    color: var(--text-main); border-bottom: 2px solid #f0f2f5;
    padding-bottom: 10px;
}

/* Data Lists (Key: Value) */
.data-list { list-style: none; }
.data-list li {
    display: flex; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid #f0f2f5;
    font-size: 0.95rem;
}
.data-list li:last-child { border-bottom: none; }
.data-label { color: var(--text-muted); font-weight: 500; }
.data-value { color: var(--text-main); font-weight: 600; text-align: right; }

/* Links in info cards */
.info-link {
    color: var(--accent); text-decoration: none; font-weight: 600;
}
.info-link:hover { text-decoration: underline; }

/* Status Labels (Required/Optional) */
.req-badge {
    font-size: 0.75rem; padding: 2px 8px; border-radius: 4px;
    background: #e2e8f0; color: #4a5568; font-weight: 600;
}
.req-badge.yes { background: #fed7d7; color: #c53030; } /* Rood */
.req-badge.no { background: #c6f6d5; color: #2f855a; }  /* Groen */

/* --- NIEUWE GROTE JOIN KNOP --- */
.btn-join-large {
    display: block;
    width: 100%;
    margin-top: 12px; /* Ruimte tussen de bovenste knoppen en deze */
    padding: 12px;
    background-color: transparent;
    border: 2px solid var(--border); /* Subtiele rand */
    color: var(--text-main);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn-join-large:hover {
    border-color: var(--text-main);
    background-color: var(--text-main); /* Wordt donker/zwart bij hover */
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- NIEUWE CONTENT SECTIES (Homepage / Users / Operators) --- */

/* Split Section (Tekst links, Plaatje/Box rechts) */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

@media (max-width: 768px) {
    .split-section { grid-template-columns: 1fr; gap: 40px; }
}

.content-block h2 { font-size: 2rem; margin-bottom: 20px; color: var(--text-main); }
.content-block p { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.7; }

/* "Get Started" Box (Homepage) */
.start-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-card);
}
.start-box h3 { border-bottom: 2px solid #f0f2f5; padding-bottom: 15px; margin-bottom: 20px; }

.step-list { list-style: none; counter-reset: step-counter; }
.step-list li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 15px;
    color: var(--text-muted);
}
.step-list li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0; top: 0;
    width: 28px; height: 28px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 28px;
    font-weight: 700;
    font-size: 0.85rem;
}
.step-list li a { color: var(--accent); text-decoration: none; font-weight: 600; }
.step-list li a:hover { text-decoration: underline; }

/* Code Block (Operators) */
.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: 20px 0;
}

/* Clients Grid (Users page) */
.client-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px; margin-top: 30px;
}
.client-card {
    background: white; border: 1px solid var(--border);
    padding: 20px; border-radius: 12px; text-align: center;
    transition: transform 0.2s;
}
.client-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.client-icon { width: 60px; height: 60px; margin-bottom: 15px; border-radius: 12px; object-fit: contain; }
.client-card h4 { margin-bottom: 10px; }
.client-card a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* --- TABLES (Users Page) --- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.data-table th, .data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.data-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-main);
}
.data-table tr:last-child td { border-bottom: none; }

/* --- POPULAR ROOMS GRID --- */
.category-block { margin-bottom: 50px; }
.category-title { 
    font-size: 1.5rem; margin-bottom: 20px; 
    border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 5px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.room-link-card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s;
}
.room-link-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: var(--shadow-card);
}

.room-icon-placeholder {
    width: 40px; height: 40px;
    background: #f0f2f5; color: var(--text-muted);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: bold; flex-shrink: 0;
}

.room-link-info h4 { margin: 0; font-size: 0.95rem; color: var(--text-main); }
.room-link-info span { font-size: 0.8rem; color: var(--text-muted); font-family: monospace; }

/* --- STATUS LEGEND GRID (Voor Users page) --- */
.status-legend {
    display: grid;
    grid-template-columns: auto 150px 1fr; /* Badge | Naam | Omschrijving */
    gap: 20px;
    align-items: center;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .status-legend {
        grid-template-columns: 1fr; /* Mobiel: onder elkaar */
        gap: 10px;
    }
}

.legend-item {
    display: contents; /* Zorgt dat de kinderen direct in de grid vallen */
}

/* Achtergrondjes voor de rijen (optioneel, voor leesbaarheid) */
.legend-row-bg {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.legend-title {
    font-weight: 700;
    color: var(--text-main);
}

.legend-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- HEADER LOGO UPDATE --- */
.logo {
    display: flex;
    align-items: center;
    gap: 12px; /* Ruimte tussen plaatje en tekst */
    text-decoration: none;
    color: var(--text-main);
}

.logo img {
    height: 36px; /* Iets groter voor betere zichtbaarheid */
    width: 36px;
    object-fit: contain;
    border-radius: 6px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, var(--text-main) 0%, #555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; /* Subtiel gradient effect op de tekst */
}

/* --- TERMINOLOGIE GRID (Users Page) --- */
/* Dit maakt de layout van je screenshot na */
.status-grid {
    display: grid;
    grid-template-columns: 120px 140px 1fr; /* Kolom 1: Badge, Kolom 2: Titel, Kolom 3: Tekst */
    gap: 15px 30px;
    align-items: center;
    background: #fcfcfc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .status-grid {
        grid-template-columns: 1fr; /* Mobiel: alles onder elkaar */
        gap: 10px;
    }
}

.status-label {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.status-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- POPULAR ROOMS ICONS --- */
.room-link-card img.room-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}