/* ====================================================
   PROFESSIONAL REDESIGN — Font Generator Website
   Clean • Modern • Sophisticated
   Primary: Deep Indigo | Accent: Vibrant Coral
   ==================================================== */

/* ====================================================
   DESIGN TOKENS
   ==================================================== */

:root {
  /* ---- Brand Colors ---- */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;
  --brand-900: #312e81;

  /* ---- Accent (Coral) ---- */
  --accent-50:  #fff1f2;
  --accent-100: #ffe4e6;
  --accent-200: #fecdd3;
  --accent-300: #fda4af;
  --accent-400: #fb7185;
  --accent-500: #f43f5e;
  --accent-600: #e11d48;
  --accent-700: #be123c;

  /* ---- Neutrals ---- */
  --neutral-0:   #ffffff;
  --neutral-50:  #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;
  --neutral-950: #020617;

  /* ---- Semantic (Light) ---- */
  --bg:             var(--neutral-50);
  --bg-alt:         var(--neutral-100);
  --surface:        var(--neutral-0);
  --surface-raised: var(--neutral-0);
  --surface-sunken: var(--neutral-100);

  --border:       var(--neutral-200);
  --border-soft:  var(--neutral-100);
  --border-strong: var(--neutral-300);

  --text:           var(--neutral-900);
  --text-secondary: var(--neutral-600);
  --text-muted:     var(--neutral-400);
  --text-inverse:   var(--neutral-0);

  /* ---- Gradients ---- */
  --gradient-brand: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 50%, var(--brand-400) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-400) 100%);
  --gradient-hero: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-500) 40%, var(--accent-500) 100%);
  --gradient-subtle: linear-gradient(180deg, var(--neutral-50) 0%, var(--neutral-100) 100%);

  /* ---- Spacing ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* ---- Radii ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* ---- Shadows ---- */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-brand: 0 4px 14px rgba(99, 102, 241, 0.25);
  --shadow-accent: 0 4px 14px rgba(244, 63, 94, 0.25);

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --transition: all var(--duration-base) var(--ease-out);

  /* ---- Typography ---- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.8125rem;
  --text-base: 0.9375rem;
  --text-lg:   1.0625rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  --leading-tight: 1.2;
  --leading-snug:  1.4;
  --leading-base:  1.6;
  --leading-relaxed: 1.75;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.03em;
  --tracking-wider: 0.06em;
  --tracking-widest: 0.1em;
}

/* ====================================================
   DARK THEME
   ==================================================== */

:root[data-theme="dark"] {
  --bg:             var(--neutral-950);
  --bg-alt:         var(--neutral-900);
  --surface:        var(--neutral-900);
  --surface-raised: var(--neutral-800);
  --surface-sunken: var(--neutral-950);

  --border:       var(--neutral-800);
  --border-soft:  var(--neutral-800);
  --border-strong: var(--neutral-700);

  --text:           var(--neutral-50);
  --text-secondary: var(--neutral-300);
  --text-muted:     var(--neutral-500);
  --text-inverse:   var(--neutral-900);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);

  --gradient-subtle: linear-gradient(180deg, var(--neutral-950) 0%, var(--neutral-900) 100%);
}

/* ====================================================
   RESET & BASE
   ==================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  text-rendering: optimizeLegibility;
}

img, svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ====================================================
   LAYOUT
   ==================================================== */

.cnt {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-1);
}

/* ====================================================
   HEADER
   ==================================================== */

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-6);
}

.brand-link a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-tight);
  transition: opacity var(--duration-fast) var(--ease-out);
}

.brand-link a:hover {
  opacity: 0.8;
}

.brand-link img {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 2px var(--brand-500), 0 0 0 4px var(--brand-100);
}

:root[data-theme="dark"] .brand-link img {
  box-shadow: 0 0 0 2px var(--brand-500), 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
}

/* ---- Theme Toggle ---- */
#themeToggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: var(--transition);
}

#themeToggle:hover {
  background: var(--brand-50);
  color: var(--brand-600);
  border-color: var(--brand-200);
}

:root[data-theme="dark"] #themeToggle:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--brand-700);
  color: var(--brand-300);
}

#themeToggle .theme-icon {
  font-size: 1rem;
  line-height: 1;
}

/* ---- Desktop Nav ---- */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-desktop > a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
}

