/**
 * DiscordFonts.net - Core Modern Design System & Styles
 * Pure Vanilla CSS with Design Tokens, Glassmorphism, Micro-animations & Mobile-First Grid
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

/* CSS Reset & Universal Box-Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* Anchor Target Scroll Offset to prevent fixed/sticky header obstruction */
:target,
[id] {
  scroll-margin-top: 5rem;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow-x: hidden;
}

/* Accessibility - Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* 1. Header & Navigation */
.site-header {
  position: relative;
  z-index: 10;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.brand-text span {
  color: var(--accent-primary);
}

/* Minimalist Clean Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.4rem 0.8rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s ease;
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.nav-link:hover {
  color: var(--accent-primary);
  background: var(--bg-tertiary);
}

.nav-link-icon {
  display: none;
}

.nav-mobile-footer {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 9999px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}

/* Mobile Nav Toggle Button */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4.5px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 52;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus-visible {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  outline: none;
}

.hamburger-bar {
  display: block;
  width: 19px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.mobile-nav-toggle.is-active .hamburger-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.mobile-nav-toggle.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-nav-toggle.is-active .hamburger-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-nav-backdrop {
  display: none;
}

/* Responsive Breakpoints for Mobile Header */
@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: flex;
  }

  .header-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-header);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding: 1rem 1.25rem 1.25rem 1.25rem;
    border-radius: 0 0 16px 16px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.2s;
    z-index: 51;
  }

  .header-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    min-height: 46px;
  }

  .nav-link:active,
  .nav-link:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
  }

  .nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    width: 24px;
  }

  .nav-mobile-footer {
    display: flex;
    justify-content: center;
    padding-top: 0.85rem;
    margin-top: 0.25rem;
    border-top: 1px dashed var(--border-color);
  }

  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 49;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
  }

  .mobile-nav-backdrop.is-active {
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 640px) {
  .header-badge-desktop {
    display: none;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 58px;
  }

  .header-nav {
    top: 58px;
  }

  .mobile-nav-backdrop {
    top: 58px;
  }

  .brand-text {
    font-size: 1.1rem;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 1.05rem;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 0.85rem;
  }

  .brand-text {
    font-size: 1rem;
  }
}

/* 2. Compact Zero-Friction Hero Header */
.generator-section {
  padding-top: 1.25rem;
}

.hero-header-compact {
  margin-bottom: 0.85rem;
}

.main-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.main-subtitle {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
  max-width: 720px;
}

/* 3. Hero Product: Interactive Generator Card */
.generator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  margin: 0 0 1.25rem 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  position: relative;
}

.input-box-wrapper {
  position: relative;
  margin-bottom: 0.75rem;
}

