/* ====================================================================
   HUZIHUB — CASE CONVERTER
   ==================================================================== */

:root {
  --ink: #15132b;
  --ink-soft: #4d4a6b;
  --ink-faint: #8985a8;

  --bg: #fcfbff;
  --bg-soft: #f4f2ff;

  --line: #e7e4f6;
  --line-soft: #f0eefb;

  --primary: #4f46e5;
  --primary-dark: #3b33c4;
  --primary-light: #eeebff;

  --accent: #7c3aed;

  --white: #ffffff;

  --cat-text: #4f46e5;
  --cat-calc: #9333ea;
  --cat-image: #ea580c;
  --cat-dev: #059669;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm:
    0 1px 2px rgba(21, 19, 43, 0.06), 0 1px 1px rgba(21, 19, 43, 0.04);
  --shadow-md: 0 8px 24px rgba(21, 19, 43, 0.08);
  --shadow-lg: 0 20px 50px rgba(79, 70, 229, 0.14);

  --nav-height: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: "Lexend", sans-serif;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

code,
.mono {
  font-family: "Fira Code", monospace;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 2000;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

/* ==================== REVEAL ANIMATIONS ==================== */
[data-reveal] {
  opacity: 0;
  will-change: transform, opacity;
}
[data-reveal].in-view {
  opacity: 1;
  animation-fill-mode: forwards;
}
[data-reveal="fade-up"] {
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
[data-reveal="fade-up"].in-view {
  transform: translateY(0);
}
[data-reveal="zoom-in"] {
  transform: scale(0.92);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}
[data-reveal="zoom-in"].in-view {
  transform: scale(1);
}
[data-reveal="slide-left"] {
  transform: translateX(40px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
[data-reveal="slide-left"].in-view {
  transform: translateX(0);
}
[data-reveal="slide-right"] {
  transform: translateX(-40px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
[data-reveal="slide-right"].in-view {
  transform: translateX(0);
}

/* ==================== NAVBAR ==================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(252, 251, 255, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 480px) {
  .navbar-inner {
    padding: 0 14px;
    gap: 10px;
  }
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-name {
  font-family: "Lexend", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}

.navbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition:
    color 0.2s ease,
    background 0.2s ease;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--primary);
  background: var(--primary-light);
}

.chevron {
  transition: transform 0.2s ease;
}
.has-dropdown:hover .chevron,
.has-dropdown.open .chevron {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 8px);
  width: 460px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s;
  z-index: 1001;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.dropdown-header h3 {
  font-size: 1rem;
  margin-bottom: 2px;
}
.dropdown-header p {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.dropdown-grid a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 8px 10px;
  border-radius: 8px;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}
.dropdown-grid a:hover,
.dropdown-grid a:focus-visible {
  background: var(--primary-light);
  color: var(--primary);
}
.dropdown-grid a.active {
  color: var(--primary);
  font-weight: 600;
}
.dropdown-viewall {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}
.search-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.search-kbd {
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 0 auto;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 992px) {
  .navbar-center {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .search-kbd {
    display: none;
  }
  .search-btn {
    padding: 8px;
  }
  .brand-name {
    font-size: 1.02rem;
  }
  .brand-logo-img {
    width: 28px;
    height: 28px;
  }
}

/* ==================== MOBILE DRAWER ==================== */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 88vw);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1900;
  overflow-y: auto;
}
.mobile-drawer.open {
  transform: translateX(0);
}
.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.drawer-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  min-width: 48px;
  min-height: 48px;
}
.mobile-accordion {
  padding: 10px;
}
.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Lexend", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 16px 12px;
  min-height: 48px;
  border-bottom: 1px solid var(--line-soft);
}
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  display: flex;
  flex-direction: column;
}
.accordion-panel.open {
  max-height: 600px;
}
.accordion-panel a {
  padding: 12px;
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--ink-soft);
}
.mobile-plain-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 16px 12px;
  font-weight: 600;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 19, 43, 0.35);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s;
  z-index: 1800;
}
.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}
body.no-scroll {
  overflow: hidden;
}

