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

:root {
    /* Bouwend Nederland Kleuren */
    --bnl-navy: #003366;        /* Donkerblauw - Bouwend */
    --bnl-red: #B91C1C;         /* Rood - Nederland */
    --bnl-green: #16A085;       /* Groen - accent */
    --bnl-light-blue: #E6F3FF;  /* Licht blauw voor achtergronden */
    --bnl-gray: #64748B;        /* Grijs voor tekst */
    --bnl-light-gray: #F1F5F9;  /* Licht grijs */
    --bnl-white: #FFFFFF;       /* Wit */
    
    /* Gradiënten */
    --bnl-gradient-primary: linear-gradient(135deg, var(--bnl-navy) 0%, var(--bnl-red) 100%);
    --bnl-gradient-secondary: linear-gradient(135deg, var(--bnl-green) 0%, var(--bnl-navy) 100%);
    --bnl-gradient-light: linear-gradient(135deg, var(--bnl-light-blue) 0%, var(--bnl-white) 100%);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--bnl-navy);
    background: var(--bnl-gradient-light);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bnl-gradient-primary);
    opacity: 0.05;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto;
    gap: 2rem;
    min-height: 100vh;
}

/* Header */
.header {
    grid-column: 1 / -1;
    text-align: center;
    background: rgba(255, 255, 255, 0.98);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 51, 102, 0.15);
    border: 1px solid rgba(185, 28, 28, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.bnl-logo {
    flex-shrink: 0;
}

.bnl-logo img {
    height: 80px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 51, 102, 0.1));
}

.logo-text {
    text-align: left;
}

.logo-text h2 {
    font-size: 2.2rem;
    color: var(--bnl-green);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--bnl-gray);
    font-weight: 400;
    line-height: 1.4;
}

/* Responsive logo */
@media (max-width: 768px) {
    .logo {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo-text {
        text-align: center;
    }
    
    .bnl-logo img {
        height: 60px;
        max-width: 250px;
    }
    
    .logo-text h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .bnl-logo img {
        height: 50px;
        max-width: 200px;
    }
    
    .logo-text h2 {
        font-size: 1.5rem;
    }
}

/* Main content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-section, .output-section {
    background: rgba(255, 255, 255, 0.98);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 51, 102, 0.1);
    border: 1px solid rgba(22, 160, 133, 0.1);
}

.input-section h2, .output-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--bnl-navy);
    margin-bottom: 1rem;
    position: relative;
}

.input-section h2::after, .output-section h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--bnl-gradient-primary);
    border-radius: 2px;
}

.description {
    color: var(--bnl-gray);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Input Tabs */
.input-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--bnl-light-gray);
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--bnl-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    position: relative;
}

.tab-btn:hover {
    color: var(--bnl-navy);
    background: var(--bnl-light-blue);
}

.tab-btn.active {
    color: var(--bnl-navy);
    border-bottom-color: var(--bnl-green);
    font-weight: 600;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Textarea styling */
#rawText, #fetchedText {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 200px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#rawText:focus, #fetchedText:focus {
    outline: none;
    border-color: var(--bnl-green);
    box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.1);
}

#fetchedText {
    background-color: #f8f9fa;
    min-height: 150px;
}

/* URL Input Container */
.url-input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.url-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.url-input:focus {
    outline: none;
    border-color: var(--bnl-green);
    box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.1);
}

.fetch-btn {
    background: var(--bnl-gradient-secondary);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 56px;
}

.fetch-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(22, 160, 133, 0.3);
}

.fetch-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.help-btn {
    background: var(--bnl-gray);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 56px;
    white-space: nowrap;
}

.help-btn:hover {
    background: #475569;
    transform: translateY(-1px);
}

/* Manual Instructions */
.manual-instructions {
    background: var(--bnl-light-blue);
    border: 2px solid var(--bnl-green);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.manual-instructions h4 {
    color: var(--bnl-navy);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.manual-instructions ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.manual-instructions li {
    color: var(--bnl-navy);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.switch-tab-btn {
    background: var(--bnl-gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.switch-tab-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.quick-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 200px;
}

.quick-btn.primary {
    background: var(--bnl-gradient-primary);
    color: white;
}

.quick-btn.secondary {
    background: var(--bnl-gradient-secondary);
    color: white;
}

.quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.3);
}

/* URL Status */
.url-status {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
}

.url-status.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
    display: block;
}

.url-status.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
    display: block;
}

.url-status.loading {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #60a5fa;
    display: block;
}

