:root {
  --bg: #f7f4ff;
  --surface: #ffffff;
  --surface-soft: #fbf9ff;
  --surface-muted: #f2ecff;
  --primary: #6c3df4;
  --primary-dark: #5428d9;
  --primary-light: #8f72ff;
  --accent: #bcaaff;
  --text: #17172a;
  --text-soft: #62627a;
  --text-faint: #8a8aa2;
  --border: #e8e1fb;
  --shadow-sm: 0 8px 22px rgba(83, 48, 176, 0.08);
  --shadow-md: 0 16px 36px rgba(83, 48, 176, 0.12);
  --shadow-lg: 0 24px 54px rgba(83, 48, 176, 0.16);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --max-width: 1180px;
  --transition: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(180deg, #f4efff 0%, #fbfaff 38%, #ffffff 100%);
  color: var(--text);
  line-height: 1.6;
}
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
ul { list-style: none; }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-wrapper {
  width: min(100%, 1440px);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.72);
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(108, 61, 244, 0.12);
}

.navbar {
  width: min(var(--max-width), 92%);
  min-height: 86px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 38px;
}
.brand { display: inline-flex; align-items: center; gap: 14px; width: fit-content; }
.brand-icon { width: 48px; height: 48px; display: grid; place-items: center; color: var(--primary); font-size: 32px; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 22px; line-height: 1.1; letter-spacing: -0.4px; }
.brand-text small { margin-top: 3px; color: var(--text-soft); font-size: 11px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  position: relative;
  padding: 30px 0 24px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 18px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  transition: width var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.theme-toggle {
  width: 66px;
  height: 36px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
}
.theme-toggle span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 14px; }
.sun-icon { color: #ff9d1c; }
.moon-icon { color: #ffffff; background: linear-gradient(135deg, var(--primary-light), var(--primary)); }

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 72px 20px 70px;
  background:
    radial-gradient(circle at 15% 30%, rgba(145, 114, 255, 0.16), transparent 28%),
    radial-gradient(circle at 85% 24%, rgba(188, 170, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #faf8ff 0%, #f4efff 100%);
}
.hero-content { position: relative; z-index: 2; width: min(760px, 100%); margin: 0 auto; text-align: center; }
.hero-content h1 { max-width: 760px; margin: 0 auto; font-size: clamp(42px, 6vw, 72px); line-height: 1.05; letter-spacing: -2px; }
.hero-content h1 span { display: block; color: var(--primary); }
.hero-content > p { max-width: 610px; margin: 22px auto 34px; color: var(--text-soft); font-size: 16px; }
.hero-decoration { position: absolute; z-index: 1; color: rgba(108, 61, 244, 0.22); pointer-events: none; }
.decoration-left { left: 3%; bottom: 18px; font-size: clamp(90px, 14vw, 180px); transform: rotate(-12deg); }
.decoration-right { right: 6%; bottom: 18px; font-size: clamp(78px, 11vw, 145px); }

.search-form {
  width: min(620px, 100%);
  min-height: 70px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
}
.search-icon { color: var(--text-faint); font-size: 20px; }
.search-form input { width: 100%; border: 0; outline: none; background: transparent; color: var(--text); font-size: 17px; }
.search-form input::placeholder { color: #aaa7bb; }
.clear-search-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--text-faint);
  transition: background var(--transition), color var(--transition);
}
.clear-search-button:hover { color: var(--primary); background: var(--surface-muted); }
.search-button {
  min-width: 120px;
  height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(108, 61, 244, 0.24);
  transition: transform var(--transition), box-shadow var(--transition);
}
.search-button:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(108, 61, 244, 0.3); }

.loading-state, .error-message {
  width: min(700px, 90%);
  margin: 34px auto 0;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.loading-state { padding: 24px; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--text-soft); }
.loading-spinner { width: 24px; height: 24px; border: 3px solid var(--surface-muted); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-message { padding: 24px; display: flex; align-items: flex-start; gap: 16px; color: #8b1e35; border: 1px solid #ffd6df; background: #fff7f9; }
.error-message i { margin-top: 5px; font-size: 22px; }
.error-message h2 { margin-bottom: 3px; font-size: 18px; }

.dictionary-results { width: min(var(--max-width), 92%); margin: 0 auto; padding: 44px 0 64px; }
.word-card, .details-card, .recent-searches-card { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.word-card {
  min-height: 390px;
  padding: 36px;
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.word-information { min-width: 0; }
.word-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.word-heading h2 { font-size: clamp(42px, 5vw, 64px); line-height: 1; letter-spacing: -1px; }
.audio-button, .favorite-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}
.audio-button { color: var(--primary); background: var(--surface-muted); }
.audio-button:hover { transform: scale(1.06); color: #ffffff; background: var(--primary); }
.favorite-button { color: var(--primary); background: transparent; border: 1px solid var(--border); }
.favorite-button:hover { transform: scale(1.06); background: #fff0f5; color: #e43d6f; }
.phonetic { margin-top: 14px; color: var(--text-soft); font-size: 23px; }
.definition-divider { width: 100%; height: 1px; margin: 22px 0; background: var(--border); }
.part-of-speech, .meaning-type { color: var(--primary); font-style: italic; font-weight: 600; }
.definition-text { margin-top: 10px; font-size: 17px; }
.definition-example { margin-top: 14px; color: var(--text-soft); font-style: italic; }
.word-image-wrapper { overflow: hidden; border-radius: 16px; box-shadow: var(--shadow-md); }
.word-image { height: 310px; object-fit: cover; transition: transform 0.5s ease; }
.word-image-wrapper:hover .word-image { transform: scale(1.035); }

.dictionary-details-grid { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.details-card { min-height: 270px; padding: 28px; border-radius: var(--radius-md); }
.details-card-heading, .recent-searches-title { display: flex; align-items: center; gap: 12px; }
.details-card-heading h3, .recent-searches-title h3 { font-size: 20px; }
.details-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--primary); border: 1px solid var(--accent); border-radius: 50%; }

.meanings-list { margin-top: 18px; }
.meaning-item { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 0; }
.meaning-item + .meaning-item { border-top: 1px solid var(--border); }
.meaning-dot { width: 9px; height: 9px; margin-top: 9px; border-radius: 50%; background: var(--primary); }
.meaning-definition { margin-top: 4px; color: var(--text); font-size: 14px; }

.synonym-list { margin-top: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.synonym-button, .history-button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #31236d;
  background: linear-gradient(135deg, #f3edff, #eee6ff);
  transition: transform var(--transition), background var(--transition), color var(--transition);
}
.synonym-button:hover, .history-button:hover { transform: translateY(-2px); color: #ffffff; background: linear-gradient(135deg, var(--primary-light), var(--primary)); }

.recent-searches-card { margin-top: 22px; padding: 26px 28px; border-radius: var(--radius-md); }
.recent-searches-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.clear-history-button { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--text-soft); transition: color var(--transition); }
.clear-history-button:hover { color: var(--primary); }
.recent-searches-list { margin-top: 22px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }

.favorites-section, .about-section { width: min(900px, 92%); margin: 0 auto; padding: 56px 0 70px; }
.section-heading { text-align: center; margin-bottom: 28px; }
.section-label { margin-bottom: 8px; color: var(--primary); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.section-heading h2 { font-size: 36px; }
.empty-state, .about-section > p { padding: 26px; color: var(--text-soft); text-align: center; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }

.site-footer {
  width: min(var(--max-width), 92%);
  margin: 0 auto 24px;
  padding: 30px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(248, 245, 255, 0.96), rgba(239, 233, 255, 0.96));
  box-shadow: var(--shadow-sm);
}
.footer-content { display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer-content h2 { font-size: 18px; }
.footer-content > p { margin-top: 6px; color: var(--text-soft); font-size: 14px; }
.social-links { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 18px; }
.social-links a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--primary); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform var(--transition), background var(--transition), color var(--transition); }
.social-links a:hover { transform: translateY(-3px); color: #ffffff; background: var(--primary); }
.footer-credit { margin-top: 14px !important; font-size: 12px !important; }
.footer-credit a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

body.dark-mode {
  --bg: #11111b;
  --surface: #1a1a28;
  --surface-soft: #202033;
  --surface-muted: #292941;
  --text: #f7f5ff;
  --text-soft: #c6c2d9;
  --text-faint: #9b96b0;
  --border: #35334a;
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 24px 54px rgba(0, 0, 0, 0.35);
  background: linear-gradient(180deg, #11111b 0%, #171723 42%, #11111b 100%);
}
body.dark-mode .app-wrapper, body.dark-mode .site-header { background: rgba(17, 17, 27, 0.88); }
body.dark-mode .hero-section {
  background:
    radial-gradient(circle at 15% 30%, rgba(108, 61, 244, 0.22), transparent 28%),
    radial-gradient(circle at 85% 24%, rgba(143, 114, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #171723 0%, #1b1b2b 100%);
}
body.dark-mode .search-form,
body.dark-mode .word-card,
body.dark-mode .details-card,
body.dark-mode .recent-searches-card,
body.dark-mode .site-footer,
body.dark-mode .theme-toggle { background: var(--surface); }
body.dark-mode .site-footer { background: linear-gradient(135deg, #1c1c2d, #24243a); }
body.dark-mode .social-links a { background: var(--surface-muted); }
body.dark-mode .error-message { color: #ffb7c8; border-color: #5a2a38; background: #321b24; }

@media (max-width: 992px) {
  .navbar { grid-template-columns: 1fr auto; gap: 20px; padding-top: 10px; }
  .nav-links { order: 3; grid-column: 1 / -1; justify-content: center; padding-bottom: 10px; }
  .theme-toggle { justify-self: end; }
  .word-card { grid-template-columns: 1fr; }
  .word-image-wrapper { max-width: 620px; width: 100%; margin: 0 auto; }
  .recent-searches-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .navbar { width: min(94%, 680px); }
  .brand-text small { display: none; }
  .nav-links { gap: 18px; overflow-x: auto; justify-content: flex-start; padding-bottom: 12px; }
  .nav-links a { white-space: nowrap; padding: 12px 0; }
  .nav-links a::after { bottom: 4px; }
  .hero-section { padding: 58px 16px 52px; }
  .hero-content h1 { font-size: clamp(38px, 11vw, 54px); }
  .hero-content > p { font-size: 14px; }
  .hero-decoration { opacity: 0.55; }
  .search-form { grid-template-columns: auto 1fr auto; padding: 8px 8px 8px 16px; }
  .search-button { grid-column: 1 / -1; width: 100%; margin-top: 4px; }
  .dictionary-results { width: min(94%, 680px); padding-top: 30px; }
  .word-card { padding: 24px; gap: 28px; }
  .word-image { height: 270px; }
  .dictionary-details-grid { grid-template-columns: 1fr; }
  .synonym-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recent-searches-heading { align-items: flex-start; }
  .recent-searches-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { width: min(94%, 680px); }
}

@media (max-width: 480px) {
  .brand-icon { width: 38px; height: 38px; font-size: 27px; }
  .brand-text strong { font-size: 18px; }
  .theme-toggle { width: 60px; }
  .hero-content h1 { letter-spacing: -1.2px; }
  .decoration-left, .decoration-right { display: none; }
  .word-card { padding: 20px; }
  .word-heading h2 { font-size: 42px; }
  .phonetic { font-size: 19px; }
  .definition-text { font-size: 15px; }
  .word-image { height: 220px; }
  .details-card, .recent-searches-card { padding: 22px 18px; }
  .details-card-heading h3, .recent-searches-title h3 { font-size: 17px; }
  .recent-searches-heading { flex-direction: column; }
  .clear-history-button { align-self: flex-end; }
  .recent-searches-list, .synonym-list { grid-template-columns: 1fr 1fr; }
  .search-form input { font-size: 15px; }
}

/* ========================================
   WORDWISE — PART 2 POLISH
   Add this at the bottom of style.css
======================================== */

/* Better keyboard accessibility */

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(108, 61, 244, 0.3);
  outline-offset: 4px;
}

/* Smooth selection colour */

::selection {
  color: #ffffff;
  background: var(--primary);
}

/* Custom scrollbar */

::-webkit-scrollbar {
  width: 11px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    var(--primary-light),
    var(--primary)
  );
  border: 3px solid var(--surface-soft);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ========================================
   NAVIGATION POLISH
======================================== */

.brand-icon {
  transition:
    transform 0.35s ease,
    color 0.35s ease;
}

.brand:hover .brand-icon {
  color: var(--primary-light);
  transform: rotate(-7deg) scale(1.08);
}

.theme-toggle {
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

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

/* ========================================
   HERO DECORATION ANIMATIONS
======================================== */

.decoration-left {
  animation: float-left 5.5s ease-in-out infinite;
}

.decoration-right {
  animation: float-right 6.5s ease-in-out infinite;
}

@keyframes float-left {
  0%,
  100% {
    transform: translateY(0) rotate(-12deg);
  }

  50% {
    transform: translateY(-15px) rotate(-8deg);
  }
}

@keyframes float-right {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(-18px) rotate(4deg);
  }
}

/* Soft appearance when the page opens */

.hero-content {
  animation: hero-arrival 0.75s ease both;
}

@keyframes hero-arrival {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   SEARCH BAR INTERACTIONS
======================================== */

.search-form {
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.search-form:focus-within {
  transform: translateY(-3px);
  border-color: rgba(108, 61, 244, 0.55);
  box-shadow:
    0 18px 42px rgba(83, 48, 176, 0.16),
    0 0 0 5px rgba(108, 61, 244, 0.08);
}

.search-icon {
  transition:
    color var(--transition),
    transform var(--transition);
}

.search-form:focus-within .search-icon {
  color: var(--primary);
  transform: scale(1.08);
}

.search-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.search-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: -120%;

  width: 70%;
  height: 100%;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.38),
    transparent
  );

  transform: skewX(-20deg);
  transition: left 0.65s ease;
}

.search-button:hover::before {
  left: 150%;
}

.search-button:active {
  transform: translateY(0) scale(0.98);
}

/* ========================================
   CARD MICRO-INTERACTIONS
======================================== */

.word-card,
.details-card,
.recent-searches-card {
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.word-card:hover,
.details-card:hover,
.recent-searches-card:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 61, 244, 0.28);
  box-shadow: var(--shadow-md);
}

/* Results animation.
   Add the class "results-visible" with JavaScript after a search. */

.dictionary-results.results-visible .word-card {
  animation: result-rise 0.6s ease both;
}

.dictionary-results.results-visible .details-card {
  animation: result-rise 0.6s 0.12s ease both;
}

.dictionary-results.results-visible .recent-searches-card {
  animation: result-rise 0.6s 0.22s ease both;
}

@keyframes result-rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   AUDIO BUTTON
======================================== */

.audio-button i {
  transition: transform 0.3s ease;
}

.audio-button:hover i {
  animation: speaker-pulse 0.7s ease;
}

.audio-button.is-playing {
  color: #ffffff;
  background: var(--primary);
  animation: audio-ring 1.2s ease infinite;
}

@keyframes speaker-pulse {
  0%,
  100% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.22);
  }
}

@keyframes audio-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(108, 61, 244, 0.32);
  }

  100% {
    box-shadow: 0 0 0 13px rgba(108, 61, 244, 0);
  }
}

/* ========================================
   FAVORITE BUTTON
======================================== */

.favorite-button i {
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

.favorite-button:hover i {
  transform: scale(1.15);
}

.favorite-button.is-favorite {
  color: #e43d6f;
  border-color: rgba(228, 61, 111, 0.25);
  background: #fff0f5;
}

.favorite-button.is-favorite i {
  animation: heart-pop 0.45s ease;
}

@keyframes heart-pop {
  0% {
    transform: scale(0.7);
  }

  55% {
    transform: scale(1.35);
  }

  100% {
    transform: scale(1);
  }
}

/* ========================================
   SYNONYMS AND HISTORY
======================================== */

.synonym-button,
.history-button {
  position: relative;
  overflow: hidden;
}

.synonym-button::after,
.history-button::after {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255, 255, 255, 0.38),
    transparent 70%
  );

  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.synonym-button:hover::after,
.history-button:hover::after {
  transform: translateX(120%);
}

/* ========================================
   LOADING SKELETON
======================================== */

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-muted);
  color: transparent !important;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );

  transform: translateX(-100%);
  animation: skeleton-shimmer 1.35s infinite;
}

@keyframes skeleton-shimmer {
  to {
    transform: translateX(100%);
  }
}

/* ========================================
   ERROR MESSAGE ANIMATION
======================================== */

.error-message:not(.hidden) {
  animation: error-arrival 0.45s ease both;
}

@keyframes error-arrival {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }

  65% {
    transform: translateY(3px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.site-footer {
  position: relative;
  overflow: hidden;
}

.site-footer::before,
.site-footer::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.site-footer::before {
  top: -70px;
  left: -60px;

  width: 150px;
  height: 150px;

  background: rgba(143, 114, 255, 0.1);
}

.site-footer::after {
  right: -50px;
  bottom: -80px;

  width: 170px;
  height: 170px;

  background: rgba(108, 61, 244, 0.09);
}

.footer-content {
  position: relative;
  z-index: 1;
}

/* ========================================
   DARK MODE POLISH
======================================== */

body.dark-mode ::-webkit-scrollbar-track {
  background: #151520;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  border-color: #151520;
}

body.dark-mode .favorite-button.is-favorite {
  color: #ff85aa;
  border-color: rgba(255, 133, 170, 0.3);
  background: rgba(228, 61, 111, 0.12);
}

body.dark-mode .skeleton::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
}

/* ========================================
   SMALL SCREEN POLISH
======================================== */

@media (max-width: 768px) {
  .word-card:hover,
  .details-card:hover,
  .recent-searches-card:hover {
    transform: none;
  }

  .search-form:focus-within {
    transform: none;
  }
}

/* ========================================
   REDUCED MOTION
======================================== */

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