:root {
    --bg: #f7f8fa;
    --card: #ffffff;
    --border: #e5e7eb;
    --primary: #1f2937;
    --accent: #4f46e5;
    --accent-light: #eef2ff;
    --text: #374151;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(0,0,0,0.06);
  }
  
  .credit-box.disabled {
    position: relative;
    opacity: 0.4;
    pointer-events: none; /* maakt alles binnenin onklikbaar */
}

.coming-soon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.9);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #4a6cf7;
    border: 1px solid #cdd4ff;
    z-index: 10;
    pointer-events: none;
}

  
  .thankyou-box {
    background: #e8f8ff;
    border: 1px solid #b6e6ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.credit-purchase-box {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-top: 20px;
}

.saas-button {
    background: #4a6cf7;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    transition: 0.2s;
}

.saas-button:hover {
    background: #3a5be0;
}

  .error-message {
    background: #ffe5e5;
    color: #b30000;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 400px;
    font-weight: 600;
    border: 1px solid #ffb3b3;
    text-align: center;
}

  #errorBox {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #c0392b;
    color: #fff;
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 15px;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .25s ease, transform .25s ease;
    z-index: 999999;
}

#errorBox.visible {
    opacity: 1;
    transform: translateY(0);
}

.error-close {
    margin-left: 12px;
    cursor: pointer;
    font-weight: bold;
    float: right;
    font-size: 18px;
    line-height: 14px;
}

  
  
  .credit-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.credit-popup-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    animation: popupFadeIn 0.25s ease-out;
}

.credit-popup-box h2 {
    margin-top: 0;
    margin-bottom: 15px;
}

.credits-chip {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #eef2ff;
    color: #3b4cca;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid #cdd4ff;
    font-size: 14px;
    z-index: 10000;
}

.credit-box {
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    margin: 20px auto;
    max-width: 420px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.credit-box h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.credit-row {
    display: flex;
    gap: 10px;
}

.credit-select {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 15px;
}

.credit-btn {
    background: #4a6cf7;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    transition: 0.2s;
}

.credit-btn:hover {
    background: #3a5be0;
}


@keyframes popupFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}


 .login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999999; /* heel hoog */
}

.login-box {
  background: #222;
  padding: 30px;
  border-radius: 12px;
  width: 350px;
  text-align: center;
  color: #fff;
}

.login-box input {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border-radius: 6px;
  border: none;
}

.login-box button.primary {
  width: 100%;
  padding: 12px;
  margin-top: 15px;
  background: #4CAF50;
  border: none;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.close-overlay {
  margin-top: 15px;
  background: transparent;
  border: 1px solid #aaa;
  padding: 10px 15px;
  border-radius: 6px;
  color: #ccc;
  cursor: pointer;
}

.login-message {
  margin-top: 10px;
  color: #4CAF50;
  font-size: 14px;
}



  header {
    background: var(--card);
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .header-inner {
    max-width: 1200px;
    margin: 0 auto;
  }

  .brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
  }

  .subtitle {
    font-size: 0.9rem;
    color: #6b7280;
  }

  main {
    max-width: 1200px;
    margin: 32px auto 40px;
    padding: 0 20px;
  }

  .page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
  }
  
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-box {
    background: #fff;
    padding: 30px;
    border-radius: 14px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    animation: popIn 0.25s ease-out;
}

@keyframes popIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
    margin-top: 20px;
    background: #4a6cf7;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
}