/* API Configuration */
.api-config {
    background: var(--bnl-light-blue);
    border: 2px solid var(--bnl-green);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.api-config h3 {
    color: var(--bnl-navy);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.api-input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.api-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.api-input:focus {
    outline: none;
    border-color: var(--bnl-green);
    box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.1);
}

.test-api-btn {
    background: var(--bnl-gradient-secondary);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 56px;
}

.test-api-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(22, 160, 133, 0.3);
}

.test-api-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.api-status {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: none;
}

.api-status.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #34d399;
    display: block;
}

.api-status.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
    display: block;
}

.api-status.loading {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #60a5fa;
    display: block;
}

.api-info {
    color: var(--bnl-gray);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.api-info a {
    color: var(--bnl-green);
    text-decoration: none;
    font-weight: 500;
}

.api-info a:hover {
    text-decoration: underline;
}

/* Input controls */
.input-controls {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--bnl-gray);
    transition: color 0.3s ease;
}

.checkbox-container:hover {
    color: var(--bnl-navy);
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d9e0;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background-color: var(--bnl-green);
    border-color: var(--bnl-green);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 14px;
    top: -2px;
    left: 3px;
}

/* Input buttons */
.input-buttons {
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    align-items: stretch;
    margin-top: 1.2rem;
}

/* Generate button */
.generate-btn {
    min-width: 220px;
    width: 100%;
    max-width: 420px;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 1.1rem 0;
    border-radius: 12px;
    margin: 0;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.generate-btn.primary {
    background: var(--bnl-gradient-primary);
}

.generate-btn.secondary {
    background: var(--bnl-gradient-secondary);
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.3);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none !important;
}

/* Article preview */
.article-preview {
    background-color: white;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    width: 100%;
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.08);
}

.article-content {
    width: 100%;
    word-wrap: break-word;
}

.article-content h1,
.article-content h2,
.article-content p {
    max-width: 100%;
    word-wrap: break-word;
}

.article-content h1 {
    font-size: 1.8em;
    color: var(--bnl-blue);
    margin-top: 0;
}

.article-content h2 {
    font-size: 1.4em;
    color: var(--bnl-blue);
    margin-top: 1.5em;
}

.article-preview.has-content {
    border-color: var(--bnl-green);
    background: white;
    box-shadow: 0 4px 20px rgba(22, 160, 133, 0.1);
}

.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6c757d;
    font-style: italic;
}

.article-content {
    line-height: 1.8;
}

.article-content h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--bnl-gradient-primary);
    border-radius: 2px;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--bnl-green);
    border-radius: 2px;
}

.article-content p {
    margin-bottom: 1.2rem;
    color: var(--bnl-navy);
    opacity: 0.8;
}

/* Action buttons */
.article-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn {
    background: var(--bnl-green);
    color: white;
}

.copy-btn:hover {
    background: #138B75;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(22, 160, 133, 0.3);
}

.download-btn {
    background: var(--bnl-navy);
    color: white;
}

.download-btn:hover {
    background: #002244;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
}

.edit-btn {
    background: var(--bnl-red);
    color: white;
}

.edit-btn:hover {
    background: #A11515;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.3);
}

.linkedin-btn {
    background: #0077B5;
    color: white;
}

.linkedin-btn:hover {
    background: #005885;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 119, 181, 0.3);
}

.back-btn {
    background: var(--bnl-gray);
    color: white;
}

.back-btn:hover {
    background: #475569;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

/* LinkedIn Section */
.linkedin-section {
    background: rgba(255, 255, 255, 0.98);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 51, 102, 0.1);
    border: 1px solid rgba(0, 119, 181, 0.2);
}

.linkedin-preview {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.linkedin-header {
    padding: 1rem;
    border-bottom: 1px solid #e1e5e9;
}

.linkedin-profile {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.profile-pic {
    width: 48px;
    height: 48px;
    background: var(--bnl-gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.profile-info h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #000;
}

.profile-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
}

.post-time {
    margin-top: 0.25rem !important;
}

.linkedin-content {
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #000;
}

.linkedin-content p {
    margin-bottom: 0.8rem;
}

.linkedin-content .hook {
    font-weight: 600;
    color: var(--bnl-navy);
}

.linkedin-content .cta {
    color: var(--bnl-red);
    font-weight: 500;
}

.linkedin-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Guidelines sidebar */
.guidelines {
    background: rgba(255,255,255,0.98);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 51, 102, 0.10);
    padding: 1.2rem 1.2rem 1rem 1.2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(185, 28, 28, 0.08);
    z-index: 10;
    max-width: 420px;
    width: 100%;
    height: auto;
    min-height: unset;
}

.content-rules {
    top: 28rem; /* Zorg dat het netjes onder het eerste blok blijft staan */
}

.content-rules h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bnl-navy);
    margin-bottom: 1.2rem;
    margin-top: 0.5rem;
}