/* ==================== SEARCH OVERLAY ==================== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 19, 43, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s;
  z-index: 2000;
}
.search-overlay.open {
  opacity: 1;
  visibility: visible;
}
.search-panel {
  width: min(600px, 90vw);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.search-input-row input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: "Inter", sans-serif;
  background: none;
  color: var(--ink);
}
.search-input-row button {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--ink-faint);
}
.search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
}
.search-result-item:hover,
.search-result-item.active {
  background: var(--primary-light);
}
.search-result-item .srt-title {
  font-weight: 600;
  font-size: 0.92rem;
}
.search-result-item .srt-cat {
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
  max-width: 1120px;
  margin: 20px auto 0;
  padding: 0 24px;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--line);
}
.breadcrumb a:hover {
  color: var(--primary);
}
.breadcrumb li[aria-current="page"] {
  color: var(--ink-soft);
  font-weight: 500;
}

/* ====================================================================
   PREMIUM HERO
   ==================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 24px 100px;
  isolation: isolate;
}

/* ---- layered background ---- */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-mesh {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(
      38% 42% at 12% 18%,
      rgba(79, 70, 229, 0.24),
      transparent 70%
    ),
    radial-gradient(
      32% 38% at 85% 12%,
      rgba(124, 58, 237, 0.2),
      transparent 70%
    ),
    radial-gradient(
      45% 50% at 60% 90%,
      rgba(79, 70, 229, 0.14),
      transparent 70%
    );
  animation: meshDrift 22s ease-in-out infinite alternate;
  filter: blur(4px);
}
@keyframes meshDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-2%, 2%) scale(1.05);
  }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(
    ellipse 65% 55% at 50% 20%,
    black 10%,
    transparent 75%
  );
  opacity: 0.8;
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-glow {
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(79, 70, 229, 0.22),
    transparent
  );
  filter: blur(40px);
}

.particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.5;
  filter: blur(0.5px);
  animation: particleFloat 9s ease-in-out infinite;
}
.particle::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.3;
  filter: blur(4px);
}
.p1 {
  top: 18%;
  left: 8%;
  animation-delay: 0s;
  background: var(--primary);
}
.p2 {
  top: 65%;
  left: 14%;
  animation-delay: 1.2s;
  background: var(--accent);
  width: 4px;
  height: 4px;
}
.p3 {
  top: 28%;
  left: 92%;
  animation-delay: 2.1s;
  background: var(--accent);
}
.p4 {
  top: 78%;
  left: 88%;
  animation-delay: 0.6s;
  background: var(--primary);
  width: 6px;
  height: 6px;
}
.p5 {
  top: 8%;
  left: 60%;
  animation-delay: 3s;
  background: var(--primary);
  width: 3px;
  height: 3px;
}
.p6 {
  top: 50%;
  left: 48%;
  animation-delay: 1.8s;
  background: var(--accent);
  width: 4px;
  height: 4px;
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.35;
  }
  50% {
    transform: translate(14px, -24px);
    opacity: 0.8;
  }
}

/* ---- layout ---- */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-left {
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(79, 70, 229, 0.18);
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-badge svg {
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2.2rem, 3.4vw + 1rem, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero-highlight {
  background: linear-gradient(100deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 520px;
  margin: 0 0 30px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn-glow {
  position: relative;
}
.btn-glow::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  z-index: -1;
  filter: blur(14px);
  opacity: 0.55;
  transition: opacity 0.3s ease;
}
.btn-glow:hover::after {
  opacity: 0.85;
}

.btn-secondary-outline {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  color: var(--ink);
  backdrop-filter: blur(6px);
}
.btn-secondary-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--white);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 30px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  color: var(--ink-faint);
  font-weight: 500;
}
.trust-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.hero-stats {
  display: flex;
  gap: 32px;
  padding: 22px 0;
  margin-bottom: 26px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.hero-stat {
  display: flex;
  flex-direction: column;
}
.hero-stat-value {
  font-family: "Lexend", sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--ink);
}
.hero-stat-label {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 2px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feature-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}

/* ---- 3D scene ---- */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1400px;
}

.scene {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 440px;
  transform-style: preserve-3d;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(79, 70, 229, 0.22);
  top: 50%;
  left: 50%;
}
.ring-1 {
  width: 380px;
  height: 380px;
  margin: -190px 0 0 -190px;
  animation: ringSpin 26s linear infinite;
}
.ring-2 {
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  border-color: rgba(124, 58, 237, 0.22);
  animation: ringSpin 20s linear infinite reverse;
}
@keyframes ringSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  background: radial-gradient(circle at 35% 30%, #fff, var(--primary) 60%);
  box-shadow: 0 0 40px rgba(79, 70, 229, 0.55);
  animation: orbFloat 7s ease-in-out infinite;
}
.orb-a {
  width: 26px;
  height: 26px;
  top: 12%;
  right: 18%;
  animation-delay: 0s;
}
.orb-b {
  width: 16px;
  height: 16px;
  bottom: 16%;
  left: 10%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 60%);
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.55);
  animation-delay: 1.4s;
}
@keyframes orbFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