.nav-desktop > a:hover {
  color: var(--brand-600);
  background: var(--brand-50);
}

:root[data-theme="dark"] .nav-desktop > a:hover {
  color: var(--brand-300);
  background: rgba(99, 102, 241, 0.12);
}

.nav-desktop > a.active {
  color: var(--brand-600);
  background: var(--brand-50);
}

:root[data-theme="dark"] .nav-desktop > a.active {
  color: var(--brand-300);
  background: rgba(99, 102, 241, 0.12);
}

/* ---- Dropdown ---- */
.more-wrapper {
  position: relative;
}

.more-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.more-btn:hover,
.more-btn[aria-expanded="true"] {
  background: var(--brand-50);
  color: var(--brand-600);
  border-color: var(--brand-200);
}

:root[data-theme="dark"] .more-btn:hover,
:root[data-theme="dark"] .more-btn[aria-expanded="true"] {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--brand-700);
  color: var(--brand-300);
}

.more-btn svg {
  width: 14px;
  height: 14px;
  transition: transform var(--duration-base) var(--ease-out);
}

.more-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  box-shadow: var(--shadow-xl);
  display: none;
  flex-direction: column;
  z-index: 1000;
  animation: dropdownIn var(--duration-base) var(--ease-out);
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.more-wrapper:hover .dropdown,
.more-btn[aria-expanded="true"] + .dropdown {
  display: flex;
}

.dropdown a {
  color: var(--text-secondary);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
}

.dropdown a:hover {
  background: var(--brand-50);
  color: var(--brand-600);
}

:root[data-theme="dark"] .dropdown a:hover {
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand-300);
}

/* ---- Mobile Menu ---- */
.hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  color: var(--text);
  transition: var(--transition);
}

.hamburger:hover {
  background: var(--surface-sunken);
}

.hamburger svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.hamburger.active line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
  transform-origin: center;
}

.hamburger.active line:nth-child(2) {
  opacity: 0;
}

.hamburger.active line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  transform-origin: center;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  max-height: 0;
  transition: max-height var(--duration-slow) var(--ease-out);
  overflow: hidden;
}

.mobile-menu.active {
  display: flex;
  max-height: 500px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: var(--space-3) var(--space-6);
}

.mobile-nav a {
  color: var(--text-secondary);
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: var(--transition);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--brand-600);
  padding-left: var(--space-3);
}

:root[data-theme="dark"] .mobile-nav a:hover,
:root[data-theme="dark"] .mobile-nav a.active {
  color: var(--brand-300);
}

/* ====================================================
   HERO SECTION
   ==================================================== */

.head-info {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.head-info::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.head-info .cnt {
  max-width: 780px;
  position: relative;
  z-index: 1;
}

.head-info h1 {
  font-size: var(--text-5xl);
  font-weight: 800;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-5);
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.head-info h1 em {
  font-style: normal;
  color: var(--accent-500);
  font-weight: 800;
}

.head-info p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin: 0 auto;
  max-width: 540px;
}

/* ====================================================
   INPUT SECTION
   ==================================================== */

.input-sec {
  position: sticky;
  top: 0px;
  z-index: 30;
  padding: var(--space-4) var(--space-6);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.input-info {
  display: block;
  text-align: center;
  padding: var(--space-2) 0;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--text-muted);
}

.input {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-1);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.input:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}

.input:focus-within {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), var(--shadow-md);
}

#inputText {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: var(--text-lg);
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-2);
  font-weight: 500;
  min-width: 0;
  text-align: center;
  font-family: inherit;
  letter-spacing: var(--tracking-tight);
}

#inputText::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

#inputCount {
  position: absolute;
  left: var(--space-5);
  bottom: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.input button {
  position: absolute;
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.input button:hover {
  background: var(--surface-sunken);
  color: var(--brand-600);
}

#bioquotes {
  position: absolute;
  right: var(--space-2);
  width: auto;
  height: auto;
  bottom: var(--space-2);
  background: var(--gradient-accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 2px 5px;
  font-size: var(--text-xs);
  font-weight: 700;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  box-shadow: var(--shadow-accent);
}

#bioquotes:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.35);
}

button.mood-scroll-btn {
  border-radius: var(--radius-lg);
  border: none;
  padding: 8px 12px;
}

button#clearInput {
      top: 0px;
    right: 5px;
}

