:root {
    --background-color: #121212;
    --surface-color: #1E1E1E;
    --primary-accent: #6A5ACD;
    --secondary-accent: #007BFF;
    --text-color: #EAEAEA;
    --text-color-secondary: #B3B3B3;
    --border-color: #2D2D2D;
}
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    line-height: 1.6;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.site-header {
    background-color: var(--surface-color);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.8em;
    font-weight: 700;
}
.button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease;
}
.login-button {
    background-color: var(--primary-accent);
    color: white;
}
.import-button {
    background-color: var(--secondary-accent);
    color: white;
    text-align: center;
    margin-top: auto;
}
.button:hover {
    transform: translateY(-2px);
}
.widget-gallery {
    padding: 40px 0;
}
.widget-gallery h1 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
}
.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}
.widget-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.widget-preview {
    width: 100%;
    height: 180px;
    background-color: #2D2D2D;
    border-radius: 8px;
    margin-bottom: 20px;
}
.widget-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
}
.widget-card p {
    color: var(--text-color-secondary);
    margin: 0 0 20px 0;
    flex-grow: 1;
}
.site-footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    color: var(--text-color-secondary);
    border-top: 1px solid var(--border-color);
}

/* --- STYLING VOOR WIDGET DETAILPAGINA --- */

/* Styling for the 'Back' button */
.button-back:hover {
    background-color: var(--surface-color);
    border-color: var(--secondary-accent);
    color: var(--text-color);
}

.widget-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
    margin-bottom: 50px;
}

.widget-preview-large {
    width: 100%;
    min-height: 400px;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: var(--text-color-secondary);
}

.widget-info h1 {
    font-size: 2.8em;
    margin-top: 0;
    margin-bottom: 10px;
}

.widget-creator {
    font-size: 1.1em;
    color: var(--text-color-secondary);
    margin-bottom: 20px;
}

.widget-short-desc {
    font-size: 1.2em;
    line-height: 1.7;
}

.widget-stats {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    color: var(--text-color-secondary);
    font-weight: 600;
}

.import-button-large {
    display: block;
    width: 100%;
    text-align: center;
    padding: 15px 20px;
    font-size: 1.2em;
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    color: white;
}
.import-button-large:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

.widget-full-description {
    background-color: var(--surface-color);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.widget-full-description h2 {
    margin-top: 0;
}

.widget-full-description ul {
    list-style-type: '✅ ';
    padding-left: 20px;
}

/* Responsive aanpassing voor kleinere schermen */
@media (max-width: 900px) {
    .widget-detail-layout {
        grid-template-columns: 1fr;
    }
}

/* --- STYLING VOOR KLIKBARE KAART --- */
a.widget-card-link {
    text-decoration: none;
    color: inherit;
}

/* --- STYLING VOOR ABOUT PAGINA --- */

.page-container {
    padding-top: 40px;
    padding-bottom: 40px;
}

.page-container h1 {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 20px;
}

.page-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    font-size: 1.2em;
    color: var(--text-color-secondary);
}

.how-it-works-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.info-column {
    background-color: var(--surface-color);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.info-column h2 {
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-accent);
    padding-bottom: 10px;
}

.info-column ol {
    padding-left: 20px;
}

.info-column li {
    margin-bottom: 15px;
    line-height: 1.7;
}

/* Responsive aanpassing voor kleinere schermen */
@media (max-width: 900px) {
    .how-it-works-grid {
        grid-template-columns: 1fr;
    }
}

/* --- STYLING VOOR NAVIGATIE --- */
.main-nav {
    display: flex;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color-secondary);
    font-weight: 600;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--text-color);
}

/* --- STYLING VOOR DASHBOARD PAGINA --- */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.publish-button {
    background-color: var(--primary-accent);
    color: white;
}

.publish-button:hover {
    background-color: #7B68EE;
}