.glass-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  box-shadow:
    0 20px 45px rgba(21, 19, 43, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.15s ease-out;
  animation: cardFloat 6s ease-in-out infinite;
}
.glass-card-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 48%,
    transparent 66%
  );
  transform: translateX(-120%);
  animation: cardShine 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cardShine {
  0%,
  60%,
  100% {
    transform: translateX(-120%);
  }
  80% {
    transform: translateX(120%);
  }
}
@keyframes cardFloat {
  0%,
  100% {
    transform: translateY(0) rotate(var(--tilt, 0deg));
  }
  50% {
    transform: translateY(-14px) rotate(var(--tilt, 0deg));
  }
}

.card-main {
  width: 280px;
  padding: 20px;
  left: 50%;
  top: 50%;
  margin: -100px 0 0 -140px;
  z-index: 3;
  --tilt: -1.5deg;
}
.card-toolbar-preview {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.dot-case {
  font-family: "Fira Code", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-faint);
}
.dot-case.active {
  background: var(--primary);
  color: var(--white);
}
.card-line-lg {
  font-family: "Fira Code", monospace;
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 8px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}
.card-line-sm {
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 14px;
}
.card-footer-preview {
  display: flex;
  gap: 14px;
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.card-float {
  width: 130px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.mini-icon {
  font-family: "Fira Code", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 9px;
  border-radius: 8px;
}
.mini-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.card-float-1 {
  top: 6%;
  left: 0;
  --tilt: 3deg;
  animation-delay: 0.4s;
}
.card-float-2 {
  bottom: 10%;
  right: 2%;
  --tilt: -2.5deg;
  animation-delay: 1.1s;
}
.card-float-3 {
  top: 56%;
  left: -4%;
  --tilt: 2deg;
  animation-delay: 0.8s;
}

.shape {
  position: absolute;
  opacity: 0.6;
}
.shape-tri {
  width: 0;
  height: 0;
  top: 4%;
  right: 30%;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 20px solid var(--accent);
  animation: shapeSpin 12s linear infinite;
}
.shape-square {
  width: 18px;
  height: 18px;
  bottom: 4%;
  left: 34%;
  border: 2px solid var(--primary);
  border-radius: 5px;
  animation: shapeSpin 16s linear infinite reverse;
}
@keyframes shapeSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mesh,
  .particle,
  .ring-1,
  .ring-2,
  .orb,
  .glass-card,
  .glass-card-shine,
  .shape {
    animation: none !important;
  }
}

/* ==================== TOOL CARD ==================== */
.tool-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 40px;
}
.tool-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
  position: relative;
}
.tool-card-header h2 {
  font-size: 1.3rem;
}
.tool-card-header p {
  color: var(--ink-faint);
  margin: 0 0 20px;
  font-size: 0.92rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.case-btn {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}
.case-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.case-btn:active {
  transform: scale(0.97);
}
.case-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.tool-textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  line-height: 1.6;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.tool-textarea:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0;
}
.stat-card {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}
.stat-value {
  display: block;
  font-family: "Lexend", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary);
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 2px;
}

.tool-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==================== BUTTONS ==================== */
.btn {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.28);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover {
  background: var(--bg-soft);
}
.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes rippleAnim {
  to {
    transform: scale(3);
    opacity: 0;
  }
}

/* ==================== CONTENT ==================== */
.content-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}
.content-article h2 {
  font-size: 1.4rem;
  margin-top: 2em;
}
.content-article p,
.content-article li {
  color: var(--ink-soft);
}
.content-article ul,
.content-article ol {
  padding-left: 1.3em;
}
.content-article li {
  margin-bottom: 0.4em;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 10px;
  background: var(--bg-soft);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-family: "Lexend", sans-serif;
  color: var(--ink);
}
.faq-list p {
  margin: 10px 0 0;
}