/* ====================================================
   FONT RESULTS SECTION
   ==================================================== */

.font-results {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-1) 0;
}

/* ---- Sidebar Category Filter ---- */
.font-category {
  order: 1;
  flex: 0 0 180px;
  position: sticky;
  top: 180px;
  align-self: flex-start;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}

.font-category::-webkit-scrollbar {
  width: 4px;
}

.font-category::-webkit-scrollbar-track {
  background: transparent;
}

.font-category::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}

.font-menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.font-menu button {
  display: block;
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-secondary);
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: var(--leading-snug);
  transition: var(--transition);
  position: relative;
}

.font-menu button b {
  display: block;
  font-size: 1.15rem;
  line-height: 1.2;
  margin-bottom: var(--space-1);
  color: var(--text);
  font-weight: 700;
  transition: color var(--duration-fast) var(--ease-out);
}

.font-menu button:hover {
  border-color: var(--brand-300);
  background: var(--brand-50);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

:root[data-theme="dark"] .font-menu button:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--brand-600);
}

.font-menu button:hover b,
.font-menu button.active b {
  color: var(--brand-600);
}

:root[data-theme="dark"] .font-menu button:hover b,
:root[data-theme="dark"] .font-menu button.active b {
  color: var(--brand-300);
}

.font-menu button.active {
  background: var(--brand-50);
  border-color: var(--brand-500);
  box-shadow: var(--shadow-sm);
}

:root[data-theme="dark"] .font-menu button.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--brand-500);
}

/* ---- Top Filter Menu ---- */
.font-menu-top {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  overflow-x: auto;
  padding: var(--space-1) 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.font-menu-top::-webkit-scrollbar {
  display: none;
}

.font-menu-top button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
}

.font-menu-top button b {
  font-size: 1rem;
  line-height: 1;
  color: var(--text);
  font-weight: 700;
  transition: color var(--duration-fast) var(--ease-out);
}

.font-menu-top button:hover {
  border-color: var(--brand-300);
  background: var(--brand-50);
  color: var(--brand-600);
}

:root[data-theme="dark"] .font-menu-top button:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--brand-600);
  color: var(--brand-300);
}

.font-menu-top button:hover b,
.font-menu-top button.active b {
  color: inherit;
}

.font-menu-top button.active {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: white;
  box-shadow: var(--shadow-brand);
}

.font-menu-top button.active b {
  color: white;
}

button.mood-category.active {
  background: var(--brand-600);
  color: white;
  border-color: var(--brand-600);
  box-shadow: var(--shadow-brand);
}

/* ---- Font Results Display ---- */
.fontslist-sec {
  order: 2;
  flex: 1;
  min-width: 0;
}

.fontslist-sec > h4 {
  margin: 0 0 var(--space-5);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text);
  letter-spacing: var(--tracking-tight);
}

.fontslist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
  padding: 0 0 var(--space-6);
}

/* ---- Font Cards ---- */
.fontslist p,
.bio-list p {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-4) var(--space-10);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.bio-list p {
  opacity: 1;
  transform: none;
}

i.font-text {
  font-style: normal;
}

.fontslist p:hover,
.bio-list p:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

:root[data-theme="dark"] .fontslist p:hover,
:root[data-theme="dark"] .bio-list p:hover {
  border-color: var(--brand-600);
}

.fontslist p.font-item-visible {
  opacity: 1;
  transform: translateY(0);
}

.fontslist p b,
.bio-list p b {
  display: block;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: var(--leading-base);
  color: var(--text);
  margin: var(--space-3) 0 0 0;
  word-break: break-all;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', sans-serif;
  
}

.fontslist p[data-font-id="aestheticFonts"] b,
.aesthetic {
  font-family: Arial, Helvetica, sans-serif;
}

.fontslist p:hover b {
  color: var(--brand-600);
}

:root[data-theme="dark"] .fontslist p:hover b {
  color: var(--brand-300);
}

.fontslist p span.font-label {
    position: absolute;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    font-weight: 600;
    right: 10px;
    top: 5px;
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: white;
    padding: 1px 5px;
    border-radius: 10px;
    font-size: 10px;
}

.fontslist p div,
.bio-list button {
  position: absolute;
  bottom: var(--space-2);
  right: var(--space-2);
  display: flex;
  gap: var(--space-1);
}