.font-textarea {
  width: 100%;
  min-height: 72px;
  height: 72px;
  padding: 0.75rem 1rem;
  padding-right: 6.5rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-family: inherit;
  font-weight: 500;
  resize: vertical;
  outline: none;
  transition: all 0.2s;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.font-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-actions-floating {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  display: flex;
  gap: 0.35rem;
}

.btn-input-action {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-input-action:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.input-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.input-counters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.8rem;
}

.styled-char-pill {
  color: var(--accent-primary);
  background: rgba(2, 132, 199, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(2, 132, 199, 0.25);
  font-weight: 600;
}

.selected-font-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  user-select: none;
}

.indicator-label {
  font-weight: 500;
}

.indicator-font-tag {
  color: var(--accent-primary);
  font-weight: 700;
}

.sticky-font-pill {
  background: rgba(2, 132, 199, 0.15);
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(2, 132, 199, 0.3);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Discord Limit Validator Badges */
.limit-validator-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.limit-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s;
}

.limit-badge.safe {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.limit-badge.warning {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
  animation: pulseWarning 1.5s infinite;
}

@keyframes pulseWarning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Quick Examples Chips */
.examples-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.examples-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.example-chip {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.example-chip:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Decorator Bar & Markdown Wrappers */
.tools-accordion {
  border-top: 1px solid var(--border-color);
  padding-top: 0.65rem;
}

.tools-accordion summary {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  transition: background 0.15s;
  margin-bottom: 0.65rem;
}

.tools-accordion summary:hover {
  background: #f0f9ff;
}

.tool-section-row {
  margin-bottom: 1rem;
}

.tool-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.decorator-chips-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.decorator-chips-scroll::-webkit-scrollbar {
  display: none;
}

.decorator-chip {
  flex-shrink: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.decorator-chip.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.markdown-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.md-toggle-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.md-toggle-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.zalgo-slider-box {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.zalgo-slider-box input[type="range"] {
  flex: 1;
  max-width: 250px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.zalgo-level-tag {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-secondary);
}

/* 4. Recently Copied Shelf */
.recent-shelf {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 2rem;
  display: none;
}

.recent-shelf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.recent-header-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.recent-header-sep {
  color: var(--border-color);
  font-size: 0.75rem;
  user-select: none;
}

.btn-recent-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-recent-clear:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

.recent-items-row {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.recent-items-row::-webkit-scrollbar {
  display: none;
}

.recent-item {
  flex-shrink: 0;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.recent-item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.recent-item:active {
  transform: translateY(0);
}

.recent-item:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 1px;
}

.recent-style-name {
  font-weight: 700;
  color: var(--accent-secondary);
  font-size: 0.78rem;
}

.recent-text {
  color: var(--text-primary);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s;
  pointer-events: none;
}

.recent-item:hover .recent-copy-btn {
  color: var(--accent-primary);
}

/* 5. Filter & Search Controls */
.filter-search-container {
  margin: 1.25rem 0 1rem 0;
}

.category-tabs-scroll {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 2px 2px 6px 2px;
  margin-bottom: 0.85rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.category-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.cat-tab-btn {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.42rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cat-tab-btn:hover {
  background: var(--bg-tertiary);
  border-color: #cbd5e1;
  color: var(--text-primary);
}

.cat-tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
}

.cat-tab-btn.fav-tab {
  border-color: rgba(244, 114, 182, 0.4);
}

.cat-tab-btn.fav-tab.active {
  background: #ec4899;
  border-color: #ec4899;
  box-shadow: 0 1px 3px rgba(236, 72, 153, 0.25);
}

.search-input-wrapper {
  position: relative;
  max-width: 420px;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.font-search-input {
  width: 100%;
  padding: 0.6rem 0.85rem 0.6rem 2.3rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}

.font-search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* 6. Responsive Font Grid & Cards */
.font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.font-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--card-shadow);
  position: relative;
  cursor: pointer;
}

.font-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--card-shadow-hover);
}

.font-card.is-selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow), var(--card-shadow-hover);
  background: var(--bg-card-hover);
}

.font-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.font-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.font-card-meta-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
  flex-wrap: wrap;
}

.font-category-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.card-len-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.card-len-badge.safe {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.card-len-badge.warn {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.card-len-badge.danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.font-card-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.compat-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.compat-badge.safe {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.compat-badge.limited {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.btn-fav {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.15s;
}

.btn-fav:hover {
  transform: scale(1.2);
}

.font-preview-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  min-height: 56px;
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  word-break: break-word;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.font-preview-box::-webkit-scrollbar {
  display: none;
}

.font-preview-text {
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--text-primary);
  user-select: all;
}

.font-card-footer {
  display: flex;
  gap: 0.5rem;
}

.btn-test-sim {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-test-sim:hover {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.btn-copy {
  flex: 1;
  background: var(--accent-primary);
  border: none;
  color: #ffffff;
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
}

.btn-copy:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.btn-copy.copied {
  background: var(--success);
  box-shadow: 0 2px 8px var(--success-glow);
  transform: scale(1.02);
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin: 2rem 0;
}

.btn-load-more {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.85rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-load-more:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* 7. Primary Generator Mode Switcher & Integrated Studio Kits (Option 1) */
.primary-mode-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.4rem;
  border-radius: 14px;
  margin: 1.5rem 0 1.25rem 0;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.primary-mode-switcher::-webkit-scrollbar {
  display: none;
}

.mode-tab-btn {
  flex: 1;
  min-width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
  font-family: inherit;
}

.mode-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.mode-tab-btn.active {
  background: var(--bg-secondary);
  color: var(--accent-primary);
  border-color: var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-weight: 700;
}

.mode-tab-btn .mode-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.mode-tab-btn .mode-title {
  letter-spacing: -0.01em;
}

.mode-tab-btn .mode-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-primary);
  color: #ffffff;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  line-height: 1.2;
}

.mode-tab-btn .mode-pill-limit {
  font-size: 0.72rem;
  font-weight: 600;
  background: #e2e8f0;
  color: var(--text-secondary);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.mode-tab-btn.active .mode-pill-limit {
  background: #e0f2fe;
  color: var(--accent-primary);
}

/* Mode Panels */
.mode-panel {
  display: none;
}

.mode-panel.active {
  display: block;
  animation: modeFadeIn 0.22s ease-out;
}

.mode-panel[hidden] {
  display: none !important;
}

@keyframes modeFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.studio-panel-intro {
  padding: 1.25rem 0 0.5rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.kit-tab-title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 760px;
  line-height: 1.6;
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.kit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.kit-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.kit-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kit-char-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.kit-text {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  word-break: break-all;
  min-height: 2.2rem;
  display: flex;
  align-items: center;
}

.btn-kit-copy {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
}

.btn-kit-copy:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* Bio Builder Cards */
.bio-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.bio-template-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.bio-template-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.bio-template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}

.bio-template-header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.bio-template-header .btn-kit-copy {
  width: auto;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.bio-pre {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
  margin: 0;
}

/* Status Kit Cards (Consistent with Display Name & Font Cards) */
.status-kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.status-kit-text {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  min-height: 2.2rem;
  word-break: break-word;
}

.status-card-emoji {
  font-size: 1.35rem;
  flex-shrink: 0;
  line-height: 1;
}

.status-card-val {
  flex: 1;
}

@media (max-width: 768px) {
  .primary-mode-switcher {
    gap: 0.35rem;
    padding: 0.35rem;
  }
  .mode-tab-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
  }
  .bio-templates-grid {
    grid-template-columns: 1fr;
  }
  .status-kit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .mode-tab-btn .mode-pill-limit,
  .mode-tab-btn .mode-badge {
    display: none;
  }
}

/* 8. How To Use Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* 9. Discord Compatibility Table */
.table-responsive-wrapper {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.compat-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  background: var(--bg-card);
}

.compat-table th, .compat-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.compat-table th {
  background: var(--bg-secondary);
  font-weight: 700;
  color: var(--text-primary);
}

.compat-table tr:hover td {
  background: var(--bg-card-hover);
}

.badge-yes {
  color: var(--success);
  font-weight: 700;
}

.badge-warn {
  color: var(--warning);
  font-weight: 700;
}

.badge-no {
  color: var(--danger);
  font-weight: 700;
}

/* 10. Accessible Educational Accordions & FAQ */
.seo-accordion {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.2s;
}

.seo-accordion[open] {
  border-color: var(--border-hover);
}

.seo-accordion summary {
  padding: 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.seo-accordion summary::after {
  content: '＋';
  font-size: 1.25rem;
  color: var(--accent-secondary);
  transition: transform 0.2s;
}

.seo-accordion[open] summary::after {
  content: '−';
}

.accordion-body {
  padding: 0 1.25rem 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
}

.accordion-body p {
  margin-bottom: 0.85rem;
}

.accordion-body p:last-child {
  margin-bottom: 0;
}

/* 11. Sticky Bar */
.sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-sticky);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  transform: translateY(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xl);
}

.sticky-bar.visible {
  transform: translateY(0);
}

.sticky-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sticky-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

.sticky-input {
  flex: 1;
  min-width: 120px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 0.45rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sticky-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.sticky-input-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-sticky-action {
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* Minimalistic Sticky Limits */
.sticky-limits-mini {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.sticky-limit-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: all 0.2s;
}

.sticky-limit-pill.safe {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.sticky-limit-pill.warning {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: pulseWarning 1.5s infinite;
}

@media (max-width: 900px) {
  .sticky-limit-pill:last-child {
    display: none;
  }
}

@media (max-width: 720px) {
  .sticky-bar-inner {
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
  }
  .sticky-limits-mini {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .sticky-limit-pill:last-child {
    display: inline-flex;
  }
}

/* 12. Footer & Legal Disclaimer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 3rem 0 2rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.trademark-disclaimer-box {
  max-width: 800px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.trademark-disclaimer-box strong {
  color: var(--text-primary);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .font-grid {
    grid-template-columns: 1fr;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .bio-templates-grid {
    grid-template-columns: 1fr;
  }
  .sim-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Floating Copy Toast Notification */
.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 90vw;
  text-align: center;
}

.copy-toast.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.copy-toast.warn {
  border: 1px solid rgba(245, 158, 11, 0.5);
}

/* ==========================================================================
   8. Discord Expansion Modules: PWA, Secrets, ANSI Studio, Symbols, Channels
   ========================================================================== */

/* PWA Install Action Button in Site Header */
.btn-pwa-install {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #5865F2, #4752C4);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.btn-pwa-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.5);
  filter: brightness(1.08);
}

.btn-pwa-install[hidden] {
  display: none !important;
}

/* Discord Secrets 1-Click Action Buttons */
.secrets-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.btn-secret-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.btn-secret-action:hover {
  background: var(--bg-card);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-secret-action.copied {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}

.btn-secret-action .secret-icon {
  font-size: 1rem;
}

/* ANSI Studio Styles */
.ansi-studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Quick Templates & Preset Shelf */
.ansi-section-block {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ansi-block-label,
.ansi-group-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.ansi-templates-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.ansi-template-btn,
.ansi-template-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ansi-template-btn:hover,
.ansi-template-chip:hover {
  background: var(--bg-secondary);
  border-color: #5865f2;
  color: #5865f2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.15);
}

.ansi-template-btn:active,
.ansi-template-chip:active {
  transform: translateY(0);
}

/* Palette Toolbars Wrapper */
.ansi-toolbars-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  background: var(--bg-card);
  padding: 1.25rem 1.35rem;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ansi-palette-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ansi-swatches-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ansi-color-chip,
.ansi-bg-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.ansi-color-chip:hover,
.ansi-bg-chip:hover {
  border-color: #5865f2;
  color: var(--text-primary);
  background: var(--bg-card);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.ansi-color-chip.active,
.ansi-bg-chip.active {
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.08);
  color: #5865f2;
  box-shadow: 0 0 0 1.5px #5865f2, 0 2px 8px rgba(88, 101, 242, 0.2);
  font-weight: 700;
}

.color-swatch,
.bg-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.bg-swatch.swatch-none {
  border: 1.5px dashed var(--text-muted);
  background: transparent;
  position: relative;
}

.ansi-format-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.ansi-styles-row {
  display: flex;
  gap: 0.5rem;
}

.btn-ansi-format {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.95rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.btn-ansi-format:hover {
  border-color: #5865f2;
  color: var(--text-primary);
  background: var(--bg-card);
  transform: translateY(-1px);
}

.btn-ansi-format.active {
  background: rgba(88, 101, 242, 0.1);
  border-color: #5865f2;
  color: #5865f2;
  font-weight: 700;
  box-shadow: 0 0 0 1.5px #5865f2;
}

.ansi-palette-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: rgba(88, 101, 242, 0.04);
  border: 1px solid rgba(88, 101, 242, 0.18);
  border-left: 3px solid #5865f2;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.81rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 0.25rem;
}

.ansi-palette-notice .notice-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.ansi-palette-notice .notice-text b {
  color: #5865f2;
}

/* Unified Authentic Discord Chat Studio Card */
.discord-msg-studio-card {
  background: #313338;
  border-radius: 14px;
  border: 1px solid #383a40;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-top: 0.5rem;
}

.discord-msg-studio-card:focus-within {
  border-color: #5865f2;
  box-shadow: 0 4px 24px rgba(88, 101, 242, 0.2);
}

.discord-studio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.15rem;
  background: #2b2d31;
  border-bottom: 1px solid #232428;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.studio-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.studio-header-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #dbdee1;
  font-family: 'JetBrains Mono', monospace;
}

.studio-theme-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  background: #1e1f22;
  color: #949ba4;
  border: 1px solid #383a40;
}

.studio-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ansi-char-counter {
  font-size: 0.78rem;
  font-weight: 600;
  color: #949ba4;
  font-family: 'JetBrains Mono', monospace;
}

.ansi-char-counter.over-limit {
  color: #ed4245;
  font-weight: 700;
}

.btn-ansi-clear-action {
  background: transparent;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 600;
  color: #949ba4;
  cursor: pointer;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.btn-ansi-clear-action:hover {
  color: #ed4245;
  background: rgba(237, 66, 69, 0.1);
  border-color: rgba(237, 66, 69, 0.3);
}

/* Discord Message Body (Live In-Place Editor) */
.discord-msg-body {
  display: flex;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
}

.discord-msg-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5865f2, #7983f5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.discord-msg-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.discord-msg-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.discord-msg-author {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f2f3f5;
}

.discord-msg-time {
  font-size: 0.75rem;
  color: #949ba4;
  font-weight: 500;
}

.discord-ansi-codebox {
  background: #2b2d31;
  border: 1px solid #1e1f22;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-top: 0.25rem;
  transition: border-color 0.2s ease;
}

.discord-ansi-codebox:focus-within {
  border-color: #5865f2;
}

.ansi-content-editor {
  min-height: 75px;
  background: transparent;
  color: #dcddde;
  border: none;
  outline: none;
  font-family: 'JetBrains Mono', Consolas, 'Segoe UI Symbol', 'Segoe UI Emoji', 'Apple Color Emoji', monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 0;
}

.ansi-content-editor:empty:before {
  content: attr(placeholder);
  color: #72767d;
  pointer-events: none;
}

/* Action Bar below Discord message */
.ansi-action-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.25rem;
  background: #2b2d31;
  border-top: 1px solid #232428;
}

.btn-copy-ansi-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #5865f2;
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.35rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.35);
}

.btn-copy-ansi-main:hover {
  background: #4752c4;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.5);
}

.btn-copy-ansi-main.copied {
  background: #57f287;
  color: #000000;
}

.btn-toggle-raw-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1e1f22;
  color: #dbdee1;
  border: 1px solid #383a40;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-toggle-raw-code:hover {
  background: #232428;
  border-color: #5865f2;
  color: #ffffff;
}

.btn-toggle-raw-code.active {
  background: #232428;
  border-color: #5865f2;
  color: #5865f2;
}

.ansi-hint-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  min-width: 260px;
}

.ansi-hint-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: #5865f2;
  white-space: nowrap;
}

.ansi-hint {
  font-size: 0.8rem;
  color: #949ba4;
}

/* Collapsible Raw ANSI Drawer */
.ansi-raw-drawer {
  padding: 1rem 1.25rem;
  background: #111214;
  border-top: 1px solid #232428;
}

.raw-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.raw-drawer-title {
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #dbdee1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.raw-drawer-badge {
  font-size: 0.72rem;
  color: #949ba4;
  background: #1e1f22;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #2b2d31;
}

.ansi-code-block {
  background: #1e1f22;
  color: #57f287;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid #2b2d31;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 150px;
  margin: 0;
}

/* Dedicated Discord Aesthetic Symbols & Kaomoji Section */
.section-symbols {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.symbols-studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.symbols-info-wrap {
  margin-top: 2rem;
}

/* Symbols & Kaomoji Hub */
.symbols-hub-wrapper {
  margin-top: 0.25rem;
}

.symbols-hub {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.symbols-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.6rem;
  border-radius: 14px;
  border: 1px solid var(--border-color);
}

.symbol-cat-tab {
  background: transparent;
  border: 1px solid transparent;
  padding: 0.5rem 0.95rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.symbol-cat-tab:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: rgba(88, 101, 242, 0.25);
  transform: translateY(-1px);
}

.symbol-cat-tab.active {
  background: rgba(88, 101, 242, 0.12);
  border-color: #5865f2;
  color: #5865f2;
  font-weight: 700;
  box-shadow: 0 0 0 1px #5865f2;
}

.symbols-content-area {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.symbol-category-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.symbol-cat-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.symbol-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 0.6rem;
}

.symbol-items-grid.wide-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.symbol-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.75rem 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  min-height: 58px;
}

.symbol-chip:hover {
  transform: translateY(-2px);
  border-color: #5865f2;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.2);
  background: var(--bg-tertiary);
}

.symbol-chip.copied {
  border-color: var(--success);
  background: var(--success-bg);
}

.symbol-char {
  font-size: 1.25rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.symbol-items-grid.wide-grid .symbol-char {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.symbol-action-hint {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
}

.symbol-chip.copied .symbol-action-hint {
  color: var(--success);
}

/* Discord Channel Styler */
.channel-styler-workspace {
  margin-top: 1rem;
}

.channel-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}

.channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.channel-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.channel-card.is-category {
  border-left: 4px solid #5865f2;
}

.channel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.channel-type-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.channel-type-badge.badge-category {
  background: #ede9fe;
  color: #6366f1;
}

.channel-char-count {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.channel-name-preview {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  word-break: break-all;
  user-select: all;
}

.btn-channel-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  margin-top: auto;
}

.btn-channel-copy:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.btn-channel-copy.copied {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

/* Responsive Module Adjustments */
@media (max-width: 768px) {
  .channel-presets-grid {
    grid-template-columns: 1fr;
  }
  .ansi-action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-copy-ansi-main {
    width: 100%;
  }
  .symbol-items-grid.wide-grid {
    grid-template-columns: 1fr;
  }
}

/* Dedicated Discord Colored Text Section & ANSI Cheat Sheet Table */
.section-colored-text {
  padding: 4.5rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.ansi-table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0 2.5rem 0;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
}

.ansi-cheat-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.ansi-cheat-table th {
  background: var(--bg-tertiary);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.ansi-cheat-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: middle;
}

.ansi-cheat-table tr:last-child td {
  border-bottom: none;
}

.ansi-cheat-table tr:hover td {
  background: var(--bg-tertiary);
}

.ansi-cheat-table code {
  background: var(--bg-tertiary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.84rem;
  color: var(--accent-primary);
  border: 1px solid var(--border-color);
}

.ansi-pill-preview {
  font-family: 'JetBrains Mono', Consolas, monospace;
  display: inline-block;
}

/* =========================================================
   STICKY FLOATING INPUT BAR
   ========================================================= */
.sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.6rem 0;
  transform: translateY(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.sticky-bar.visible {
  transform: translateY(0);
}

.sticky-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sticky-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.sticky-input {
  width: 100%;
  padding: 0.55rem 7.5rem 0.55rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sticky-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.sticky-input-actions {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-input-action {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.28rem 0.6rem;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}

.btn-input-action:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.btn-sticky-action {
  padding: 0.25rem 0.55rem;
}

.sticky-limits-mini {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.sticky-font-pill {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.sticky-limit-pill {
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.sticky-limit-pill.safe {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.sticky-limit-pill.warning {
  background: #fef9c3;
  color: #a16207;
  border-color: #fde047;
}

/* =========================================================
   PROGRESSIVE DISCLOSURE TOOLS SUMMARY BUTTON
   ========================================================= */
.tools-summary-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  user-select: none;
  list-style: none;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  transition: background 0.15s, border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 0.65rem;
}

.tools-summary-btn::-webkit-details-marker {
  display: none;
}

.tools-summary-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.tools-summary-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tools-summary-icon {
  font-size: 1rem;
  line-height: 1;
}

.tools-summary-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tools-summary-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.tools-summary-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tools-active-pill {
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  animation: pulse-pill 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pulse-pill {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.tools-chevron {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}

details[open] .tools-chevron {
  transform: rotate(180deg);
}

/* =========================================================
   EMPTY SEARCH STATE
   ========================================================= */
.empty-search-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 0.85rem;
}

.empty-search-icon {
  font-size: 3rem;
  line-height: 1;
  filter: grayscale(0.3);
  animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.empty-search-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.empty-search-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.55;
}

.empty-search-desc strong {
  color: var(--accent-primary);
}

.empty-search-actions {
  margin-top: 0.5rem;
}

.btn-empty-reset {
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-empty-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
  background: var(--accent-hover, #4752c4);
}

.btn-empty-reset:active {
  transform: translateY(0);
}

/* =========================================================
   SEARCH SHORTCUT KBD HINT
   ========================================================= */
.search-shortcut-hint {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.1rem 0.42rem;
  border-radius: 5px;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-weight: 700;
  pointer-events: none;
  line-height: 1.4;
  transition: opacity 0.2s;
}

.font-search-input:focus ~ .search-shortcut-hint,
.search-input-wrapper:focus-within .search-shortcut-hint {
  opacity: 0;
}

.font-search-input {
  padding-right: 2.8rem;
}

/* =========================================================
   MOBILE COMPACT STICKY BAR (≤640px)
   ========================================================= */
@media (max-width: 640px) {
  .sticky-bar-inner {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .sticky-limits-mini {
    display: none;
  }

  .sticky-input {
    font-size: 0.9rem;
    padding-right: 5.5rem;
  }
}

@media (max-width: 480px) {
  .sticky-bar {
    top: 58px;
  }
}