/* ==================== RELATED TOOLS ==================== */
.related-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}
.related-section h2 {
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.related-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.related-icon {
  color: var(--primary);
  margin-bottom: 4px;
}
.related-title {
  font-family: "Lexend", sans-serif;
  font-weight: 600;
}
.related-desc {
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ==================== CTA ==================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  margin: 0 24px 60px;
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-inner h2 {
  color: var(--white);
  font-size: 1.6rem;
}
.cta-inner p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 22px;
}
.cta-inner .btn-primary {
  background: var(--white);
  color: var(--primary);
  box-shadow: none;
}
.cta-inner .btn-primary:hover {
  background: var(--bg-soft);
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 24px 24px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand p {
  margin-top: 10px;
  font-size: 0.9rem;
}
.footer-brand .brand-name {
  color: var(--white);
}
.footer-col h3 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.footer-col a:hover {
  color: var(--white);
}
.footer-bottom {
  max-width: 1120px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}
.social-icons {
  display: flex;
  gap: 12px;
}
.social-icons a {
  color: rgba(255, 255, 255, 0.7);
}
.social-icons a:hover {
  color: var(--white);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 64px;
    text-align: center;
  }
  .hero-left {
    max-width: 640px;
    margin: 0 auto;
  }
  .hero-ctas,
  .hero-trust {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-pills {
    justify-content: center;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 48px 16px 70px;
  }
  .tool-card {
    padding: 20px;
  }
  .scene {
    height: 360px;
  }
  .card-main {
    width: 230px;
    margin: -90px 0 0 -115px;
    padding: 16px;
  }
  .card-float {
    width: 108px;
    padding: 10px;
  }
  .hero-stats {
    gap: 20px;
    flex-wrap: wrap;
  }
}

/* ====================================================================
   REMOVE DUPLICATE LINES — TOOL-SPECIFIC ADDITIONS
   ==================================================================== */

/* ---- Options panel ---- */
.options-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto)) minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  max-width: 100%;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.option-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.segmented-btn {
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
.segmented-btn:hover {
  color: var(--primary);
}
.segmented-btn.active {
  background: var(--primary);
  color: var(--white);
}

.option-checkboxes {
  flex-direction: row;
  gap: 20px;
  align-items: center;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}
.checkbox-row input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.checkbox-box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1.6px solid var(--line);
  background: var(--white);
  position: relative;
  flex-shrink: 0;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}