.dashboard-table-container {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    overflow-x: auto; /* Zorgt voor scrollen op mobiel */
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table th, .dashboard-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-table thead th {
    font-size: 0.9em;
    text-transform: uppercase;
    color: var(--text-color-secondary);
}

.dashboard-table tbody tr:last-child td {
    border-bottom: none;
}

.status-live {
    color: #28a745; /* Groen */
    font-weight: bold;
}

.status-draft {
    color: #ffc107; /* Geel */
    font-weight: bold;
}

.action-button {
    display: inline-block;
    font-size: 0.9em;
    padding: 5px 10px;
    margin-right: 5px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    font-weight: 500;
}

.action-button.edit {
    background-color: var(--secondary-accent);
}

.action-button.delete {
    background-color: #dc3545; /* Rood */
}

/* --- STYLING FOR PUBLISH FORM --- */

.publish-form {
    background-color: var(--surface-color);
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color-secondary);
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    box-sizing: border-box; /* Zorgt dat padding de breedte niet beïnvloedt */
}

.form-group textarea {
    resize: vertical; /* Sta verticaal schalen toe */
}

.code-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 30px;
}

/* --- STYLING FOR ADMIN PAGE --- */
.action-button.approve {
    background-color: #28a745; /* Groen */
}
.widget-count {
    font-weight: 600;
    color: var(--text-color-secondary);
}

/* --- STYLING FOR ADMIN WIDGET VIEW PAGE --- */
.widget-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.review-actions {
    display: flex;
    gap: 10px;
}

.review-actions .action-button {
    font-size: 1em;
    padding: 10px 15px;
}

.code-review-grid {
    margin-top: 20px;
}

.code-display {
    width: 100%;
    height: 300px;
    padding: 12px;
    background-color: #000;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #00FF00; /* Green text for code */
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    resize: vertical;
    box-sizing: border-box;
}

/* --- STYLING FOR HOMEPAGE SECTIONS --- */
.section-divider {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

/* --- STYLING FOR CUSTOM FILE UPLOAD BUTTON --- */

.file-upload-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Verberg de originele, lelijke input knop */
.file-upload-wrapper input[type="file"] {
    opacity: 0;
    position: absolute;
    z-index: -1;
    width: 0.1px;
    height: 0.1px;
}

/* De label wordt onze nieuwe, mooie knop */
.file-upload-wrapper .button {
    cursor: pointer; /* Maak duidelijk dat het klikbaar is */
}

#file-name-display {
    color: var(--text-color-secondary);
    font-style: italic;
}

/* --- Widget Preview Image Scaling --- */
.widget-card .widget-preview {
    width: 100%; /* Zorg dat de preview de volledige breedte van de kaart vult */
    height: 180px; /* Vaste hoogte voor consistente galerij weergave */
    overflow: hidden; /* Verberg alles wat buiten de box valt */
    position: relative; /* Nodig voor positionering van de afbeelding */
    background-color: #1a1a1a; /* Een donkere achtergrond voor als er geen afbeelding is */
    display: flex;
    justify-content: center;
    align-items: center;
}

.widget-card .widget-preview img {
    width: 100%; /* Maak de afbeelding 100% breed van de container */
    height: 100%; /* Maak de afbeelding 100% hoog van de container */
    object-fit: cover; /* BELANGRIJK: Zorgt ervoor dat de afbeelding de container vult zonder te vervormen, en snijdt eventueel bij */
    display: block; /* Verwijder eventuele extra ruimte onder de afbeelding */
}

/* --- Widget Detail Page Image Scaling --- */
.widget-preview-large {
    width: 100%;
    height: 450px; /* Vaste hoogte voor de preview */
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.widget-preview-large img {
    width: 100%;
    height: 100%;
    /* BELANGRIJK: 'cover' vult de ruimte en snijdt de rest bij, net als op de homepage */
    object-fit: cover; 
}

/* --- STYLING FOR ADMIN PREVIEW SECTION --- */
.admin-preview-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: flex-start;
    margin-top: 20px;
    margin-bottom: 30px;
}

/* Responsive aanpassing voor de admin preview */
@media (max-width: 900px) {
    .admin-preview-section {
        grid-template-columns: 1fr;
    }
}

/* --- Spacing for the 'Back to Gallery' Button --- */
.back-button-wrapper {
    margin-top: 30px;
    margin-bottom: 30px;
}