body {
      margin: 0;
      font-family: Arial, sans-serif;
      background: #0f172a;
      color: white;
    }

    .topbar {
      padding: 15px;
      background: #111827;
      font-size: 18px;
      font-weight: bold;
    }

    .container {
      display: flex;
      height: calc(100vh - 50px);
    }

    .left {
      width: 35%;
      padding: 15px;
      background: #1e293b;
      overflow-y: auto;
    }

    .right {
      width: 65%;
      padding: 15px;
      overflow-y: auto;
    }

    .card {
      background: #111827;
      padding: 10px;
      margin-bottom: 10px;
      border-radius: 8px;
    }

    input, select {
      width: 100%;
      padding: 8px;
      margin-top: 5px;
      margin-bottom: 10px;
      border-radius: 5px;
      border: none;
    }

    button {
      padding: 10px;
      width: 100%;
      background: #3b82f6;
      border: none;
      color: white;
      border-radius: 6px;
      cursor: pointer;
      margin-top: 5px;
    }

    button:hover {
      background: #2563eb;
    }

    pre {
      background: #0b1220;
      padding: 15px;
      border-radius: 10px;
      overflow-x: auto;
    }

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

    .row > div {
      flex: 1;
    }

    .field-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
}

.modal-content {
  background: white;
  padding: 20px;
  width: 400px;
  margin: 100px auto;
  border-radius: 10px;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.hidden {
  display: none !important;
}

body {
  margin: 0;
  font-family: system-ui;
  background: #0f172a;
  color: white;
}

.app {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 20%;
  padding: 20px;
  background: #111827;
  border-right: 1px solid #1f2937;
}

.main {
  flex: 1;
  padding: 20px;
}

.field-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.field-row input {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: none;
}

.field-row button {
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: #2563eb;
  color: white;
  cursor: pointer;
}

.add-btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: #16a34a;
  border: none;
  border-radius: 6px;
}

.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.toolbar button {
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: #374151;
  color: white;
  cursor: pointer;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1rem;
}

.tabs button {
  margin-right: 10px;
  padding: 6px 10px;
  background: #1f2937;
  border: none;
  color: white;
  border-radius: 5px;
}

.view {
  background: #020617;
  padding: 15px;
  border-radius: 8px;
  max-height: 70vh;
  overflow: auto;
}

.hidden {
  display: none;
}

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

td, th {
  border: 1px solid #1f2937;
  padding: 6px;
}

/*
 * DARK THEME INTEGRATION
 */

/* 1. The parent container that holds all rows */
#fields {
    display: flex;
    flex-direction: column;
    gap: 8px; /* tight, neat spacing */
    width: 100%; /* fill the container */
    margin-bottom: 12px; /* space before the '+ Add' button */
}

/* 2. Style for each generated row */
.field-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    background-color: transparent; /* match the dark background */
    border-radius: 4px;
    box-sizing: border-box;
}

/* 3. Style for the input field: subtle border, light text */
.field-name-input {
    flex-grow: 1; /* stretches to fill space */
    background-color: transparent;
    border: 1px solid #555; /* subtle gray border */
    border-radius: 4px;
    padding: 8px 12px;
    color: #fff; /* light text */
    font-size: 14px;
    transition: border-color 0.2s;
}

.field-name-input::placeholder {
    color: #888; /* dimmed placeholder text */
}

.field-name-input:focus {
    outline: none;
    border-color: #4ade80; /* green focus ring to match the button */
    box-shadow: 0 0 0 1px #4ade80;
}

/* 4. Base button styling (for Type and Remove) */
.field-row button {
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s;
    background-color: #2d3748; /* dark gray button background */
    color: #fff;
    border: 1px solid transparent;
}

/* 5. Specific 'Type' button styling */
.btn-type-selector {
    padding: 8px 16px;
    width: auto; /* fits the text */
}

.btn-type-selector:hover {
    background-color: #4a5568;
}

/* 6. Text that shows the chosen type */
.type-label {
    color: #a0aec0; /* subtle light text */
    font-size: 13px;
    margin-right: auto; /* pushes 'Remove' to the far right */
    min-width: 60px;
}

/* 7. Specific 'Remove' (X) button styling */
.btn-remove-field {
    color: #ef4444; /* bright red for 'X' */
    background: transparent;
    border: none;
    font-size: 18px; /* make 'X' larger */
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-remove-field:hover {
    color: #b91c1c; /* dark red on hover */
    background: transparent;
}

.modal-content.dark-modal {
    background-color: #1a202c; /* Deep dark blue/gray */
    color: white;
    border: 1px solid #2d3748;
    border-radius: 12px;
    width: 90%; 
    max-width: 850px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
}

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

.type-section h3 {
    color: #a0aec0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 15px 0 8px 0;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.type-grid button {
    background: #2d3748;
    border: 1px solid #4a5568;
    color: #e2e8f0;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.type-grid button:hover {
    background: #4a5568;
    border-color: #10b981; /* Green highlight like your "Add Field" button */
    color: #fff;
}

/* Scrollbar styling for the modal body */
.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 10px;
}

.dark-modal {
    background: #1a1a1a;
    color: #e0e0e0;
    border-radius: 12px;
    border: 1px solid #333;
    max-width: 600px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

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

/* Ensure the container isn't hiding the search box */
.modal-search {
    padding: 15px 20px;
    display: block !important; /* Forces visibility */
    background: #222; /* Slightly different from modal body for contrast */
    position: sticky; /* Keeps it at the top while scrolling types */
    top: 0;
    z-index: 10;
}

.modal-search input {
    width: 100%;
    padding: 12px;
    background-color: #333; /* Darker grey */
    border: 1px solid #444;
    border-radius: 8px;
    color: #ffffff; /* Explicitly white text */
    font-size: 16px;
    outline: none;
}

/* Make sure the placeholder is visible too */
.modal-search input::placeholder {
    color: #888;
}

.type-section {
    padding: 15px 20px;
}

.type-section header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #888;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.type-btn {
    background: #2d2d2d;
    border: 1px solid transparent;
    color: #ccc;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.type-btn:hover {
    background: #3d3d3d;
    border-color: #555;
    color: #fff;
    transform: translateY(-1px);
}

/* Main Footer Wrapper */
.app-footer {
    background-color: #1a202c; /* Matches your sidebar/input background */
    color: #a0aec0;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 1px solid #2d3748;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* Developer Links Section */
.footer-links {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #63b3ed; /* Developer blue */
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Privacy & Tech Info */
.disclaimer {
    font-size: 12px;
    color: #718096;
    max-width: 600px;
    margin: 20px auto 0;
    line-height: 1.6;
}

/* Social/GitHub Branding */
.footer-inner p a {
    color: #edf2f7;
    text-decoration: none;
    font-weight: 600;
}

/* SEO Content Section (Optional: for the text block added previously) */
.content-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    color: #cbd5e0;
    line-height: 1.8;
}

.seo-text h2, .seo-text h3 {
    color: #fff;
    margin-top: 30px;
}

.seo-text ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.seo-text li {
    margin-bottom: 10px;
}

.seo-text strong {
    color: #63b3ed;
}

/* Responsive Tweak */
@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}