.checkbox-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.checkbox-row input:checked + .checkbox-box {
  background: var(--primary);
  border-color: var(--primary);
}
.checkbox-row input:checked + .checkbox-box::after {
  opacity: 1;
}
.checkbox-row input:focus-visible + .checkbox-box {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---- Actions row wraps ---- */
.tool-actions-primary {
  margin-top: 16px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn:disabled:hover {
  background: inherit;
}

/* ---- 6-stat grid ---- */
.stats-row-6 {
  grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 900px) {
  .stats-row-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 560px) {
  .stats-row-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- keyboard hint ---- */
.kbd-hint {
  margin: 16px 0 0;
  font-size: 0.8rem;
  color: var(--ink-faint);
  text-align: center;
}
kbd {
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .options-panel {
    grid-template-columns: 1fr 1fr;
  }
  .option-checkboxes {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
@media (max-width: 560px) {
  .options-panel {
    grid-template-columns: 1fr;
  }
}

/* ====================================================================
   HERO — DEDUPE ILLUSTRATION
   ==================================================================== */
.card-dedupe {
  width: 300px;
  padding: 20px;
  left: 50%;
  top: 50%;
  margin: -115px 0 0 -150px;
  z-index: 3;
  --tilt: -1.5deg;
}
.dedupe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dedupe-title {
  font-family: "Fira Code", monospace;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.dedupe-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 9px;
  border-radius: 999px;
}

.dedupe-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dedupe-line {
  font-family: "Fira Code", monospace;
  font-size: 0.8rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 6px 10px;
  animation: dedupeCycle 6s ease-in-out infinite;
  transform-origin: left center;
}
.dedupe-line.is-dup {
  animation: dedupeRemove 6s ease-in-out infinite;
}
.dedupe-line:nth-child(1) {
  animation-delay: 0s;
}
.dedupe-line:nth-child(2) {
  animation-delay: 0.15s;
}
.dedupe-line:nth-child(3) {
  animation-delay: 0.3s;
}
.dedupe-line:nth-child(4) {
  animation-delay: 0.45s;
}
.dedupe-line:nth-child(5) {
  animation-delay: 0.6s;
}
.dedupe-line:nth-child(6) {
  animation-delay: 0.75s;
}

@keyframes dedupeRemove {
  0%,
  35% {
    opacity: 1;
    background: var(--white);
    text-decoration: none;
    transform: scaleX(1);
    max-height: 32px;
  }
  45% {
    opacity: 0.5;
    background: #fef2f2;
    text-decoration: line-through;
    text-decoration-color: #ef4444;
  }
  55%,
  95% {
    opacity: 0;
    transform: scaleX(0.4) translateX(-8px);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    border-width: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes dedupeCycle {
  0%,
  35% {
    background: var(--white);
  }
  45% {
    background: var(--primary-light);
  }
  55%,
  100% {
    background: var(--white);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dedupe-line,
  .dedupe-line.is-dup {
    animation: none !important;
    opacity: 1 !important;
    text-decoration: none !important;
  }
}

@media (max-width: 600px) {
  .card-dedupe {
    width: 250px;
    margin: -110px 0 0 -125px;
    padding: 16px;
  }
}

/* ====================================================================
   LOREM IPSUM GENERATOR — TOOL-SPECIFIC ADDITIONS
   ==================================================================== */

.amount-input {
  width: 110px;
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.amount-input:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.stats-row-5 {
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 900px) {
  .stats-row-5 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 560px) {
  .stats-row-5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ====================================================================
   HERO — LOREM GENERATION ILLUSTRATION
   ==================================================================== */
.card-lorem {
  width: 300px;
  padding: 20px;
  left: 50%;
  top: 50%;
  margin: -125px 0 0 -150px;
  z-index: 3;
  --tilt: -1.5deg;
}
.lorem-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.lorem-dots {
  display: flex;
  gap: 5px;
}
.lorem-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  display: inline-block;
}
.lorem-dots i:nth-child(1) {
  background: #f87171;
}
.lorem-dots i:nth-child(2) {
  background: #fbbf24;
}
.lorem-dots i:nth-child(3) {
  background: #34d399;
}

.lorem-preview-line {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 8px;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--primary);
  width: 0;
  animation: loremType 8s steps(30, end) infinite;
}
.lorem-line-1 {
  animation-delay: 0s;
}
.lorem-line-2 {
  animation-delay: 1.6s;
}
.lorem-line-3 {
  animation-delay: 3.2s;
}
.lorem-line-4 {
  animation-delay: 4.8s;
}

@keyframes loremType {
  0% {
    width: 0;
    border-color: var(--primary);
  }
  18% {
    width: 100%;
    border-color: var(--primary);
  }
  30%,
  100% {
    width: 100%;
    border-color: transparent;
  }
}

.floating-letter {
  position: absolute;
  font-family: "Lexend", sans-serif;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.16;
  pointer-events: none;
  animation: letterFloat 8s ease-in-out infinite;
}
.fl-1 {
  font-size: 3.2rem;
  top: 2%;
  left: 4%;
  animation-delay: 0s;
}
.fl-2 {
  font-size: 2.4rem;
  bottom: 6%;
  right: 6%;
  color: var(--accent);
  animation-delay: 1.5s;
}
.fl-3 {
  font-size: 2rem;
  top: 44%;
  right: -2%;
  animation-delay: 3s;
}

@keyframes letterFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(-6deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lorem-preview-line {
    animation: none !important;
    width: 100% !important;
    border-color: transparent !important;
  }
  .floating-letter {
    animation: none !important;
  }
}

@media (max-width: 600px) {
  .card-lorem {
    width: 250px;
    margin: -118px 0 0 -125px;
    padding: 16px;
  }
  .floating-letter {
    display: none;
  }
}

/* ====================================================================
   PASSWORD GENERATOR — TOOL-SPECIFIC ADDITIONS
   ==================================================================== */

.brand-logo-img {
  border-radius: 8px;
  display: block;
}

/* ---- Password display ---- */
.password-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 16px;
  margin-bottom: 14px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.password-display:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.password-field {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-family: "Fira Code", monospace;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
  min-width: 0;
}
.pw-icon-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}
.pw-icon-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.pw-icon-btn:active {
  transform: scale(0.94);
}

/* ---- Strength meter ---- */
.strength-meter {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.strength-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}
.strength-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  transition:
    width 0.35s ease,
    background 0.35s ease;
}
.strength-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
  min-width: 90px;
  text-align: right;
}

/* ---- Range slider ---- */
.range-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: var(--line-soft);
  outline: none;
  margin-top: 6px;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}
.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
  cursor: pointer;
}
.option-group-wide {
  grid-column: 1 / -1;
}

.custom-charset-input {
  width: 100%;
  font-family: "Fira Code", monospace;
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.custom-charset-input:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

/* ---- Multi password list ---- */
.multi-password-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.multi-password-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.multi-password-item span {
  font-family: "Fira Code", monospace;
  font-size: 0.92rem;
  color: var(--ink);
  word-break: break-all;
}
.multi-password-item button {
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.multi-password-item button:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ---- Password history ---- */
.password-history {
  margin-top: 20px;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.history-header h3 {
  font-size: 1rem;
  margin: 0;
}
.history-subtitle {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-faint);
}
.history-clear-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}
.history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: "Fira Code", monospace;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 8px 12px;
}
.history-list li button {
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.history-list li button:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ---- Security tips ---- */
.security-tips {
  margin-top: 20px;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.security-tips h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--primary-dark);
}
.security-tips ul {
  margin: 0;
  padding-left: 1.2em;
}
.security-tips li {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .pw-char-types {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ====================================================================
   HERO — CYBERSECURITY SCENE
   ==================================================================== */
.ring-3 {
  width: 440px;
  height: 440px;
  margin: -220px 0 0 -220px;
  border-color: rgba(79, 70, 229, 0.12);
  animation: ringSpin 34s linear infinite;
}

.card-shield {
  width: 280px;
  padding: 22px;
  left: 50%;
  top: 50%;
  margin: -135px 0 0 -140px;
  z-index: 3;
  --tilt: -1deg;
  text-align: center;
}
.shield-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.shield-pw-preview {
  font-family: "Fira Code", monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.03em;
  margin: 0 0 12px;
}
.shield-strength-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
  margin-bottom: 10px;
}
.shield-strength-fill {
  display: block;
  height: 100%;
  width: 92%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #34d399);
  animation: shieldFill 6s ease-in-out infinite;
}
@keyframes shieldFill {
  0%,
  100% {
    width: 92%;
  }
  50% {
    width: 60%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
  }
}

.binary-bit {
  position: absolute;
  font-family: "Fira Code", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.25;
  animation: binaryDrift 9s linear infinite;
}
.bb-1 {
  top: 6%;
  left: 8%;
  animation-delay: 0s;
}
.bb-2 {
  bottom: 10%;
  left: 12%;
  animation-delay: 2s;
  color: var(--accent);
}
.bb-3 {
  top: 14%;
  right: 4%;
  animation-delay: 4s;
}
.bb-4 {
  bottom: 20%;
  right: 10%;
  animation-delay: 6s;
  color: var(--accent);
}

@keyframes binaryDrift {
  0% {
    transform: translateY(0);
    opacity: 0.15;
  }
  50% {
    transform: translateY(-20px);
    opacity: 0.4;
  }
  100% {
    transform: translateY(0);
    opacity: 0.15;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shield-strength-fill {
    animation: none !important;
    width: 85% !important;
  }
  .binary-bit {
    animation: none !important;
  }
  .ring-3 {
    animation: none !important;
  }
}

@media (max-width: 600px) {
  .card-shield {
    width: 240px;
    margin: -125px 0 0 -120px;
    padding: 18px;
  }
  .binary-bit {
    display: none;
  }
}

/* ====================================================================
   MODE TABS (Generate vs Check Strength)
   ==================================================================== */
.mode-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 22px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mode-tab {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  padding: 11px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}
.mode-tab:hover {
  color: var(--primary);
}
.mode-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.mode-panel {
  display: none;
}
.mode-panel.active {
  display: block;
}

/* ====================================================================
   PASSWORD CHECKER MODE
   ==================================================================== */
.checker-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 16px;
  margin-bottom: 14px;
  max-width: 100%;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.checker-input-row:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.checker-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  font-family: "Fira Code", monospace;
  font-size: 1.05rem;
  color: var(--ink);
}

.suggestions-panel {
  margin-top: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.suggestions-panel h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.suggestions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.suggestions-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.suggestions-list li::before {
  content: "!";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fef3c7;
  color: #b45309;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.suggestions-list.all-good li::before {
  content: "✓";
  background: #d1fae5;
  color: #047857;
}
.suggestions-empty {
  font-size: 0.86rem;
  color: var(--ink-soft);
}

@media (max-width: 480px) {
  .mode-tab {
    font-size: 0.8rem;
    padding: 9px 10px;
  }
}

/* ====================================================================
   OPTIONS SECTION — REFACTORED GROUPED GRID LAYOUT
   ==================================================================== */

.options-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
  max-width: 100%;
}
@media (max-width: 1199px) {
  .options-grid {
    grid-template-columns: repeat(2, minmax(190px, 1fr));
  }
}
@media (max-width: 767px) {
  .options-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

.option-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.option-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.option-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.option-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  flex-shrink: 0;
}
.option-card-header h3 {
  font-size: 0.92rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.option-card-hint {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin: 0;
}

/* Group 1: Character Types — 2x2 grid, short one-line labels */
.char-types-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 10px;
  min-width: 0;
}
.char-types-grid .checkbox-row {
  min-width: 0;
}
.char-types-grid .checkbox-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  display: inline-block;
}

/* Group 2: Advanced Options — stacked, may wrap onto a second line */
.advanced-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.advanced-options-list .checkbox-text {
  white-space: normal;
  line-height: 1.3;
}

/* Shared checkbox alignment */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  min-width: 0;
}
.checkbox-box {
  flex-shrink: 0;
}
.checkbox-text em {
  font-style: normal;
  color: var(--ink-faint);
  margin-left: 3px;
  font-weight: 400;
}

/* Group 3: Generation Settings */
.generation-settings-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.setting-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.segmented-full {
  display: flex;
  width: 100%;
  max-width: 100%;
  justify-content: center;
  box-sizing: border-box;
}
.segmented-full .segmented-btn {
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

.amount-input-full {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Group 4: Custom Character Set */
.option-card .custom-charset-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  .option-card {
    transition: none;
  }
  .option-card:hover {
    transform: none;
  }
}

/* ====================================================================
   TEXT REVERSER — TOOL-SPECIFIC ADDITIONS
   ==================================================================== */

/* ---- Options grid: 2 cards for this tool ---- */
.options-grid-reverser {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}
@media (max-width: 767px) {
  .options-grid-reverser {
    grid-template-columns: minmax(0, 1fr);
  }
}

.segmented-wrap {
  flex-wrap: wrap;
  justify-content: flex-start;
}
.segmented-wrap .segmented-btn {
  flex: 0 0 auto;
}

/* ---- Input / Output two-column layout ---- */
.reverser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 16px;
  max-width: 100%;
}
.reverser-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.reverser-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.reverser-col .tool-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .reverser-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- keyboard hint (reuse pattern) ---- */
.kbd-hint {
  margin: 16px 0 0;
  font-size: 0.8rem;
  color: var(--ink-faint);
  text-align: center;
}
kbd {
  font-family: "Fira Code", monospace;
  font-size: 0.72rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--ink-soft);
}

/* ====================================================================
   TOAST NOTIFICATIONS
   ==================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: calc(100vw - 32px);
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  animation:
    toastIn 0.3s ease forwards,
    toastOut 0.3s ease forwards 2.2s;
  max-width: 100%;
}
.toast::before {
  content: "✓";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
@keyframes toastIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 480px) {
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

/* ====================================================================
   HERO — TEXT REVERSAL ILLUSTRATION
   ==================================================================== */
.card-reverse {
  width: 290px;
  padding: 20px;
  left: 50%;
  top: 50%;
  margin: -115px 0 0 -145px;
  z-index: 3;
  --tilt: -1.5deg;
  text-align: center;
}
.reverse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.reverse-flip-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
  perspective: 400px;
}
.flip-letter {
  display: inline-block;
  font-family: "Fira Code", monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  animation: letterFlip 4s ease-in-out infinite;
  transform-style: preserve-3d;
}
.flip-letter:nth-child(1) {
  animation-delay: 0s;
}
.flip-letter:nth-child(2) {
  animation-delay: 0.1s;
}
.flip-letter:nth-child(3) {
  animation-delay: 0.2s;
}
.flip-letter:nth-child(4) {
  animation-delay: 0.3s;
}
.flip-letter:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes letterFlip {
  0%,
  40% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(180deg);
  }
  90%,
  100% {
    transform: rotateY(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .flip-letter {
    animation: none;
  }
}

@media (max-width: 600px) {
  .card-reverse {
    width: 240px;
    margin: -108px 0 0 -120px;
    padding: 16px;
  }
  .flip-letter {
    font-size: 1.1rem;
  }
}

/* ====================================================================
   ONLINE NOTEPAD — TOOL-SPECIFIC ADDITIONS
   ==================================================================== */

.notepad-card {
  padding: 24px;
}

/* ---- Title bar ---- */
.notepad-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.note-title-input {
  flex: 1;
  min-width: 0;
  font-family: "Lexend", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.note-title-input:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.save-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}
.save-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}
.save-status.is-saving::before {
  background: #f59e0b;
  animation: statusPulse 1s ease-in-out infinite;
}
.save-status.is-saving {
  color: #b45309;
}
@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ---- Toolbar ---- */
.notepad-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
  min-height: 38px;
}
.toolbar-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.toolbar-btn:active {
  transform: scale(0.96);
}
.toolbar-btn svg {
  flex-shrink: 0;
}
.toolbar-btn-danger:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
}

