  * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      background: #f8f9fa;
      padding: 2rem 1rem;
      line-height: 1.6;
    }

    .container {
      max-width: 1400px;
      margin: 0 auto;
    }

    header {
      text-align: center;
      margin-bottom: 3rem;
      background: white;
      padding: 2.5rem;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    header h1 {
      font-size: 2.5rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
      color: #1a1a1a;
    }

    header p {
      font-size: 1.1rem;
      color: #666;
      margin-bottom: 0;
    }

    /* ============================================
       FILTER SECTION STYLES
       ============================================ */

    .filter-section {
      background: white;
      padding: 2rem;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.06);
      margin-bottom: 2rem;
    }

    .filter-title {
      font-size: 1.5rem;
      font-weight: 600;
      color: #1a1a1a;
      margin-bottom: 1.5rem;
    }

    /* Filter Controls Layout */
    .filter-controls {
      margin-bottom: 1.5rem;
    }

    .filter-dropdowns {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      align-items: center;
    }

    /* Custom Dropdown Styling */
    .filter-dropdown {
      position: relative;
      min-width: 180px;
    }

    .filter-dropdown-btn {
      width: 100%;
      padding: 0.75rem 1rem;
      background: #f8f9fa;
      border: 2px solid #e0e0e0;
      border-radius: 8px;
      font-size: 0.95rem;
      font-weight: 500;
      color: #333;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: all 0.2s;
      font-family: inherit;
    }

    .filter-dropdown-btn:hover {
      border-color: #0066ff;
      background: #f0f4ff;
    }

    .filter-dropdown.active .filter-dropdown-btn {
      border-color: #0066ff;
      background: #f0f4ff;
    }

    .filter-label {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .filter-label i {
      width: 18px;
      height: 18px;
    }

    .chevron {
      width: 16px;
      height: 16px;
      transition: transform 0.2s;
    }

    .filter-dropdown.active .chevron {
      transform: rotate(180deg);
    }

    /* Dropdown Menu */
    .filter-dropdown-menu {
      position: absolute;
      top: calc(100% + 0.5rem);
      left: 0;
      min-width: 220px;
      max-height: 320px;
      overflow-y: auto;
      background: white;
      border: 2px solid #e0e0e0;
      border-radius: 8px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.12);
      z-index: 100;
      display: none;
      padding: 0.5rem;
    }

    .filter-dropdown.active .filter-dropdown-menu {
      display: block;
      animation: dropdownSlide 0.2s ease;
    }

    @keyframes dropdownSlide {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Custom Scrollbar for Dropdown */
    .filter-dropdown-menu::-webkit-scrollbar {
      width: 6px;
    }

    .filter-dropdown-menu::-webkit-scrollbar-track {
      background: #f5f5f5;
      border-radius: 3px;
    }

    .filter-dropdown-menu::-webkit-scrollbar-thumb {
      background: #c0c0c0;
      border-radius: 3px;
    }

    .filter-dropdown-menu::-webkit-scrollbar-thumb:hover {
      background: #a0a0a0;
    }

    /* Filter Options (Checkboxes) */
    .filter-option {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.65rem 0.75rem;
      cursor: pointer;
      border-radius: 6px;
      transition: background 0.15s;
      user-select: none;
    }

    .filter-option:hover {
      background: #f0f4ff;
    }

    .filter-option input[type="checkbox"] {
      width: 18px;
      height: 18px;
      cursor: pointer;
      accent-color: #0066ff;
    }

    .filter-option span {
      font-size: 0.9rem;
      color: #333;
      font-weight: 500;
    }

    .filter-option input[type="checkbox"]:checked + span {
      color: #0066ff;
      font-weight: 600;
    }

    /* Clear Filters Button */
    .clear-filters-btn {
      padding: 0.75rem 1.25rem;
      background: #fff;
      border: 2px solid #e0e0e0;
      border-radius: 8px;
      font-size: 0.9rem;
      font-weight: 600;
      color: #666;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      transition: all 0.2s;
      font-family: inherit;
    }

    .clear-filters-btn:hover {
      border-color: #ff4444;
      background: #fff5f5;
      color: #ff4444;
    }

    .clear-filters-btn i {
      width: 18px;
      height: 18px;
    }

    /* Mode Count Display */
    .mode-count {
      padding: 0.75rem 0;
      font-size: 1rem;
      font-weight: 600;
      color: #333;
      border-top: 1px solid #e0e0e0;
      margin-top: 1rem;
    }

    /* Active Filters Bar */
    .active-filters {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-top: 1rem;
      padding-top: 1rem;
      border-top: 1px solid #e0e0e0;
      min-height: 40px;
    }

    .active-filters:empty {
      display: none;
    }

    /* Filter Pills */
    .filter-pill {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.5rem 0.75rem;
      background: #e3f2fd;
      border: 1px solid #90caf9;
      border-radius: 20px;
      font-size: 0.85rem;
      font-weight: 500;
      color: #0d47a1;
      animation: pillFadeIn 0.2s ease;
    }

    @keyframes pillFadeIn {
      from {
        opacity: 0;
        transform: scale(0.9);
      }
      to {
        opacity: 1;
        transform: scale(1);
      }
    }

    .filter-pill .pill-category {
      font-size: 0.75rem;
      opacity: 0.7;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .filter-pill-remove {
      width: 16px;
      height: 16px;
      border: none;
      background: transparent;
      color: #0d47a1;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      padding: 0;
      transition: all 0.15s;
    }

    .filter-pill-remove:hover {
      background: rgba(13, 71, 161, 0.2);
      transform: scale(1.2);
    }

    .filter-pill-remove i {
      width: 14px;
      height: 14px;
    }

    /* Different pill colors for visual distinction */
    .filter-pill[data-category="fittingFor"] {
      background: #e8f5e9;
      border-color: #81c784;
      color: #2e7d32;
    }

    .filter-pill[data-category="fittingFor"] .filter-pill-remove {
      color: #2e7d32;
    }

    .filter-pill[data-category="tags"] {
      background: #fff3e0;
      border-color: #ffb74d;
      color: #e65100;
    }

    .filter-pill[data-category="tags"] .filter-pill-remove {
      color: #e65100;
    }

    .filter-pill[data-category="colors"] {
      background: #fce4ec;
      border-color: #f48fb1;
      color: #c2185b;
    }

    .filter-pill[data-category="colors"] .filter-pill-remove {
      color: #c2185b;
    }

    .filter-pill[data-category="fonts"] {
      background: #f3e5f5;
      border-color: #ce93d8;
      color: #7b1fa2;
    }

    .filter-pill[data-category="fonts"] .filter-pill-remove {
      color: #7b1fa2;
    }

    /* Hidden Mode Cards (for filtering) */
    .mode-card.hidden {
      display: none;
    }

    /* Responsive Design */
    @media (max-width: 768px) {
      .filter-dropdowns {
        flex-direction: column;
        align-items: stretch;
      }

      .filter-dropdown {
        min-width: 100%;
      }

      .filter-dropdown-menu {
        min-width: 100%;
      }

      .clear-filters-btn {
        width: 100%;
        justify-content: center;
      }

      .filter-section {
        padding: 1.5rem;
      }
    }

    /* Floating Text Control Button */
    .floating-text-btn {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: #0066ff;
      color: white;
      border: none;
      box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s ease;
      z-index: 900;
    }

    .floating-text-btn:hover {
      transform: scale(1.1);
      box-shadow: 0 6px 24px rgba(0, 102, 255, 0.4);
    }

    .floating-text-btn i {
      width: 24px;
      height: 24px;
    }

    /* Text Controls (now in modal) */
    .text-controls {
      max-width: 600px;
      margin: 0 auto;
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .control-group {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .control-group label {
      font-size: 0.85rem;
      font-weight: 600;
      color: #1a1a1a;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .control-group label i {
      width: 16px;
      height: 16px;
    }

    .control-group input {
      padding: 0.75rem;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      font-size: 0.95rem;
      font-family: inherit;
      transition: border-color 0.2s;
    }

    .control-group input:focus {
      outline: none;
      border-color: #0066ff;
    }

    .reset-btn {
      margin-top: 0.5rem;
      padding: 0.75rem 1.25rem;
      background: #f5f5f5;
      border: 1px solid #e0e0e0;
      border-radius: 8px;
      font-size: 0.9rem;
      font-weight: 600;
      color: #333;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      transition: all 0.2s;
      font-family: inherit;
    }

    .reset-btn:hover {
      background: #e8e8e8;
      border-color: #d0d0d0;
    }

    .reset-btn i {
      width: 16px;
      height: 16px;
    }

    .modes-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
      gap: 2rem;
      margin-bottom: 3rem;
    }

    .mode-card {
      background: white;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 2px 12px rgba(0,0,0,0.08);
      transition: transform 0.2s, box-shadow 0.2s, border 0.2s;
      cursor: pointer;
      display: block;
      border: 2px solid transparent;
    }

    .mode-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    }

    .mode-preview {
      height: 280px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 2.5rem;
      text-align: center;
      position: relative;
      transition: all 0.3s ease;
    }

    .theme-toggle {
      position: absolute;
      top: 1rem;
      right: 1rem;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      border: none;
      background: rgba(0, 0, 0, 0.1);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      z-index: 10;
    }

    .theme-toggle:hover {
      background: rgba(0, 0, 0, 0.15);
      transform: rotate(15deg);
    }

    .theme-toggle i {
      width: 18px;
      height: 18px;
    }

    .mode-preview h2 {
      font-size: 2.5rem;
      margin-bottom: 0.75rem;
      font-weight: 600;
    }

    .mode-preview p {
      font-size: 1rem;
      opacity: 0.85;
      margin-bottom: 1.25rem;
    }

    .mode-preview .btn {
      display: inline-block;
      padding: 0.75rem 1.5rem;
      border-radius: 6px;
      font-weight: 600;
      font-size: 0.9rem;
      text-decoration: none;
    }

    .mode-info {
      padding: 1.5rem;
      border-top: 1px solid #f0f0f0;
    }

    .mode-info h3 {
      font-size: 1.25rem;
      margin-bottom: 0.5rem;
      font-weight: 600;
      color: #1a1a1a;
    }

    .mode-info .description {
      font-size: 0.95rem;
      color: #666;
      margin-bottom: 1rem;
    }

    /* Mini Preview Component */
    .mini-preview {
      display: flex;
      gap: 0.75rem;
      margin-bottom: 1rem;
      padding: 1rem;
      background: #fafafa;
      border-radius: 8px;
      overflow: hidden;
    }

    .mini-preview-box {
      flex: 1;
      height: 60px;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.7rem;
      font-weight: 600;
      text-align: center;
      padding: 0.5rem;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .mode-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .meta-pill {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      padding: 0.4rem 0.75rem;
      background: #f5f5f5;
      border-radius: 6px;
      font-size: 0.8rem;
      font-weight: 500;
      color: #333;
    }

    .meta-pill i {
      width: 14px;
      height: 14px;
    }

    /* Modal Styles */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.7);
      z-index: 1000;
      padding: 2rem;
      overflow-y: auto;
      animation: fadeIn 0.2s ease;
    }

    .modal.active {
      display: flex;
      justify-content: center;
      align-items: flex-start;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
      }
      to {
        opacity: 1;
      }
    }

    .modal-content {
      background: white;
      border-radius: 16px;
      max-width: 1200px;
      width: 100%;
      max-height: 90vh;
      overflow-y: auto;
      position: relative;
      margin: 2rem 0;
      animation: slideUp 0.3s ease;
    }

    @keyframes slideUp {
      from {
        transform: translateY(30px);
        opacity: 0;
      }
      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .modal-header {
      position: sticky;
      top: 0;
      background: white;
      padding: 2rem;
      border-bottom: 1px solid #e0e0e0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      z-index: 10;
    }

    .modal-header h2 {
      font-size: 1.75rem;
      color: #1a1a1a;
    }

    .modal-close {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: none;
      background: #f5f5f5;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }

    .modal-close:hover {
      background: #e0e0e0;
    }

    .modal-close i {
      width: 20px;
      height: 20px;
    }

    .modal-body {
      padding: 2rem;
    }

    .instructions {
      background: white;
      padding: 2rem;
      border-radius: 12px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .instructions h2 {
      font-size: 1.5rem;
      margin-bottom: 1rem;
      color: #1a1a1a;
    }

    .instructions ul {
      margin-left: 1.5rem;
      color: #666;
    }

    .instructions li {
      margin-bottom: 0.75rem;
    }

    .instructions code {
      background: #f5f5f5;
      padding: 0.2rem 0.5rem;
      border-radius: 4px;
      font-family: 'Courier New', monospace;
      font-size: 0.9rem;
      color: #d63384;
    }

    /* CSS Copy Box */
    .css-copy-box {
      margin-top: 1.5rem;
      background: #1e1e1e;
      border-radius: 8px;
      overflow: hidden;
    }

    .css-copy-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1rem;
      background: #2a2a2a;
      border-bottom: 1px solid #3a3a3a;
    }

    .css-copy-header h4 {
      color: #ffffff;
      font-size: 0.9rem;
      font-weight: 600;
      margin: 0;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .css-copy-header h4 i {
      width: 16px;
      height: 16px;
    }

    .copy-btn {
      padding: 0.5rem 1rem;
      background: #0066ff;
      color: white;
      border: none;
      border-radius: 6px;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-family: inherit;
    }

    .copy-btn:hover {
      background: #0052cc;
      transform: scale(1.05);
    }

    .copy-btn.copied {
      background: #28a745;
    }

    .copy-btn i {
      width: 14px;
      height: 14px;
    }

    .css-code {
      padding: 1.5rem;
      color: #d4d4d4;
      font-family: 'Courier New', monospace;
      font-size: 0.85rem;
      line-height: 1.6;
      max-height: 400px;
      overflow-y: auto;
      white-space: pre;
    }

    .css-code::-webkit-scrollbar {
      width: 8px;
    }

    .css-code::-webkit-scrollbar-track {
      background: #1e1e1e;
    }

    .css-code::-webkit-scrollbar-thumb {
      background: #4a4a4a;
      border-radius: 4px;
    }

    .css-code::-webkit-scrollbar-thumb:hover {
      background: #5a5a5a;
    }

    /* View Mode Tabs */
    .view-mode-tabs {
      display: flex;
      gap: 0.5rem;
      margin-bottom: 1rem;
      border-bottom: 2px solid #e0e0e0;
      padding-bottom: 0.5rem;
    }

    .view-tab {
      padding: 0.5rem 1rem;
      background: transparent;
      border: none;
      border-bottom: 2px solid transparent;
      font-size: 0.9rem;
      font-weight: 600;
      color: #666;
      cursor: pointer;
      transition: all 0.2s;
      font-family: inherit;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .view-tab i {
      width: 16px;
      height: 16px;
    }

    .view-tab:hover {
      color: #1a1a1a;
    }

    .view-tab.active {
      color: #0066ff;
      border-bottom-color: #0066ff;
    }

    .view-content {
      display: none;
    }

    .view-content.active {
      display: block;
    }

    @media (max-width: 768px) {
      .modes-grid {
        grid-template-columns: 1fr;
      }

      header h1 {
        font-size: 2rem;
      }

      .floating-text-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
      }

      .floating-text-btn i {
        width: 20px;
        height: 20px;
      }

      .modal {
        padding: 1rem;
      }

      .modal-content {
        margin: 1rem 0;
      }

      .modal-header,
      .modal-body {
        padding: 1.5rem;
      }
    }