body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f4f6f8;
            color: #333;
            margin: auto;
        }
        h1, h2, h3 { color: #222; margin-bottom: 10px; }
        .container {
            background: #fff;
            border-radius: 8px;
            padding: 20px 25px;
            margin-bottom: 30px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }

        /* Form elements */
        .form-group,
        .url-input,
        .query-input { margin-bottom: 20px; }
        input[type="url"],
        input[type="text"],
        textarea {
            width: 100%;
            padding: 10px 12px;
            font-size: 14px;
            border: 1px solid #ccc;
            border-radius: 6px;
            box-sizing: border-box;
        }
        textarea { resize: vertical; min-height: 100px; }
        button {
            background-color: #111;
            color: #fff;
            padding: 10px 16px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 500;
            transition: background-color 0.3s;
        }
        button:hover { background-color: #444; }
        button:disabled {
            background-color: #999;
            cursor: not-allowed;
        }

        /* URL inputs */
        .url-input {
            display: flex;
            gap: 10px;
        }
        .remove-url { margin-left: 10px; }

        /* Progress bar */
        .progress-bar {
            background-color: #e0e0e0;
            height: 20px;
            border-radius: 6px;
            overflow: hidden;
            margin-top: 10px;
        }
        .progress {
            height: 100%;
            background-color: #111;
            width: 0%;
            transition: width 0.5s;
        }
        .progress-text { margin-top: 8px; font-size: 14px; color: #555; }

        /* Result container */
        .result-data {
            background-color: #fff;
            padding: 15px 20px;
            border-radius: 6px;
            border: 1px solid #ddd;
            font-size: 14px;
            line-height: 1.5;
        }

        /* AI response */
        .ai-response {
            background-color: #fdfdfd;
            border: 1px solid #ddd;
            border-radius: 6px;
            padding: 16px 20px;
            margin-top: 20px;
            font-family: inherit;
            font-size: 14px;
            line-height: 1.5;
            max-height: 600px;
            overflow-y: auto;
            word-break: break-word;
        }
        .response-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            border-bottom: 1px solid #eee;
            padding-bottom: 10px;
        }
        .response-title {
            font-weight: 600;
            font-size: 16px;
        }
        .response-meta {
            font-size: 12px;
            color: #666;
        }

        /* Tabs */
        .tabs {
            display: flex;
            margin-bottom: 20px;
            border-bottom: 1px solid #ddd;
        }
        .tab {
            padding: 12px 24px;
            cursor: pointer;
            background-color: #f4f6f8;
            border: 1px solid #ddd;
            border-bottom: none;
            border-radius: 6px 6px 0 0;
            margin-right: 5px;
            font-weight: 500;
            transition: all 0.3s ease;
        }
        .tab.active {
            background-color: #fff;
            border-bottom: 1px solid #fff;
            margin-bottom: -1px;
        }
        .tab-content { display: none; }
        .tab-content.active { display: block; }

        /* Client list */
        .client-list,
        .process-list {
            list-style-type: none;
            padding: 0;
            margin: 0;
        }
        .client-item,
        .process-item {
            padding: 15px;
            margin: 8px 0;
            background-color: #fff;
            border-radius: 6px;
            border: 1px solid #ddd;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .client-item:hover,
        .process-item:hover {
            background-color: #f9f9f9;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }
        .process-badge {
            background-color: #111;
            color: #fff;
            padding: 5px 10px;
            border-radius: 12px;
            font-size: 12px;
        }
        .back-button {
            margin: 15px 0px;
            background-color: #666;
        }
        #markdown-content h1 { font-size: 1.8em; margin-top: 0.8em; }
        #markdown-content h2 { font-size: 1.6em; margin-top: 0.6em; }
        #markdown-content ul { padding-left: 1.2em; }
        #markdown-content pre { background:#f5f5f5; padding:1em; overflow:auto }
        #markdown-content code { font-family: monospace; }

        .detail-close {
          position: absolute;
          top: 0.5rem;
          right: 0.5rem;
          background: black;
          border: none;
          font-size: 1.5rem;
          cursor: pointer;
        }
        .storyboard-details {
          display: flex;
          justify-content: space-between;
          align-items: center;
        }
        .snak-type {
          /* optional styling for the type label */
          font-size: 0.9rem;
          color: #666;
          font-weight: bold;
        }
        .storyboard-title {
          /* optional styling for the name */
          margin: 0;
        }

        .navbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 25px;
    background-color: #333;
    padding: 10px 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    border-bottom: 1px solid #333;
    border-radius: 0 0 5px 5px;
  }

  .navbar a {
    color: #f1f1f1;
    text-decoration: none;
    margin-right: 20px;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 4px;
    transition: background-color 0.4s ease, color 0.4s ease;
  }

  .navbar a:hover {
    background-color: #222;
    color: #fff;
  }

  /* ---------- Storyboard Creation Form ---------- */
#storyboard-form {
  max-width: 600px;
  margin: 2rem auto;
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#storyboard-form h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #222222;
}

/* Grouped fields */
#storyboard-form .form-group,
#storyboard-form fieldset {
  margin-bottom: 1.25rem;
}

#storyboard-form .form-group label,
#storyboard-form fieldset legend {
  display: block;
  font-weight: 600;
  color: #444444;
  margin-bottom: 0.5rem;
}