.modal-close-btn:hover {
    background: #3a5be0;
}


  /* Dark mode toggle */
  .dark-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  .dark-mode {
    --bg: #0f0f11;
    --card: #1a1b1e;
    --border: #2a2b2e;
    --primary: #ffffff;
    --text: #d1d5db;
    --accent-light: #2d2f36;
  }

  /* Instructions */
  .instructions-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    margin-bottom: 28px;
  }

  .instruction-item {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .instruction-item:last-child {
    margin-bottom: 0;
  }

  /* Layout */
  .layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
  }

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

  /* Upload */
  .upload-box {
    background: var(--card);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
  }

  .upload-box.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
  }

  .upload-controls {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .progress-wrapper {
    flex: 1;
  }

  .progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
  }

  .progress-bar-inner {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.2s ease;
  }

  .progress-text {
    margin-top: 4px;
    font-size: 0.8rem;
    color: #6b7280;
  }

  .btn-secondary {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f9fafb;
    font-size: 0.85rem;
    cursor: pointer;
    color: #4b5563;
  }

  .btn-secondary:hover {
    background: #eef2ff;
  }

  /* Badges */
  .badge-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .badge-used {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
  }

  .badge-extra {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e5e7eb;
    color: #374151;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
  }

  .warning-box {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff8db;
    border: 1px solid #facc15;
    color: #92400e;
    font-size: 0.85rem;
    display: none;
  }

  /* Preview */
  .preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 18px;
  }

  .preview-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: move;
  }

  .preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
  }

  .preview-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
  }

  .preview-item:hover .preview-overlay {
    opacity: 1;
  }

  .preview-remove {
    border: none;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border-radius: 999px;
    width: 24px;
    height: 24px;
    font-size: 16px;
    cursor: pointer;
  }

  .photo-score {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
  }

  /* Settings */
  .settings {
    background: var(--card);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
  }

  .settings h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: var(--primary);
  }

  .settings-group {
    margin-bottom: 18px;
  }

  .settings label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
  }

  input[type="number"], textarea {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #f9fafb;
    font-size: 0.95rem;
  }

  input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
  }

  .slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #9ca3af;
  }

  button.primary {
    width: 100%;
    margin-top: 18px;
    padding: 12px;
    border: none;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
  }

  button.primary:hover {
    background: #4338ca;
  }

  /* Custom select */
  .custom-select {
    position: relative;
    user-select: none;
  }

  .custom-select-trigger {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
  }

  .custom-select-trigger-left {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .custom-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 20;
    max-height: 220px;
    overflow-y: auto;
    display: none;
  }

  .custom-option {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
  }

  .custom-option:hover {
    background: var(--accent-light);
  }

  .custom-select.open .custom-options {
    display: block;
  }

  .purpose-hint {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .purpose-hint-icon {
    font-size: 1rem;
  }

  /* Output + skeleton */
  .output {
    margin-top: 40px;
    background: var(--card);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
  }

  .output h2 {
    margin-top: 0;
  }

  .output h3 {
    margin-bottom: 6px;
    margin-top: 16px;
    font-size: 1rem;
  }

  #resultShort, #resultMedium, #resultLong {
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  #resultShort, #resultMedium, #resultLong {
    min-height: 20px;
  }

  .skeleton {
    margin-top: 10px;
  }

  .skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, #e5e7eb, #f3f4f6, #e5e7eb);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
    margin-bottom: 10px;
  }

  .skeleton-line.short {
    width: 60%;
  }

.output-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.copy-btn {
  background: #3b82f6; /* mooi blauw */
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.copy-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.copy-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
                 "Segoe UI Emoji", "Segoe UI Symbol";
}
.copy-icon {
  font-size: 18px;
}


  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  /* Floating toolbar */
  .floating-toolbar {
    position: fixed;
    right: 16px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 999;
  }

  .floating-toolbar button {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  }

  /* Mobile tweaks */
  @media (max-width: 600px) {
    .instructions-box {
      font-size: 0.85rem;
      padding: 14px;
    }

    .layout {
      gap: 18px;
    }

    .preview-item img {
      height: 80px;
    }

    .dark-toggle {
      top: 10px;
      right: 10px;
    }
  }
  
  .instructions-v12 {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  margin-bottom: 28px;
}

.instructions-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 24px;
}

.inst {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
}

.inst .icon {
  font-size: 1.2rem;
  line-height: 1;
  margin-top: 2px;
}

.inst strong {
  color: var(--primary);
  font-size: 0.88rem;
}




.inst span {
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .instructions-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .instructions-grid-3 {
    grid-template-columns: 1fr;
  }
}
#sortByStars {
  white-space: nowrap;
}

    /* De "Strakke" schil over je originele structuur */
    :root {
        --primary: #4a90e2;
        --bg: #f8fafc;
        --border: #e2e8f0;
        --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    body {
        font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
        background-color: var(--bg);
        color: #334155;
        margin: 0;
    }

    header {
        background: white;
        border-bottom: 1px solid var(--border);
        padding: 15px 30px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: sticky; top: 0; z-index: 100;
    }

    .brand { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
    
    .credits-chip {
        position: fixed; top: 15px; right: 20px;
        background: #1e293b; color: white;
        padding: 8px 16px; border-radius: 20px;
        font-weight: 600; z-index: 1001;
        box-shadow: var(--card-shadow);
    }

    main { max-width: 1200px; margin: 20px auto; padding: 0 20px; }

    /* Containers */
    .credit-box, .instructions-v12, .url-import-box, .upload-box, .settings, .output {
        background: white;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: var(--card-shadow);
    }

    .layout {
        display: grid;
        grid-template-columns: 1fr 380px;
        gap: 20px;
    }

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

    /* URL Import Styling */
    .url-import-box { background: #f1f5f9; border-color: #cbd5e1; }
    .url-import-row { display: flex; gap: 10px; margin-top: 10px; }
    .url-import-row input { 
        flex: 1; padding: 10px; border-radius: 6px; border: 1px solid #cbd5e1; 
    }

    /* Knoppen */
    button.primary {
        background: var(--primary); color: white; border: none;
        padding: 12px; border-radius: 6px; font-weight: 600; cursor: pointer; width: 100%;
    }

    .btn-secondary {
        background: white; border: 1px solid var(--border);
        padding: 8px 16px; border-radius: 6px; cursor: pointer;
    }

    /* Grid voor instructies */
    .instructions-grid-3 {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    .inst { display: flex; gap: 10px; align-items: start; font-size: 0.9rem; }
    .inst .icon { font-size: 1.2rem; }

    /* Slider labels */
    .slider-labels { display: flex; justify-content: space-between; font-size: 12px; color: #64748b; margin-top: 5px; }

    @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
