 /* Basic Reset & Box Sizing */
    *, *::before, *::after {
      margin: 0;
      padding: 0;
      box-sizing: border-box; 
    }
    body {
      font-family: Arial, sans-serif;
      font-size: 14px;
      line-height: 1.4;
      background-color: #f3f4f6;
      color: #333;
    }
    .main-container {
      max-width: 1250px;
      margin: 1rem auto;
      padding: 1.5rem;
      border-radius: 8px;
      box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
      background-color: #fff;
    }
    .title-h {
      font-size: 1.4rem;
      font-weight: bold;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      margin-bottom: 0.5rem;
    }
    .subtitle {
      font-size: 0.9rem;
      margin-bottom: 1rem;
      color: #6b7280;
    }
    .generator-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
    }
    @media (max-width: 768px) {
      .generator-grid {
        grid-template-columns: 1fr;
      }
    }
    .form-section {
      padding: 1rem;
      border-radius: 6px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.1);
      background-color: #fff;
    }
    .form-section label {
      display: block;
      font-weight: bold;
      font-size: 0.85rem;
      margin-bottom: 0.25rem;
      color: #374151;
    }
    .form-section input[type="text"],
    .form-section input[type="number"],
    .form-section select,
    .form-section textarea {
      width: 100%;
      padding: 0.45rem;
      border-radius: 4px;
      margin-bottom: 0.6rem;
      font-size: 0.85rem;
      border: 1px solid #d1d5db;
    }
    .relative {
      position: relative;
    }
    /* Random Description Button (placed near the background textarea) */
    #randomDescriptionBtn {
      position: absolute;
      right: 0.4rem;
      top: 2.05rem;
      background: none;
      border: none;
      cursor: pointer;
      font-size: 0.9rem;
      color: #6b7280;
      transition: color 0.2s;
    }
    #randomDescriptionBtn:hover {
      color: #111827;
    }
    /* Range Slider */
    input[type="range"] {
      -webkit-appearance: none;
      width: 100%;
      background: transparent;
      cursor: pointer;
    }
    input[type="range"]::-webkit-slider-runnable-track {
      height: 4px;
      border-radius: 2px;
      background-color: #a78bfa;
    }
    input[type="range"]::-webkit-slider-thumb {
      height: 14px;
      width: 14px;
      border-radius: 50%;
      background: #7c3aed;
      margin-top: -5px;
      border: none;
      -webkit-appearance: none;
    }
    #sliderValue {
      font-size: 0.75rem;
      color: #7c3aed;
      font-style: italic;
      margin-bottom: 1rem;
      display: inline-block;
    }
    /* Collapsible Advanced Options */
    .collapsible-header {
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin: 1rem 0 0.5rem 0;
      font-weight: bold;
      font-size: 0.9rem;
      color: #374151;
    }
    .collapsible-body {
      display: none;
      margin-bottom: 1rem;
    }
    /* Buttons */
    .bg-gradient {
      background: linear-gradient(90deg, #553c9a, #ee4b2b) !important;
      color: #fff !important;
      padding: 0.5rem 1rem;
      border-radius: 9999px;
      font-size: 0.85rem;
      cursor: pointer;
      border: none;
      transition: transform 0.2s ease, opacity 0.2s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .bg-gradient:hover {
      transform: scale(1.02);
      opacity: 0.9;
    }
    .button-container {
      display: flex;
      justify-content: space-between;
      margin-top: 1rem;
    }
    /* Result Section */
    .result-section {
      min-height: 400px;
      padding: 1rem;
      border-radius: 6px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.1);
      background-color: #fff;
    }
    #loadingIndicator {
      display: none;
      justify-content: center;
      align-items: center;
      margin-top: 1rem;
      min-height: 40px;
    }
    .loader {
      border: 3px solid rgba(0, 0, 0, 0.1);
      border-left-color: #000;
      border-radius: 50%;
      width: 30px;
      height: 30px;
      animation: spin 1s linear infinite;
    }
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    #placeholderPreview {
      color: #666;
      font-style: italic;
      margin-top: 1rem;
    }
    /* Draft Tabs & Display */
    #draftTabs {
      display: flex;
      gap: 10px;
      margin-bottom: 10px;
      overflow-x: auto;
    }
    .draft-tab {
      padding: 8px 16px;
      border: none;
      background-color:#795ec3;
      color: #fff;
      border-radius: 4px;
      cursor: pointer;
      flex-shrink: 0;
      transition: background-color 0.3s ease;
    }
    .draft-tab:hover {
      background-color: #8b5cf6;
    }
    .draft-tab.active {
      background-color: #553c9a;
    }

    /* Explanation/Instructions under tabs */
    #draftInstructions {
      font-size: 0.85rem;
      color: #555;
      margin-bottom: 10px;
    }

    #draftDisplay {
      padding: 1rem 1.5rem 1rem 1rem; /* Added extra right padding to avoid icon overlap */
      border: 1px solid #d1d5db;
      border-radius: 4px;
      background-color: #f9f9f9;
      min-height: 150px;
      position: relative;
      opacity: 1;                   /* For transition effect */
      transition: opacity 0.3s ease-in-out;
    }
    /* Buttons for copy and save in the draft display */
    .draft-actions {
      position: absolute;
      top: 8px;
      right: 8px;
    }
    .draft-actions button {
      background: none;
      border: none;
      margin-left: 8px; /* Slightly increased spacing */
      cursor: pointer;
      color: #374151;
      font-size: 1rem;
      transition: color 0.2s;
    }
    .draft-actions button:hover {
      color: #111827;
    }
    /* Toast Notification */
    .toast {
      visibility: hidden;
      position: fixed;
      left: 50%;
      bottom: -60px;
      transform: translateX(-50%);
      background-color: #111827;
      color: #fff;
      border-radius: 8px;
      padding: 0.75rem 1rem;
      font-size: 0.9rem;
      box-shadow: 0 6px 12px rgba(0,0,0,0.2);
      transition: all 0.5s ease;
      z-index: 9999;
    }
    .toast.show {
      visibility: visible;
      bottom: 20px;
    }
    /* Favorites Section */
    .favorite-main-container {
      max-width: 1250px;
      margin: 1rem auto;
      border-radius: 6px;
      box-shadow: 0 0 10px rgba(0,0,0,0.05);
      padding: 1rem;
      background-color: #fff;
    }
    .favorite-section h2 {
      font-size: 1rem;
      font-weight: bold;
      margin-bottom: 0.5rem;
      color: #374151;
    }
    .combine-section {
      margin-top: 0.5rem;
      padding: 0.5rem;
      border-radius: 4px;
      background-color: #ebf8ff;
      border: 1px solid #bee3f8;
    }
    .combine-section textarea {
      width: 100%;
      min-height: 60px;
      margin-top: 0.3rem;
      resize: vertical;
      border: 1px solid #d1d5db;
      border-radius: 4px;
      font-size: 0.8rem;
      padding: 0.4rem;
    }
    /* Responsive fix for Favorites on small screens */
    @media (max-width: 768px) {
      .favorite-main-container {
        margin: 1rem;
      }
    }
    .hidden {
      display: none !important;
    }
     .step {
    background-color: #f9f9f9;
    padding: 20px;
}
@media screen and (max-width: 768px) {
    .step {
        padding: 15px;
        margin-bottom: 20px;
        max-width: 100%;
        overflow-x: hidden;
    }
}
.step-description {
    font-size: 16px;
    color: #666;
}