.content-rules .guideline-item {
    margin-bottom: 1.2rem;
}

.content-rules ul {
    margin-left: 1.2rem;
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
}

/* Modal */
.edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bnl-navy);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.modal-body {
    padding: 2rem;
}

.edit-field {
    margin-bottom: 1.5rem;
}

.edit-field label {
    display: block;
    font-weight: 600;
    color: var(--bnl-navy);
    margin-bottom: 0.5rem;
}

.edit-field input,
.edit-field textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.edit-field input:focus,
.edit-field textarea:focus {
    outline: none;
    border-color: var(--bnl-green);
    box-shadow: 0 0 0 2px rgba(22, 160, 133, 0.1);
}

.modal-footer {
    padding: 1rem 2rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.save-btn, .cancel-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn {
    background: var(--bnl-gradient-primary);
    color: white;
}

.save-btn:hover {
    background: var(--bnl-gradient-secondary);
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
}

.cancel-btn {
    background: #e9ecef;
    color: #495057;
}

.cancel-btn:hover {
    background: #dee2e6;
}

/* Responsive design */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .guidelines {
        position: static;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        gap: 1rem;
    }
    
    .header {
        padding: 1.5rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .input-section, .output-section, .guidelines, .linkedin-section {
        padding: 1.5rem;
    }
    
    .article-actions, .linkedin-actions {
        flex-direction: column;
    }
    
    .action-btn {
        justify-content: center;
    }
    
    .input-buttons {
        flex-direction: column;
    }
    
    .generate-btn {
        min-width: auto;
    }
    
    .url-input-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .help-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .manual-instructions {
        padding: 1rem;
    }
    
    .manual-instructions h4 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .input-section, .output-section, .guidelines {
        padding: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* Artikel Instellingen Sliders */
.advanced-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 0.75rem 1.2rem;
    margin-bottom: 0;
    border-radius: 12px 12px 0 0;
    border-bottom: 1.5px solid #e1e5e9;
    position: relative;
    transition: background 0.2s, color 0.2s;
}

.advanced-toggle .toggle-arrow {
    margin-left: auto;
    font-size: 1.2em;
    transition: transform 0.3s;
}

.advanced-toggle.open .toggle-arrow {
    transform: rotate(90deg);
}

.article-settings {
    border-radius: 0 0 12px 12px;
    margin-top: 0;
}

.generate-btn {
    min-width: 220px;
    width: 100%;
    max-width: 420px;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 1.1rem 0;
    border-radius: 12px;
    margin: 0;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.generate-btn.primary {
    background: var(--bnl-gradient-primary);
}

.generate-btn.secondary {
    background: var(--bnl-gradient-secondary);
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.3);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none !important;
}

/* Article preview */
.article-preview {
    background-color: white;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    width: 100%;
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.08);
}

.article-content {
    width: 100%;
    word-wrap: break-word;
}

.article-content h1,
.article-content h2,
.article-content p {
    max-width: 100%;
    word-wrap: break-word;
}

.article-content h1 {
    font-size: 1.8em;
    color: var(--bnl-blue);
    margin-top: 0;
}

.article-content h2 {
    font-size: 1.4em;
    color: var(--bnl-blue);
    margin-top: 1.5em;
}

.article-preview.has-content {
    border-color: var(--bnl-green);
    background: white;
    box-shadow: 0 4px 20px rgba(22, 160, 133, 0.1);
}

.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6c757d;
    font-style: italic;
}

.article-content {
    line-height: 1.8;
}

.article-content h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--bnl-gradient-primary);
    border-radius: 2px;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--bnl-green);
    border-radius: 2px;
}

.article-content p {
    margin-bottom: 1.2rem;
    color: var(--bnl-navy);
    opacity: 0.8;
}

/* Action buttons */
.article-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn {
    background: var(--bnl-green);
    color: white;
}

.copy-btn:hover {
    background: #138B75;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(22, 160, 133, 0.3);
}

.download-btn {
    background: var(--bnl-navy);
    color: white;
}

.download-btn:hover {
    background: #002244;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
}

.edit-btn {
    background: var(--bnl-red);
    color: white;
}

.edit-btn:hover {
    background: #A11515;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.3);
}

