@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=DM+Serif+Display:ital@0;1&family=JetBrains+Mono:wght@400;500&display=swap');
:root {
  --graphite-950: #0d0f12;
  --graphite-900: #141720;
  --graphite-800: #1e2230;
  --graphite-700: #2c3244;
  --graphite-600: #3d4558;
  --graphite-500: #556070;
  --graphite-400: #7a8494;
  --graphite-300: #a3adb8;
  --graphite-200: #cdd3da;
  --graphite-100: #e8ecf0;
  --graphite-50:  #f4f6f8;
  --cyan-600: #0891b2;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --cyan-300: #67e8f9;
  --cyan-200: #a5f3fc;
  --cyan-100: #cffafe;
  --cyan-50:  #ecfeff;
  --bg:           #f7f9fb;
  --bg-alt:       #eef1f5;
  --surface:      #ffffff;
  --surface-2:    #f4f6f9;
  --surface-3:    #edf0f4;
  --ac:           #06b6d4;
  --ac-dark:      #0891b2;
  --ac-light:     #22d3ee;
  --ac-pale:      #ecfeff;
  --ac-glow:      rgba(6, 182, 212, 0.15);
  --ac-ring:      rgba(6, 182, 212, 0.25);
  --text-primary:   #0f1520;
  --text-secondary: #3d4a5c;
  --text-muted:     #6b7685;
  --text-ghost:     #a0aab4;
  --border:       rgba(15, 21, 32, 0.08);
  --border-soft:  rgba(15, 21, 32, 0.05);
  --border-mid:   rgba(15, 21, 32, 0.12);
  --border-strong:rgba(15, 21, 32, 0.20);
  --border-ac:    rgba(6, 182, 212, 0.30);
  --shadow-xs: 0 1px 2px rgba(15,21,32,0.05);
  --shadow-sm: 0 2px 8px rgba(15,21,32,0.07), 0 1px 3px rgba(15,21,32,0.04);
  --shadow-md: 0 6px 24px rgba(15,21,32,0.09), 0 2px 8px rgba(15,21,32,0.05);
  --shadow-lg: 0 16px 48px rgba(15,21,32,0.11), 0 4px 16px rgba(15,21,32,0.07);
  --shadow-xl: 0 28px 72px rgba(15,21,32,0.13), 0 8px 24px rgba(15,21,32,0.08);
  --shadow-ac: 0 4px 20px rgba(6,182,212,0.28), 0 1px 6px rgba(6,182,212,0.16);
  --shadow-in: inset 0 1px 2px rgba(15,21,32,0.06);
  --shadow-card: 0 1px 1px rgba(15,21,32,0.03), 0 3px 12px rgba(15,21,32,0.06);
  --grad-header:  linear-gradient(135deg, #0d0f12 0%, #1a1f2e 50%, #0f1825 100%);
  --grad-ac:      linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
  --grad-ac-soft: linear-gradient(135deg, #ecfeff 0%, #f0fdff 100%);
  --grad-bg:      radial-gradient(ellipse at 20% 50%, rgba(6,182,212,0.04) 0%, transparent 60%),
                  radial-gradient(ellipse at 80% 10%, rgba(34,211,238,0.03) 0%, transparent 50%);
  --grad-card-top:linear-gradient(to bottom, rgba(6,182,212,0.04), transparent);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Cascadia Code', monospace;
  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --radius-xl:   28px;
  --radius-pill: 999px;
  --maxw: 1200px;
  --ease-out:    cubic-bezier(0.16, 1, 0.30, 1);
  --ease-spring: cubic-bezier(0.34, 1.46, 0.64, 1);
}
.dark {
  --bg:           #0d0f14;
  --bg-alt:       #131720;
  --surface:      #181d28;
  --surface-2:    #1e2434;
  --surface-3:    #252c3e;
  --text-primary:   #e8edf4;
  --text-secondary: #9aa5b4;
  --text-muted:     #5c6878;
  --text-ghost:     #3a4252;
  --border:       rgba(255,255,255,0.06);
  --border-soft:  rgba(255,255,255,0.04);
  --border-mid:   rgba(255,255,255,0.09);
  --border-strong:rgba(255,255,255,0.14);
  --border-ac:    rgba(6,182,212,0.25);
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.25);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.35), 0 1px 3px rgba(0,0,0,0.20);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.28);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.55), 0 4px 16px rgba(0,0,0,0.35);
  --shadow-xl: 0 28px 72px rgba(0,0,0,0.65), 0 8px 24px rgba(0,0,0,0.42);
  --shadow-card: 0 1px 1px rgba(0,0,0,0.20), 0 3px 12px rgba(0,0,0,0.30);
  --ac-pale: rgba(6,182,212,0.10);
  --grad-bg: radial-gradient(ellipse at 20% 50%, rgba(6,182,212,0.06) 0%, transparent 60%),
             radial-gradient(ellipse at 80% 10%, rgba(34,211,238,0.04) 0%, transparent 50%);
}
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html, body { height: 100%; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
*, *::before, *::after {
  transition:
    background-color 0.20s ease,
    border-color 0.20s ease,
    color 0.14s ease,
    box-shadow 0.20s ease,
    opacity 0.14s ease;
}
.loader, .loader * { transition: none !important; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg);
  background-image: var(--grad-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 100px;
}
h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0;
}
h2 {
  font-family: var(--font-body);
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h3 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text-secondary);
}
header {
  background: var(--grad-header);
  position: relative;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 4px 32px rgba(0,0,0,0.28);
}
header::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(6,182,212,0.30) 20%,
    rgba(34,211,238,0.70) 50%,
    rgba(6,182,212,0.30) 80%,
    transparent 100%
  );
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}
header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  height: 60px;
}
header a {
  color: rgba(232,237,244,0.45);
  padding: 6px 14px;
  font-size: 0.70rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.16s, background 0.16s;
}
header a:hover {
  color: rgba(232,237,244,0.90);
  background: rgba(255,255,255,0.07);
}
.entry-header {
  width: 100%;
  text-align: center;
  padding: 14px 0 6px;
}
.entry-header p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}
#themeToggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(34,211,238,0.20);
  background: rgba(6,182,212,0.08);
  backdrop-filter: blur(8px);
  color: rgba(232,237,244,0.60);
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.20s var(--ease-out);
}
#themeToggle:hover {
  background: rgba(6,182,212,0.18);
  border-color: rgba(34,211,238,0.40);
  color: var(--cyan-300);
  box-shadow: 0 2px 16px rgba(6,182,212,0.20);
}
#themeToggle .icon-sun,
#themeToggle .icon-moon  { font-size: 13px; line-height: 1; }
#themeToggle .icon-moon  { display: inline; }
#themeToggle .icon-sun   { display: none; }
#themeToggle .label-dark { display: inline; }
#themeToggle .label-light{ display: none; }
.dark #themeToggle .icon-moon  { display: none; }
.dark #themeToggle .icon-sun   { display: inline; }
.dark #themeToggle .label-dark { display: none; }
.dark #themeToggle .label-light{ display: inline; }
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}
#topMenu {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
#topMenu::-webkit-scrollbar { display: none; }
#topMenu a {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-mid);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
  transition: all 0.18s var(--ease-out);
}
#topMenu a:hover {
  color: var(--ac-dark);
  background: var(--ac-pale);
  border-color: var(--border-ac);
  transform: translateY(-1px);
  box-shadow: var(--shadow-ac);
}
#topMenu a.active {
  color: #fff;
  background: var(--grad-ac);
  border-color: transparent;
  box-shadow: var(--shadow-ac);
}
#topMenu h3 {
  font-size: 0.56rem;
  font-weight: 700;
  color: var(--text-ghost);
  text-transform: uppercase;
  letter-spacing: 0.20em;
  margin: 0 4px;
  white-space: nowrap;
}
.dark #topMenu a {
  background: var(--surface);
  border-color: var(--border-mid);
  color: var(--text-muted);
}
.dark #topMenu a:hover {
  color: var(--ac-light);
  background: var(--ac-pale);
  border-color: var(--border-ac);
}
.dark #topMenu a.active {
  color: #fff;
  background: var(--grad-ac);
  border-color: transparent;
}
.input-section {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 12px 0 14px;
  gap: 10px;
  align-items: center;
  background: rgba(247,249,251,0.90);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-bottom: 1px solid var(--border);
  margin-left: -28px;
  margin-right: -28px;
  padding-left: 28px;
  padding-right: 28px;
}
.input-section div {
  width: 100%;
  position: relative;
}
.input-section input {
  width: 100%;
  padding: 13px 50px 13px 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-mid);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 400;
  color: var(--text-primary);
  outline: none;
  box-shadow: var(--shadow-sm), var(--shadow-in);
  letter-spacing: 0.01em;
  transition: border-color 0.20s, box-shadow 0.20s, transform 0.20s var(--ease-out);
}
.input-section input::placeholder {
  color: var(--text-ghost);
}
.input-section input:focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 4px var(--ac-ring), var(--shadow-sm);
  transform: translateY(-1px);
}
#input-count {
  position: absolute;
  right: 22px;
  bottom: 3px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-ghost);
  letter-spacing: 0.06em;
}
.clear-overlay {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  z-index: 10;
  transition: color 0.16s, background 0.16s;
}
.clear-overlay:hover {
  color: var(--ac-dark);
  background: var(--ac-pale);
}
.dark .input-section {
  background: rgba(13,15,20,0.88);
  border-color: var(--border);
}
.dark .input-section input {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border-mid);
}
.dark .input-section input:focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 4px rgba(6,182,212,0.18), var(--shadow-sm);
}
button, #othertools a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  background: transparent;
  font-size: 16px;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-body);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 26px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  background: var(--grad-ac);
  color: #fff;
  box-shadow: var(--shadow-ac);
  white-space: nowrap;
  transition: transform 0.20s var(--ease-spring), box-shadow 0.20s, opacity 0.16s;
}
.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 32px rgba(6,182,212,0.38), 0 3px 10px rgba(6,182,212,0.22);
}
.btn:active { transform: scale(0.97); }
.btn.secondary {
  background: var(--surface);
  color: var(--text-secondary);
  border-color: var(--border-mid);
  box-shadow: var(--shadow-xs);
}
.btn.secondary:hover {
  border-color: var(--ac);
  color: var(--ac-dark);
  background: var(--ac-pale);
  box-shadow: 0 3px 12px var(--ac-glow);
}
button.btn.closeit {
  background: #1a0a0a;
  color: #f4a0a0;
  border-color: rgba(244,160,160,0.20);
}
button#menu {
  font-size: 1.1rem;
  height: 40px;
  width: 40px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-mid);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: var(--text-secondary);
  transition: all 0.18s var(--ease-out);
}
button#menu:hover {
  border-color: var(--border-ac);
  background: var(--ac-pale);
  color: var(--ac-dark);
  box-shadow: 0 3px 12px var(--ac-glow);
}
.dark .btn { color: #fff; }
.dark .btn.secondary {
  background: var(--surface);
  color: var(--text-secondary);
  border-color: var(--border-mid);
}
.dark .btn.secondary:hover {
  background: var(--ac-pale);
  color: var(--ac-light);
  border-color: var(--border-ac);
}
.dark button#menu {
  background: var(--surface);
  border-color: var(--border-mid);
  color: var(--text-secondary);
}
.dark button#menu:hover {
  background: var(--ac-pale);
  border-color: var(--border-ac);
  color: var(--ac-light);
}
#othertools a {
  padding: 8px 15px;
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid var(--border-soft);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s var(--ease-out);
}
#othertools a:hover {
  background: var(--grad-ac);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: var(--shadow-ac);
}
.dark #othertools a {
  background: var(--surface);
  color: var(--text-secondary);
  border-color: var(--border-soft);
}
.dark #othertools a:hover {
  background: var(--grad-ac);
  color: #fff;
  border-color: transparent;
}
svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
#randomcloud {
  text-align: center;
  width: 100%;
  overflow: auto;
  scrollbar-width: none;
}
#randomcloud::-webkit-scrollbar { display: none; }
#randomcloud li {
  background: transparent;
  border: none;
  box-shadow: none;
}
#randomcloud p {
  color: var(--text-secondary);
  background: transparent;
  text-align: center;
  border: none;
  font-size: 26px !important;
  padding: 10px 0 0;
  margin: 0;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color 0.18s, transform 0.22s var(--ease-spring);
}
#randomcloud p:hover {
  color: var(--ac);
  transform: scale(1.12);
}
#randombutton {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: var(--radius-pill);
  padding: 13px 32px;
  margin-top: 14px;
  background: var(--grad-ac);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.08rem;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-ac);
  transition: transform 0.22s var(--ease-spring), box-shadow 0.22s;
}
#randombutton:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 40px rgba(6,182,212,0.40);
}
.font-size-controller {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
  padding: 10px 0;
}
.font-size-controller label {
  font-size: 0.60rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.font-size-controller input[type="range"] {
  width: 190px;
  height: 3px;
  background: linear-gradient(to right, var(--ac), var(--ac-light));
  border-radius: var(--radius-pill);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  border: none;
}
.font-size-controller input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--surface);
  border: 2px solid var(--ac);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(6,182,212,0.25);
  cursor: grab;
  transition: transform 0.14s var(--ease-spring), box-shadow 0.14s;
}
.font-size-controller input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.30);
  box-shadow: 0 3px 14px rgba(6,182,212,0.35);
}
#results { width: 100%; }
.grid ul {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
}
.coolfontlist li {
  display: flex;
  align-items: stretch;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition:
    transform 0.22s var(--ease-spring),
    box-shadow 0.22s,
    border-color 0.18s;
}
.coolfontlist li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-ac);
  opacity: 0;
  transition: opacity 0.20s;
}
.coolfontlist li:hover {
  border-color: var(--border-ac);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(6,182,212,0.15), 0 6px 28px var(--ac-glow);
}
.coolfontlist li:hover::before { opacity: 1; }
.coolfontlist li p {
  background: transparent;
  padding: 16px 0 28px 16px;
  margin: 0;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  text-align: left;
  width: 100%;
  position: relative;
  white-space: normal;
  word-break: break-word;
  font-family: var(--font-body);
  overflow: hidden;
  border: none;
  line-height: 1.55;
  transition: background 0.16s;
}
.coolfontlist li p:hover,
.coolfontlist li p:focus {
  outline: none;
  background: var(--surface-2);
}
.coolfontlist li i,
#flourishList li i {
  position: absolute;
  bottom: 6px;
  left: 16px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-ghost);
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-style: normal;
  font-family: var(--font-body);
}
.coolfontlist li button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  padding: 8px 12px 8px 10px;
  gap: 4px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: none;
  border-left: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--font-body);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: background 0.16s, color 0.16s;
}
.coolfontlist li button:hover {
  background: var(--grad-ac);
  color: #fff;
}
.dark .coolfontlist li {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}
.dark .coolfontlist li:hover {
  border-color: var(--border-ac);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(6,182,212,0.14), 0 6px 28px rgba(6,182,212,0.14);
}
.dark .coolfontlist li p {
  background: var(--surface);
  color: var(--text-primary);
}
.dark .coolfontlist li p:hover,
.dark .coolfontlist li p:focus { background: var(--surface-2); }
.dark .coolfontlist li button {
  background: var(--surface-2);
  color: var(--text-muted);
  border-color: var(--border-soft);
}
.dark .coolfontlist li button:hover {
  background: var(--grad-ac);
  color: #fff;
}
.coolfontlist {
  margin-bottom: 32px;
}
.coolfontlist h2 {
  color: var(--text-muted);
  margin-bottom: 12px;
  font-size: 0.64rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.coolfontlist h2::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border-mid), transparent);
}
.buttons {
  position: fixed;
  right: 18px;
  bottom: 80px;
  z-index: 99;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
}
.buttons button {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-mid);
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.20s var(--ease-spring);
}
.buttons button:hover {
  background: var(--grad-ac);
  color: #fff;
  border-color: transparent;
  transform: scale(1.08) translateY(-2px);
  box-shadow: var(--shadow-ac);
}
#bulbBtn svg { stroke: var(--ac); }
#bulbBtn:hover svg { stroke: #fff; }
.dark .buttons button {
  background: var(--surface-2);
  color: var(--text-secondary);
  border-color: var(--border-mid);
}
.dark .buttons button:hover {
  background: var(--grad-ac);
  color: #fff;
  border-color: transparent;
}
.f-m {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border-mid);
  box-shadow: -12px 0 60px rgba(15,21,32,0.14);
  z-index: 9999;
  display: none;
  overflow-y: auto;
  padding: 24px 20px;
}
.floatmenu h3 {
  color: var(--text-ghost);
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.20em;
  font-weight: 700;
  margin-bottom: 8px;
}
.floatmenu a,
.right-menu a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  margin: 3px;
  font-family: var(--font-body);
  white-space: nowrap;
  transition: all 0.16s var(--ease-out);
}
.floatmenu a:hover,
.right-menu a:hover {
  color: var(--ac-dark);
  background: var(--ac-pale);
  border-color: var(--border-ac);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px var(--ac-glow);
}
.dark .f-m {
  background: var(--surface);
  border-color: var(--border-mid);
  box-shadow: -12px 0 60px rgba(0,0,0,0.44);
}
.dark .floatmenu a,
.dark .right-menu a {
  background: var(--surface-2);
  color: var(--text-secondary);
  border-color: var(--border-soft);
}
.dark .floatmenu a:hover,
.dark .right-menu a:hover {
  background: var(--ac-pale);
  color: var(--ac-light);
  border-color: var(--border-ac);
}
#fMN { overflow: auto; }
.fAr { display: none; }
#menu { color: var(--text-secondary); }
.close-button {
  position: fixed;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 16px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  z-index: 10000;
  padding: 0;
  transition: all 0.16s var(--ease-out);
}
.close-button:hover {
  border-color: var(--border-ac);
  background: var(--ac-pale);
  color: var(--ac-dark);
  box-shadow: 0 3px 12px var(--ac-glow);
}
.dark .close-button {
  background: var(--surface);
  border-color: var(--border-mid);
  color: var(--text-secondary);
}
.dark .close-button:hover {
  background: var(--ac-pale);
  color: var(--ac-light);
  border-color: var(--border-ac);
}
.copied {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  position: fixed;
  top: 12%;
  right: 0;
  z-index: 9999;
  width: 210px;
  background: var(--graphite-900);
  color: var(--cyan-300);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  border: 1px solid rgba(34,211,238,0.20);
  border-right: none;
  box-shadow: -8px 8px 40px rgba(6,182,212,0.18);
  animation: slideIn 0.26s var(--ease-spring);
}
@keyframes slideIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}
.copied textarea {
  background: transparent;
  border: none;
  color: rgba(34,211,238,0.65);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  resize: none;
  outline: none;
  padding: 6px;
}
.copied-btn {
  position: absolute;
  top: 8px;
  left: 10px;
  background: var(--grad-ac);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 0.62rem;
  font-weight: 700;
  border: none;
  cursor: default;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(6,182,212,0.28);
}
.loader {
  width: 32px;
  height: 32px;
  border: 2px solid var(--surface-3);
  border-top-color: var(--ac);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.page-load-status,
.aryapage {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 24px 0;
}
.loadmore {
  text-align: center;
  padding: 16px 0;
}
.flourish-popup {
  position: fixed;
  inset: 0;
  background: rgba(13,15,20,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.flourish-popup.hidden { display: none; }
.popup-box {
  background: var(--surface);
  width: 92%;
  max-width: 460px;
  max-height: 74vh;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--border-mid);
  animation: popIn 0.26s var(--ease-spring);
}
.popup-box::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--grad-ac);
  flex-shrink: 0;
}
@keyframes popIn {
  from { transform: scale(0.93) translateY(16px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}
.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 4px 18px;
}
.popup-header h3 {
  font-family: var(--font-display);
  font-size: 1.10rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  padding: 12px 0;
  margin: 0;
}
.popup-header button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 12px;
  border-radius: var(--radius-sm);
  transition: background 0.16s, color 0.16s;
}
.popup-header button:hover {
  background: var(--ac-pale);
  color: var(--ac-dark);
}
.dark .popup-box {
  background: var(--surface);
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--border-mid);
}
.dark .popup-header {
  background: var(--surface-2);
  border-color: var(--border);
}
.dark .popup-header h3 { color: var(--text-primary); }
.dark .popup-header button:hover {
  background: var(--ac-pale);
  color: var(--ac-light);
}
#flourishList {
  padding: 12px;
  overflow-y: auto;
  list-style: none;
  flex: 1;
}
#flourishList li {
  margin-bottom: 8px;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  transition: transform 0.18s var(--ease-spring), border-color 0.16s, box-shadow 0.16s;
}
#flourishList li:hover {
  border-color: var(--border-ac);
  transform: translateY(-2px);
  box-shadow: 0 5px 18px var(--ac-glow);
}
#flourishList .count {
  display: flex;
  justify-content: flex-end;
  font-size: 9px;
  color: var(--text-ghost);
  padding: 2px 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#flourishList li p {
  font-size: 1rem !important;
  color: var(--text-primary);
  border-radius: 0;
  border: none;
  background: transparent;
  text-align: center;
  padding: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: color 0.14s;
}
#flourishList li:hover p { color: var(--ac-dark); }
.dark #flourishList li {
  background: var(--surface-2);
  border-color: var(--border-soft);
}
.dark #flourishList li:hover {
  border-color: var(--border-ac);
  box-shadow: 0 5px 18px rgba(6,182,212,0.18);
}
.dark #flourishList li p { color: var(--text-primary); }
.dark #flourishList li:hover p { color: var(--ac-light); }
.flourishit {
  padding: 14px 18px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.dark .flourishit {
  background: var(--surface-2);
  border-color: var(--border);
}
.select-flourish {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.select-flourish label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#flourishSelect {
  appearance: none;
  padding: 8px 26px 8px 14px;
  font-size: 0.82rem;
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-mid);
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}
#flourishSelect:focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 3px var(--ac-ring);
}
.dark #flourishSelect {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border-mid);
}
#flourishRegenerate {
  padding: 11px 28px;
  border-radius: var(--radius-pill);
  background: var(--grad-ac);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-ac);
  transition: transform 0.20s var(--ease-spring), box-shadow 0.20s;
}
#flourishRegenerate:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(6,182,212,0.40);
}
#flourishRegenerate:active { transform: scale(0.97); }
.ads {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  margin: 14px 0;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1.5px dashed var(--border-mid);
  overflow: hidden;
}
.dark .ads {
  background: var(--surface-2);
  border-color: var(--border-mid);
}
footer {
  margin-top: 72px;
  background: var(--grad-header);
  padding: 32px 0;
  position: relative;
}
footer::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(6,182,212,0.35) 20%,
    rgba(34,211,238,0.65) 50%,
    rgba(6,182,212,0.35) 80%,
    transparent 100%
  );
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
footer a {
  color: var(--cyan-300);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  transition: color 0.16s;
}
footer a:hover { color: var(--cyan-200); }
footer p,
footer span {
  color: rgba(232,237,244,0.32);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
}
.info-text {
  font-family: var(--font-body);
  line-height: 1.80;
  color: var(--text-secondary);
  padding: 52px 48px;
  background: var(--surface);
  margin-top: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  white-space: normal;
  word-break: break-word;
}
.info-text h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 36px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
  background: none;
  -webkit-text-fill-color: var(--text-primary);
  line-height: 1.18;
}
.info-text h2 {
  font-family: var(--font-body);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
  text-transform: none;
  font-style: normal;
  position: relative;
  padding-left: 16px;
}
.info-text h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 3px;
  background: var(--grad-ac);
  border-radius: 3px;
}
.info-text h3 {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 26px;
  margin-bottom: 8px;
  font-style: normal;
}
.info-text p {
  font-size: 1rem;
  margin-bottom: 16px;
  text-align: justify;
  color: var(--text-secondary);
}
.info-text ul,
.info-text ol {
  margin-bottom: 22px;
  padding-left: 20px;
}
.info-text li {
  font-size: 1rem;
  margin-bottom: 8px;
}
.info-text strong {
  color: var(--text-primary);
  font-weight: 600;
}
.info-text code {
  background: var(--cyan-50);
  color: var(--cyan-600);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  word-break: break-all;
  display: inline-block;
  margin: 1px;
  border: 1px solid rgba(6,182,212,0.15);
}
.info-text img {
  max-width: 100%;
  border-radius: var(--radius-md);
}
.info-text ul { overflow: auto; }
.info-text .example-box {
  background: var(--bg);
  border-left: 3px solid var(--ac);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 22px 0;
  box-shadow: 0 2px 12px rgba(6,182,212,0.06);
}
.info-text .example-title {
  font-weight: 700;
  font-size: 0.67rem;
  color: var(--ac-dark);
  margin-top: 12px;
  margin-bottom: 8px;
  letter-spacing: 0.13em;
  font-style: normal;
  text-transform: uppercase;
}
.info-text .example-title:first-child { margin-top: 0; }
.info-text .example-box ol {
  list-style-type: decimal;
  margin-bottom: 10px;
}
.info-text .example-box li {
  font-size: 1.03rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  background: var(--surface);
  padding: 8px 14px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}