@media (max-width: 600px) {
  .toolbar-btn span {
    display: none;
  }
  .toolbar-btn {
    padding: 9px;
    min-width: 38px;
    justify-content: center;
  }
}

/* ---- Find bar ---- */
.find-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
  color: var(--ink-faint);
  max-width: 100%;
}
.find-bar input {
  flex: 1;
  min-width: 100px;
  border: none;
  outline: none;
  background: none;
  font-size: 0.9rem;
  color: var(--ink);
  font-family: "Inter", sans-serif;
}
.find-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ---- Editor ---- */
.notepad-editor {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 380px;
  resize: vertical;
  font-family: "Inter", sans-serif;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.notepad-editor:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}
.notepad-editor::selection {
  background: var(--primary-light);
}
mark.find-highlight {
  background: #fde68a;
  color: var(--ink);
  border-radius: 2px;
}
mark.find-highlight.current-match {
  background: var(--primary);
  color: var(--white);
}

.privacy-note {
  font-size: 0.8rem;
  color: var(--ink-faint);
  text-align: center;
  margin: 14px 0 4px;
}

/* ---- Fullscreen mode ---- */
body.notepad-fullscreen-active {
  overflow: hidden;
}
body.notepad-fullscreen-active #navbar,
body.notepad-fullscreen-active .hero,
body.notepad-fullscreen-active .breadcrumb,
body.notepad-fullscreen-active .content-section,
body.notepad-fullscreen-active .related-section,
body.notepad-fullscreen-active .cta-section,
body.notepad-fullscreen-active #siteFooter {
  display: none !important;
}
body.notepad-fullscreen-active .tool-section {
  max-width: 100%;
  padding: 16px;
  margin: 0;
}
body.notepad-fullscreen-active .notepad-card {
  min-height: 100vh;
  box-sizing: border-box;
  border-radius: 0;
  border: none;
  box-shadow: none;
}
body.notepad-fullscreen-active .notepad-editor {
  min-height: 60vh;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(21, 19, 43, 0.5);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2500;
}
.modal-overlay[hidden] {
  display: none;
}
.modal-overlay:not([hidden]) {
  display: flex;
}
.modal-dialog {
  width: min(420px, 100%);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px;
  box-sizing: border-box;
}
.modal-dialog h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.modal-dialog p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 20px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---- Print styles ---- */
@media print {
  #navbar,
  .hero,
  .breadcrumb,
  .notepad-titlebar .save-status,
  .notepad-toolbar,
  .find-bar,
  .stats-row,
  .privacy-note,
  .kbd-hint,
  .content-section,
  .related-section,
  .cta-section,
  #siteFooter,
  .toast-container,
  .modal-overlay {
    display: none !important;
  }
  .notepad-editor {
    border: none;
    padding: 0;
    min-height: 0;
    box-shadow: none;
  }
  body {
    background: #fff;
  }
}