/* Inputs & textarea */
#storyboard-form input[type="text"],
#storyboard-form input[type="number"],
#storyboard-form select,
#storyboard-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  background: #f9f9f9;
  color: #222222;
  font-size: 1rem;
  box-sizing: border-box;
}

/* Fieldset styling */
#storyboard-form fieldset {
  border: 1px solid #dddddd;
  border-radius: 4px;
  padding: 1rem;
}

#storyboard-form fieldset legend {
  padding: 0 0.5rem;
  background: #ffffff;
}

/* Checkbox lines */
#storyboard-form fieldset div {
  margin-bottom: 0.5rem;
}

#storyboard-form fieldset div label {
  font-weight: normal;
  display: flex;
  align-items: center;
}

#storyboard-form fieldset div input[type="checkbox"] {
  margin-right: 0.5rem;
}

/* Generate button */
#create-storyboard-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #222222;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#create-storyboard-btn:hover {
  background: #444444;
}

/* AI Response area */
.result-data {
  margin-top: 1.5rem;
  background: #fafafa;
  padding: 1rem;
  border: 1px solid #eeeeee;
  border-radius: 4px;
}

.hidden {
  display: none;
}

.ai-response {
  color: #333333;
  font-family: monospace;
  white-space: pre-wrap;
}

.canvas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.canvas-card {
  border: 1px solid #CCC;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color .2s;
}
.canvas-card .icon {
  font-size: 2rem;
  opacity: 0.6;
}
.canvas-card .title {
  display: block;
  margin-top: 0.5rem;
  font-weight: 600;
}
.canvas-card .subtitle {
  display: block;
  color: #666;
  font-size: .9em;
}
.canvas-card .dimensions {
  margin-top: .5rem;
  display: flex;
  justify-content: center;
  gap: .5rem;
}
.canvas-card .dimensions input {
  width: 4rem;
}
.canvas-card.selected {
  border-color: #7F3FF0;
}
.canvas-card.selected .icon,
.canvas-card.selected .title {
  color: #7F3FF0;
}

.file-drop-zone {
  border: 2px dashed #000;
  background: #fff;
  color: #000;
  padding: 2rem;
  text-align: center;
  margin: 1rem 0;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.file-drop-zone.dragover {
  background: #000;
  color: #fff;
}
/* Selected-files area styling */
.file-list {
  /* visual container */
  background: #fff;
  border: 1px solid #000;
  padding: 0.75rem;
  margin-top: 1rem;
  /* three columns */
  column-count: 3;
  column-gap: 1rem;
  list-style: none;
}

/* each file entry */
.file-list li {
  break-inside: avoid;       /* avoid splitting across columns */
  margin-bottom: 0.5rem;
  font-size: 0.875rem;       /* slightly smaller text */
  position: relative;
}

/* smaller “remove” button */
.file-list li button {
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
  margin-left: 0.5rem;
}
