    /* Basic Reset */
    *, *::before, *::after {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    
    body {
      font-family: Arial, sans-serif;
      background-color: #f3f4f6;
      color: #333;
      line-height: 1.4;
      overflow-x: hidden;
    }
    
    /* Main & Favorite Containers */
    .main-container,
    .favorite-main-container {
      width: 95%;
      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;
      transition: background-color 0.3s ease;
    }
    
    .title-h {
      font-size: 1.4rem;
      font-weight: bold;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    
    .subtitle {
      font-size: 0.9rem;
      margin-bottom: 1rem;
      color: #6b7280;
    }
    
    /* Generator Grid Layout */
    .generator-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
    }
    
    @media (max-width: 768px) {
      .generator-grid {
        grid-template-columns: 1fr;
      }
    }
    
    /* Form Section */
    .form-section {
      padding: 1rem;
      border-radius: 6px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.1);
      background-color: #fff;
      transition: background-color 0.3s ease;
    }
    .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 select,
    .form-section textarea {
      width: 100%;
      padding: 0.45rem;
      border-radius: 4px;
      margin-bottom: 0.6rem;
      font-size: 0.85rem;
      border: 1px solid #d1d5db;
      background: transparent;
      color: inherit;
    }
    
    /* Relative & Word Count */
    .relative {
      position: relative;
    }
    .word-count {
      text-align: right;
      font-size: 0.75rem;
      color: #6b7280;
      margin-top: -0.4rem;
      margin-bottom: 0.6rem;
    }
    
    /* Container for both buttons positioned at the top right of the textarea */
    .icon-buttons {
      position: absolute;
      right: 0.4rem;
      top: 2.05rem;
      display: flex;
      gap: 0.5rem;
    }
    
    /* Style for each button */
    .icon-buttons button {
      background: none;
      border: none;
      cursor: pointer;
      font-size: 0.9rem;
      color: #6b7280;
      transition: color 0.2s;
    }
    
    .icon-buttons button:hover {
      color: #111827;
    }
    
    /* Two-by-Two Grid */
    .two-by-two-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1rem;
    }
    @media (max-width: 640px) {
      .two-by-two-grid {
        grid-template-columns: 1fr;
      }
    }
    
    /* 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;
    }
    
    /* 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;
    }
    
    /* 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;
    }
    #resetBtn {
      background-color: #f3f4f6;
      color: #333;
      border: 1px solid #ccc;
      border-radius: 8px;
      padding: 0.45rem 1rem;
      font-size: 0.85rem;
      cursor: pointer;
    }
    #resetBtn:hover {
      background-color: #e2e3e5;
    }
    
    /* 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;
      transition: background-color 0.3s ease;
    }
    #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;
    }
    
    /* Reply List */
    .reply-list {
      margin-top: 1rem;
    }
    .reply-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #fff;
      margin-bottom: 0.5rem;
      border: 1px solid #e5e7eb;
      border-radius: 4px;
      padding: 0.5rem 0.75rem;
    }
    .reply-item p {
      flex: 1;
      margin-right: 0.5rem;
      font-size: 0.85rem;
    }
    .btn-icon {
      background: none;
      border: none;
      padding: 0.25rem;
      font-size: 0.9rem;
      cursor: pointer;
      transition: color 0.2s;
      color: #374151;
    }
    .btn-icon:hover {
      color: #000;
    }
    
    /* 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/History Section */
    .favorite-main-container {
      width: 95%;
      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;
      transition: background-color 0.3s ease;
    }
    .favorite-section h2 {
      font-size: 1rem;
      font-weight: bold;
      margin-bottom: 0.5rem;
      color: #374151;
    }
    .favorite-list {
      margin-top: 1rem;
    }
    .combine-section {
      margin-top: 0.5rem;
      padding: 0.5rem;
      border-radius: 4px;
      background-color: #ebf8ff;
      border: 1px solid #bee3f8;
      transition: background-color 0.3s ease, border 0.3s ease;
    }
    .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;
    }
    
    .hidden {
      display: none !important;
    }
    
    /* Step/Explainer Section (if applicable) */
    .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;
    }  /* Draft Tabs */
    .draft-tabs {
      margin-bottom: 1rem;
      display: flex;
      gap: 0.5rem;
    }
    .draft-tab {
      border: 1px solid #d1d5db;
      padding: 0.5rem 1rem;
      border-radius: 4px;
      background-color: #f9fafb;
      cursor: pointer;
      font-size: 0.9rem;
      transition: background-color 0.2s;
    }
    .draft-tab.active {
      background: linear-gradient(90deg, #553c9a, #ee4b2b);
      color: #fff;
      border: none;
    }
    /* Email preview card style */
    .email-preview-card {
      background-color: #f8f9fa;
      border: 1px solid #d1d5db;
      border-radius: 6px;
      padding: 1rem;
      margin-bottom: 1rem;
      line-height: 1.5;
    }
    .email-preview-card .subject-line {
      font-weight: bold;
      margin-bottom: 0.75rem;
      font-size: 0.95rem;
    }
    .email-preview-card .email-body p {
      margin-bottom: 1rem;
      white-space: pre-line;
    }