.copyright-area { color: var(--cyan-200); }
.dark .info-text {
  background: var(--surface);
  border-color: var(--border-soft);
}
.dark .info-text h1 {
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
  border-color: var(--border);
}
.dark .entry-header p {
  background: var(--surface);
  border-color: var(--border-mid);
  color: var(--text-secondary);
}
.dark .info-text h2      { color: var(--text-primary); }
.dark .info-text h3      { color: var(--text-secondary); }
.dark .info-text p       { color: var(--text-secondary); }
.dark .info-text strong  { color: var(--text-primary); }
.dark .info-text code {
  background: rgba(6,182,212,0.08);
  color: var(--ac-light);
  border-color: rgba(6,182,212,0.18);
}
.dark .info-text .example-box { background: var(--surface-2); }
.dark .info-text .example-box li {
  background: var(--surface-3);
  border-color: var(--border-soft);
  color: var(--text-primary);
}
.dark header {
  background: linear-gradient(135deg, #06080c 0%, #0d0f16 50%, #111520 100%);
}
@media (max-width: 940px) {
  .grid ul { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  h1 { font-size: 1.65rem; }
  .container {
    padding: 0 16px;
    max-width: 100%;
  }
  .input-section {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .f-m { width: 100%; }
  .font-size-controller input[type="range"] { width: 120px; }
  .grid ul { grid-template-columns: 1fr; }
  .info-text {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }
  .info-text h1 { font-size: 1.80rem; }
  .info-text h2 { font-size: 1.14rem; }
  .floatmenu a { display: block; }
  header .inner { padding: 0 16px; }
  .buttons { right: 12px; bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}