/* ====================================================================
   HERO — NOTEPAD ILLUSTRATION
   ==================================================================== */
.card-notepad {
  width: 290px;
  padding: 20px;
  left: 50%;
  top: 50%;
  margin: -125px 0 0 -145px;
  z-index: 3;
  --tilt: -1.5deg;
}
.notepad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.notepad-title-preview {
  font-family: "Lexend", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 12px;
}

.notepad-line {
  height: 9px;
  border-radius: 5px;
  background: var(--line-soft);
  margin: 0 0 10px;
  animation: lineGrow 5s ease-in-out infinite;
}
.notepad-line-1 {
  width: 0%;
  animation-delay: 0s;
}
.notepad-line-2 {
  width: 0%;
  animation-delay: 0.4s;
}
.notepad-line-3 {
  width: 0%;
  animation-delay: 0.8s;
}
@keyframes lineGrow {
  0% {
    width: 0%;
    background: var(--primary-light);
  }
  30% {
    width: 90%;
    background: var(--primary-light);
  }
  40%,
  100% {
    width: 90%;
    background: var(--line-soft);
  }
}
.notepad-line-2 {
}
.notepad-line-3 {
}

.notepad-cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--primary);
  animation: cursorBlink 1s step-end infinite;
  margin-bottom: 12px;
}
@keyframes cursorBlink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .notepad-line {
    animation: none;
    width: 80%;
    background: var(--line-soft);
  }
  .notepad-cursor {
    animation: none;
    opacity: 1;
  }
  .save-status.is-saving::before {
    animation: none;
  }
}

@media (max-width: 600px) {
  .card-notepad {
    width: 240px;
    margin: -118px 0 0 -120px;
    padding: 16px;
  }
}