.fontslist p button,
.bio-list button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 6px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  transition: var(--transition);
}

.fontslist p button:nth-child(2),
.styles-list p button {
  font-family: 'Material Symbols Outlined', sans-serif;
}

.fontslist p button:hover {
  background: var(--brand-50);
  border-color: var(--brand-200);
  color: var(--brand-600);
}

:root[data-theme="dark"] .fontslist p button:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--brand-700);
  color: var(--brand-300);
}

.styles-list p {
  opacity: 1;
}

/* ====================================================
   LOAD MORE
   ==================================================== */

#loadMoreContainer {
  width: 100%;
  text-align: center;
  margin-top: var(--space-8);
  padding: var(--space-4) 0;
  grid-column: 1 / -1;
}

#loadMoreContainer button,
.mood-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: var(--gradient-brand);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  padding: 14px 40px;
  font-size: var(--text-sm);
  font-weight: 700;
  transition: var(--transition);
  min-width: 100%;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-brand);
}

#loadMoreContainer button:hover,
.mood-load-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
  filter: brightness(1.05);
}

#loadMoreContainer button:active,
.mood-load-more:active {
  transform: translateY(0);
}

/* ====================================================
   MODAL / OVERLAY
   ==================================================== */

.mood-overlay,
.bio-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  z-index: 999;
  cursor: pointer;
  animation: fadeIn var(--duration-base) var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mood-container,
.bio-container {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 720px;
  width: 100%;
  height: 80vh;
  z-index: 10000;
  background: var(--surface);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  padding: var(--space-6);
  display: flex;
  gap: var(--space-4);
  box-shadow: var(--shadow-xl);
  animation: slideUp var(--duration-slow) var(--ease-out);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.mood-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.1rem;
  transition: var(--transition);
  line-height: 1;
  font-weight: 700;
}

.mood-close:hover {
  background: var(--accent-500);
  color: white;
  border-color: var(--accent-500);
  transform: rotate(90deg);
}

.mood-styles,
.bio-list {
  flex: 1;
  overflow-y: auto;
  max-height: 100%;
  padding-right: var(--space-2);
}

.mood-styles > h3 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
}

.mood-menu-wrapper,
.bio-menu {
  width: 100px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-10);
  flex-shrink: 0;
}

.mood-menu-wrapper > h3 {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
}

.mood-categories {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mood-categories button,
.mood-categories a {
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sunken);
  color: var(--text-secondary);
  display: flex;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 700;
  transition: var(--transition);
  position: relative;
  flex-direction: column;
  text-decoration: none;
  touch-action: manipulation;
}