.linkedin-btn {
    background: #0077B5;
    color: white;
}

.linkedin-btn:hover {
    background: #005885;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 119, 181, 0.3);
}

.back-btn {
    background: var(--bnl-gray);
    color: white;
}

.back-btn:hover {
    background: #475569;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

/* Zwevende knop */
.floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bnl-gradient-primary);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.floating-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.floating-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.settings-grid label { font-size: 0.93rem; color: var(--bnl-navy); background: var(--bnl-light-blue); border-radius: 10px; padding: 0.7rem 1rem; margin-bottom: 0.7rem; border: 1px solid var(--bnl-light-gray); display: block; }
.settings-grid input[type="range"] { width: 100%; margin-top: 0.3rem; }
.settings-tab-content { font-size: 0.97rem; }
.settings-menu { font-size: 0.95rem; background: #fff; border-radius: 18px; box-shadow: 0 8px 32px rgba(0, 51, 102, 0.15); padding: 2rem 2.5rem; max-width: 600px; margin: 3rem auto; border: 1.5px solid #e1e5e9; }
#openSettingsMenu { background: var(--bnl-light-blue); color: var(--bnl-navy); border: 1px solid var(--bnl-light-gray); border-radius: 8px; font-size: 0.97rem; padding: 0.35rem 0.9rem; margin-bottom: 0.7rem; cursor: pointer; transition: background 0.2s, color 0.2s; box-shadow: none; font-weight: 500; outline: none; display: inline-block; } #openSettingsMenu:hover, #openSettingsMenu:focus { background: var(--bnl-light-gray); color: var(--bnl-red); border-color: var(--bnl-red); }
#settingsMenuPanel { margin: 0.5rem 0 1.2rem 0; transition: max-height 0.3s, opacity 0.3s; overflow: hidden; max-height: 1200px; opacity: 1; } #settingsMenuPanel.collapsed { max-height: 0; opacity: 0; pointer-events: none; }
.settings-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; } .settings-tab { background: var(--bnl-light-blue); color: var(--bnl-navy); border: 1px solid var(--bnl-light-gray); border-radius: 8px 8px 0 0; font-size: 0.95rem; padding: 0.4rem 1.2rem; cursor: pointer; font-weight: 500; transition: background 0.2s, color 0.2s; } .settings-tab.active, .settings-tab:focus { background: var(--bnl-navy); color: #fff; border-bottom: 2px solid var(--bnl-red); outline: none; } .settings-tab:not(.active):hover { background: var(--bnl-light-gray); color: var(--bnl-red); } .settings-tab-content { display: none; } .settings-tab-content.active { display: block; } .compact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1.2rem; } @media (max-width: 700px) { .compact-grid { grid-template-columns: 1fr; } } .compact-setting { font-size: 0.92rem; padding: 0.5rem 0.7rem; background: var(--bnl-light-blue); border-radius: 8px; border: 1px solid var(--bnl-light-gray); margin-bottom: 0; } .compact-setting input[type="range"] { margin-top: 0.2rem; } .compact-setting .slider-desc { font-size: 0.85em; color: var(--bnl-gray); }
.progress-container { width: 100%; margin-bottom: 1rem; background: #f1f5f9; border-radius: 8px; height: 28px; position: relative; box-shadow: 0 2px 8px rgba(0,51,102,0.07); display: flex; align-items: center; overflow: hidden; } .progress-bar { height: 100%; background: linear-gradient(135deg, #003366 0%, #B91C1C 100%); border-radius: 8px 0 0 8px; width: 0%; transition: width 0.3s; } .progress-text { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #003366; font-size: 0.98rem; font-weight: 600; z-index: 2; pointer-events: none; }

.content-type-rules-block {
  background: rgba(255,255,255,0.98);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 51, 102, 0.10);
  border: 1.5px solid #e1e5e9;
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
  padding: 2rem 2.5rem;
  max-width: 420px;
  width: 100%;
  display: block;
}

/* Add extra spacing below the article actions */
#articleActions {
  margin-bottom: 2.5rem;
}

/* Make sure the guidelines and rules block are visually grouped */
.guidelines, .content-type-rules-block {
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 20px rgba(0, 51, 102, 0.07);
}

/* Add a little more space between the rules block and the next section */
.content-type-rules-block + * {
  margin-top: 2rem;
}

/* Version number styling */
.version-number {
    font-size: 0.8rem;
    color: var(--bnl-gray);
    opacity: 0.7;
    margin-left: 1rem;
    font-weight: 400;
}