.mood-categories button:hover,
.mood-categories a:hover {
  color: white;
  background: var(--brand-600);
  border-color: var(--brand-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ====================================================
   FOOTER
   ==================================================== */

footer {
  background: var(--neutral-900);
  color: var(--neutral-300);
  padding: var(--space-10) var(--space-6);
  text-align: center;
  border-top: 1px solid var(--neutral-800);
}

:root[data-theme="dark"] footer {
  background: var(--neutral-950);
  border-top-color: var(--neutral-800);
}

.foot-menu {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

.foot-menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 18px;
  background: var(--gradient-brand);;
  color: var(--neutral-200);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  transition: var(--transition);
  font-size: var(--text-sm);
  font-weight: 600;
}

.foot-menu a:hover {
  background: var(--brand-600);
  color: white;
  border-color: var(--brand-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

/* ====================================================
   CONTENT SECTION (Info/About)
   ==================================================== */

.site-info {
  max-width: 820px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
  color: var(--text);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.site-info h2 {
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: var(--space-10) 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--brand-100);
  color: var(--text);
}

:root[data-theme="dark"] .site-info h2 {
  border-bottom-color: var(--brand-900);
}

.site-info h2:first-child {
  margin-top: 0;
}

.site-info h3 {
  font-size: var(--text-2xl);
  font-weight: 800;
  line-height: var(--leading-snug);
  margin: var(--space-8) 0 var(--space-3);
  color: var(--brand-600);
  letter-spacing: var(--tracking-tight);
}

:root[data-theme="dark"] .site-info h3 {
  color: var(--brand-300);
}

.site-info h4 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin: var(--space-6) 0 var(--space-3);
  padding-left: var(--space-3);
  border-left: 3px solid var(--accent-500);
  color: var(--text);
}

.site-info h5 {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  margin: var(--space-6) 0 var(--space-3);
  color: var(--text-muted);
}

.site-info p {
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

.site-info strong,
.site-info b {
  color: var(--text);
  font-weight: 700;
}

.site-info em {
  color: var(--accent-500);
  font-style: italic;
}

.site-info ul {
  list-style: none;
  margin: var(--space-4) 0 var(--space-5);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site-info ul li {
  position: relative;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  word-break: break-word;
  transition: var(--transition);
}

.site-info ul li:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.site-info ul li::before {
  content: '';
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--brand-500);
}

.site-info ul li:nth-child(1)::before { background: var(--brand-500); }
.site-info ul li:nth-child(2)::before { background: var(--accent-500); }
.site-info ul li:nth-child(3)::before { background: #10b981; }
.site-info ul li:nth-child(4)::before { background: #f59e0b; }
.site-info ul li:nth-child(5)::before { background: #8b5cf6; }

.site-info a {
  color: var(--brand-600);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.site-info a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-600);
  transition: width var(--duration-base) var(--ease-out);
}

.site-info a:hover::after {
  width: 100%;
}

:root[data-theme="dark"] .site-info a {
  color: var(--brand-300);
}

:root[data-theme="dark"] .site-info a::after {
  background: var(--brand-300);
}

/* ====================================================
   COPY NOTIFICATION
   ==================================================== */

.copy-message {
  position: absolute;
  inset: 0;
  background: var(--surface);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--brand-600);
}

.copy-message.show {
  opacity: 1;
}

.copy-message::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: var(--space-2);
  background: var(--brand-600);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

/* ====================================================
   RESPONSIVE DESIGN
   ==================================================== */

@media (max-width: 768px) {
  .cnt {
    padding: 0 var(--space-1);
  }

  .site-info img {
    width: 100%;
  }

  .header-flex {
    height: 60px;
    gap: var(--space-3);
  }

  .nav-desktop {
    display: none;
  }

  .hamburger {
    display: block;
  }


  .head-info h1 {
    font-size: var(--text-3xl);
  }

  .head-info p {
    font-size: var(--text-base);
  }

  .font-category {
    flex: 0 0 82px;
    padding: var(--space-2);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .font-menu button {
    padding: var(--space-2);
    font-size: var(--text-xs);
  }

  .font-menu button b {
    font-size: 1rem;
  }

  .fontslist-sec {
    order: 1;
  }

  .fontslist {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .site-info {
    padding: var(--space-8) var(--space-4);
  }

  .site-info h2 {
    font-size: var(--text-2xl);
  }

  .site-info h3 {
    font-size: var(--text-xl);
  }

  .mood-container,
  .bio-container {
    left: 0;
    transform: none;
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    gap: var(--space-2);
    padding: var(--space-4);
    height: 85vh;
  }

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

  .mood-menu-wrapper,
  .bio-menu {
    width: 80px;
  }

  .foot-menu {
    gap: var(--space-2);
  }

  .foot-menu a {
    font-size: var(--text-xs);
    padding: 8px 14px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .fontslist {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ====================================================
   ACCESSIBILITY & INTERACTIONS
   ==================================================== */

*:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--brand-500);
  color: white;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-400);
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- High Contrast ---- */
@media (prefers-contrast: high) {
  .fontslist p,
  .bio-list p {
    border-width: 2px;
  }

  .font-menu button {
    border-width: 2px;
  }

  .input {
    border-width: 2px;
  }
}

/* ---- Print ---- */
@media print {
  header,
  .input-sec,
  .font-menu-top,
  .font-category,
  #loadMoreContainer,
  footer,
  .mood-overlay,
  .bio-overlay,
  .mood-container,
  .bio-container {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .head-info {
    background: white;
    color: black;
    padding: 0 0 20px;
  }

  .head-info h1 {
    -webkit-text-fill-color: black;
    color: black;
  }

  .fontslist {
    display: block;
  }

  .fontslist p {
    break-inside: avoid;
    border: 1px solid #ccc;
    box-shadow: none;
    opacity: 1;
    transform: none;
    margin-bottom: 12px;
    padding: 12px;
  }

  .fontslist p button,
  .copy-message {
    display: none !important;
  }

  .site-info {
    padding: 20px 0;
  }
}