/* ============================================================
   TextEase Shared Design System
   Single source of truth for all static HTML pages.
   Matches the homepage (App.tsx) Tailwind design exactly.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(to bottom right, #eff6ff, #fdf2f8, #faf5ff);
  color: #1a1a1a;
  transition: background-color 0.5s ease, color 0.5s ease;
  line-height: 1.7;
}

body.dark-mode {
  background: linear-gradient(to bottom right, #111827, #0f172a, #020617);
  color: #f1f5f9;
}

/* ---- Floating theme toggle ---- */
.theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  padding: 0.75rem;
  border-radius: 9999px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  z-index: 50;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

.theme-toggle:active {
  transform: scale(0.9);
}

body.dark-mode .theme-toggle {
  background: rgba(30,41,59,0.8);
  border-color: #334155;
}

body.dark-mode .theme-toggle:hover {
  background: rgba(51,65,85,0.8);
}

@media (min-width: 640px) {
  .theme-toggle {
    top: 2rem;
    right: 2rem;
    padding: 1rem;
  }
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun { color: #f59e0b; }
.theme-toggle .icon-moon { color: #fde047; }

.theme-tooltip {
  position: absolute;
  right: 100%;
  margin-right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.375rem 0.75rem;
  background: #111827;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
}

.theme-toggle:hover .theme-tooltip {
  opacity: 1;
}

/* ---- Header ---- */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(243,244,246,0.5);
  transition: all 0.5s ease;
}

body.dark-mode header {
  background: rgba(15,23,42,0.8);
  border-bottom-color: rgba(51,65,85,0.5);
}

.header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 4rem;
}

@media (min-width: 640px) {
  .header-inner {
    padding: 1rem 2rem;
    padding-right: 5rem;
  }
}

@media (min-width: 768px) {
  .header-inner {
    padding: 1rem 3rem;
    padding-right: 3rem;
  }
}

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

@media (min-width: 640px) {
  .header-left { gap: 1rem; }
}

.logo-box {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  padding: 0.25rem;
}

@media (min-width: 640px) {
  .logo-box { width: 3rem; height: 3rem; }
}

body.dark-mode .logo-box {
  background: rgba(30,41,59,0.5);
}

.logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.dark-mode .logo-box img {
  filter: brightness(1.1) contrast(1.25);
}

.site-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.site-title h2 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #111827;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .site-title h2 { font-size: 1.25rem; }
}

body.dark-mode .site-title h2 {
  color: #fff;
}

.site-title p {
  font-size: 0.75rem;
  color: #6b7280;
}

@media (min-width: 640px) {
  .site-title p { font-size: 0.875rem; }
}

body.dark-mode .site-title p {
  color: #9ca3af;
}

/* Desktop nav */
.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
}

.nav-desktop a {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  color: #4b5563;
}

.nav-desktop a:hover {
  transform: scale(1.05);
  color: #111827;
  background: #f3f4f6;
}

body.dark-mode .nav-desktop a {
  color: #d1d5db;
}

body.dark-mode .nav-desktop a:hover {
  color: #fff;
  background: rgba(30,41,59,0.6);
}

.nav-desktop a.active {
  color: #111827;
  background: #f3f4f6;
}

body.dark-mode .nav-desktop a.active {
  color: #fff;
  background: rgba(30,41,59,0.6);
}

/* Desktop dropdown (Text Tools) */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.3s ease;
  color: #4b5563;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-dropdown-btn:hover {
  transform: scale(1.05);
  color: #111827;
  background: #f3f4f6;
}

.nav-dropdown-btn .chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.nav-dropdown.open .nav-dropdown-btn .chevron {
  transform: rotate(180deg);
}

body.dark-mode .nav-dropdown-btn {
  color: #d1d5db;
}

body.dark-mode .nav-dropdown-btn:hover {
  color: #fff;
  background: rgba(30,41,59,0.6);
}

.nav-dropdown-btn.active {
  color: #111827;
  background: #f3f4f6;
}

body.dark-mode .nav-dropdown-btn.active {
  color: #fff;
  background: rgba(30,41,59,0.6);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  min-width: 12rem;
  border-radius: 1rem;
  padding: 0.5rem;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(229,231,235,0.8);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  flex-direction: column;
  gap: 0.125rem;
  z-index: 50;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu a {
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  color: #4b5563;
}

.nav-dropdown-menu a:hover {
  color: #111827;
  background: #f3f4f6;
}

.nav-dropdown-menu a.active {
  color: #111827;
  background: #f3f4f6;
  font-weight: 600;
}

body.dark-mode .nav-dropdown-menu {
  background: rgba(15,23,42,0.95);
  border-color: rgba(51,65,85,0.8);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

body.dark-mode .nav-dropdown-menu a {
  color: #d1d5db;
}

body.dark-mode .nav-dropdown-menu a:hover {
  color: #fff;
  background: rgba(30,41,59,0.6);
}

body.dark-mode .nav-dropdown-menu a.active {
  color: #fff;
  background: rgba(30,41,59,0.6);
}

/* Mobile menu button */
.menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
  cursor: pointer;
  background: rgba(255,255,255,0.8);
  border: 1px solid #e5e7eb;
  color: #4b5563;
}

body.dark-mode .menu-btn {
  background: rgba(30,41,59,0.6);
  border-color: #334155;
  color: #e5e7eb;
}

.menu-btn:hover {
  transform: scale(1.1);
}

.menu-btn:active {
  transform: scale(0.9);
}

.menu-btn svg {
  width: 20px;
  height: 20px;
}

@media (min-width: 768px) {
  .menu-btn { display: none; }
}

/* Mobile menu */
.mobile-menu {
  display: none;
  border-top: 1px solid rgba(243,244,246,0.5);
  background: rgba(255,255,255,0.95);
  transition: all 0.3s ease;
}

body.dark-mode .mobile-menu {
  background: rgba(15,23,42,0.95);
  border-top-color: rgba(51,65,85,0.5);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.5rem;
  gap: 0.25rem;
}

.mobile-menu a {
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  color: #4b5563;
}

.mobile-menu a:hover {
  color: #111827;
  background: #f3f4f6;
}

body.dark-mode .mobile-menu a {
  color: #d1d5db;
}

body.dark-mode .mobile-menu a:hover {
  color: #fff;
  background: rgba(30,41,59,0.6);
}

.mobile-menu a.active {
  color: #111827;
  background: #f3f4f6;
}

body.dark-mode .mobile-menu a.active {
  color: #fff;
  background: rgba(30,41,59,0.6);
}

/* Mobile dropdown label */
.mobile-menu .mobile-dropdown-label {
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

body.dark-mode .mobile-menu .mobile-dropdown-label {
  color: #6b7280;
}

/* ---- Page container ---- */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem 1rem;
}

@media (min-width: 640px) {
  main { padding: 0.75rem 2rem 1rem; }
}

@media (min-width: 768px) {
  main { padding: 0.75rem 3rem 1rem; }
}

.page-container {
  width: 100%;
  max-width: 56rem;
  padding-top: 1.5rem;
}

/* ---- Typography ---- */
h1 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  background: linear-gradient(to bottom right, #111827, #374151, #4b5563);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 640px) {
  h1 { font-size: 2.25rem; }
}

@media (min-width: 768px) {
  h1 { font-size: 3rem; }
}

body.dark-mode h1 {
  background: linear-gradient(to bottom right, #fff, #dbeafe, #bfdbfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

@media (min-width: 640px) {
  .subtitle { font-size: 1rem; }
}

body.dark-mode .subtitle {
  color: #9ca3af;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
  color: #111827;
  line-height: 1.3;
}

@media (min-width: 640px) {
  h2 { font-size: 1.875rem; }
}

body.dark-mode h2 {
  color: #fff;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #059669;
}

body.dark-mode h3 {
  color: #34d399;
}

p {
  margin-bottom: 1rem;
  color: #4b5563;
  line-height: 1.7;
}

body.dark-mode p {
  color: #d1d5db;
}

strong {
  font-weight: 600;
  color: #111827;
}

body.dark-mode strong {
  color: #fff;
}

a {
  color: #2563eb;
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  text-decoration: underline;
}

body.dark-mode a {
  color: #60a5fa;
}

/* ---- Back link ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom: 1.25rem;
  color: #4b5563;
}

.back-link:hover {
  transform: scale(1.05);
  color: #111827;
  background: #f3f4f6;
  text-decoration: none;
}

body.dark-mode .back-link {
  color: #d1d5db;
}

body.dark-mode .back-link:hover {
  color: #fff;
  background: rgba(30,41,59,0.6);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

/* ---- Tool card ---- */
.tool-card {
  backdrop-filter: blur(16px);
  border-radius: 2rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(243,244,246,0.5);
  box-shadow: 0 8px 30px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
}

@media (min-width: 640px) {
  .tool-card { padding: 1.5rem; }
}

@media (min-width: 768px) {
  .tool-card { padding: 2rem; }
}

body.dark-mode .tool-card {
  background: rgba(15,23,42,0.6);
  border-color: rgba(51,65,85,0.5);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.card-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ---- Textarea ---- */
.tool-textarea {
  width: 100%;
  height: 8rem;
  padding: 1rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  border-radius: 1.5rem;
  border: 1px solid rgba(229,231,235,0.8);
  outline: none;
  resize: none;
  transition: all 0.3s ease;
  font-weight: 400;
  backdrop-filter: blur(4px);
  background: rgba(255,255,255,0.8);
  color: #1f2937;
  line-height: 1.6;
}

.tool-textarea::placeholder {
  color: #9ca3af;
}

.tool-textarea:focus {
  border-color: #d1d5db;
}

@media (min-width: 640px) {
  .tool-textarea { font-size: 1.125rem; }
}

body.dark-mode .tool-textarea {
  background: rgba(30,41,59,0.6);
  border-color: rgba(51,65,85,0.8);
  color: #f3f4f6;
}

body.dark-mode .tool-textarea::placeholder {
  color: #6b7280;
}

body.dark-mode .tool-textarea:focus {
  border-color: #475569;
}

/* ---- Inputs ---- */
.find-replace-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .find-replace-row { flex-direction: row; }
}

.input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.input-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
}

body.dark-mode .input-group label {
  color: #9ca3af;
}

.input-group input {
  width: 100%;
  padding: 0.625rem 1.25rem;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  border-radius: 9999px;
  border: 1px solid rgba(229,231,235,0.8);
  outline: none;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.8);
  color: #1f2937;
  backdrop-filter: blur(4px);
}

.input-group input::placeholder {
  color: #9ca3af;
}

.input-group input:focus {
  border-color: #d1d5db;
}

body.dark-mode .input-group input {
  background: rgba(30,41,59,0.6);
  border-color: rgba(51,65,85,0.8);
  color: #f3f4f6;
}

body.dark-mode .input-group input::placeholder {
  color: #6b7280;
}

body.dark-mode .input-group input:focus {
  border-color: #475569;
}

/* ---- Options ---- */
.options-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  user-select: none;
}

body.dark-mode .checkbox-group {
  color: #d1d5db;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #2563eb;
}

/* ---- Match count ---- */
.match-count {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
}

body.dark-mode .match-count {
  color: #9ca3af;
}

/* ---- Stats ---- */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-label {
  color: #9ca3af;
}

body.dark-mode .stat-label {
  color: #6b7280;
}

.stat-value {
  font-weight: 600;
  color: #111827;
}

body.dark-mode .stat-value {
  color: #fff;
}

/* ---- Buttons ---- */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  padding-top: 0.75rem;
  border-top: 1px solid #f3f4f6;
}

body.dark-mode .button-row {
  border-top-color: #334155;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  line-height: 1.2;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.btn:active:not(:disabled) {
  transform: scale(0.95);
}

.btn-primary {
  background: linear-gradient(to right, #2563eb, #0891b2);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(37,99,235,0.4);
}

body.dark-mode .btn-primary {
  background: linear-gradient(to right, #2563eb, #0891b2);
}

.btn-secondary {
  background: rgba(255,255,255,0.8);
  border: 1px solid #e5e7eb;
  color: #4b5563;
}

.btn-secondary:hover:not(:disabled) {
  border-color: #d1d5db;
}

body.dark-mode .btn-secondary {
  background: rgba(30,41,59,0.6);
  border-color: #334155;
  color: #e5e7eb;
}

body.dark-mode .btn-secondary:hover:not(:disabled) {
  background: rgba(30,41,59,0.8);
  border-color: #475569;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  animation: toastSlideUp 0.3s ease-out;
}

.toast-inner {
  background: rgba(17,24,39,0.95);
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 0.875rem 1.5rem;
  border-radius: 9999px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.toast-check {
  color: #34d399;
  display: flex;
  align-items: center;
}

.toast-check svg {
  width: 18px;
  height: 18px;
}

@keyframes toastSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ---- Content sections ---- */
.content-sections {
  width: 100%;
  transition: background-color 0.5s ease;
  background: #f9fafb;
}

body.dark-mode .content-sections {
  background: #111827;
}

.content-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

@media (min-width: 640px) {
  .content-inner { padding: 4rem 2rem; }
}

@media (min-width: 768px) {
  .content-inner { padding: 5rem 3rem; }
}

.content-sections h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 2rem;
  transition: color 0.5s ease;
  color: #111827;
}

@media (min-width: 640px) {
  .content-sections h2 { font-size: 2.25rem; }
}

body.dark-mode .content-sections h2 {
  color: #fff;
}

.content-sections h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  transition: color 0.5s ease;
  color: #059669;
}

body.dark-mode .content-sections h3 {
  color: #34d399;
}

.content-sections p {
  line-height: 1.7;
  transition: color 0.5s ease;
  color: #4b5563;
}

body.dark-mode .content-sections p {
  color: #d1d5db;
}

.content-sections strong {
  font-weight: 600;
  color: #111827;
}

body.dark-mode .content-sections strong {
  color: #fff;
}

.how-to-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  list-style: none;
  color: #4b5563;
}

body.dark-mode .how-to-list {
  color: #d1d5db;
}

.how-to-list li {
  display: flex;
  gap: 1rem;
}

.how-to-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 700;
  color: #fff;
  font-size: 0.875rem;
  background: #374151;
}

body.dark-mode .how-to-number {
  background: #2563eb;
}

.how-to-list h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #111827;
}

body.dark-mode .how-to-list h3 {
  color: #fff;
}

.how-to-list p {
  line-height: 1.7;
  color: #6b7280;
}

body.dark-mode .how-to-list p {
  color: #9ca3af;
}

.pro-tip {
  margin-top: 2rem;
  padding: 1rem;
  border-radius: 0.5rem;
  transition: color 0.5s ease;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

body.dark-mode .pro-tip {
  background: rgba(30,41,59,0.4);
  color: #93c5fd;
  border-color: #334155;
}

.info-card {
  padding: 2rem;
  border-radius: 0.5rem;
  transition: color 0.5s ease;
  background: #fff;
  border: 1px solid #e5e7eb;
}

body.dark-mode .info-card {
  background: rgba(30,41,59,0.4);
  border-color: #334155;
}

/* ---- Page content (for static pages) ---- */
.page-content {
  max-width: 42rem;
  margin: 0 auto;
}

.page-content h1 {
  margin-bottom: 2rem;
}

.page-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content .last-updated {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

body.dark-mode .page-content .last-updated {
  color: #9ca3af;
  border-top-color: #334155;
}

/* ---- Email highlight (contact page) ---- */
.email-highlight {
  display: inline-block;
  background: rgba(37,99,235,0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.95rem;
  margin: 0.5rem 0;
  word-break: break-all;
  transition: all 0.3s ease;
}

.email-highlight a {
  color: #2563eb;
  text-decoration: none;
}

.email-highlight a:hover {
  text-decoration: none;
}

body.dark-mode .email-highlight {
  background: rgba(37,99,235,0.2);
}

body.dark-mode .email-highlight a {
  color: #60a5fa;
}

/* ---- AdSense ---- */
.adsense-container {
  margin: 2.5rem auto;
  text-align: center;
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid rgba(229,231,235,0.5);
  background: rgba(255,255,255,0.9);
  padding: 2rem 1.5rem;
  transition: all 0.5s ease;
}

body.dark-mode footer {
  background: rgba(15,23,42,0.9);
  border-top-color: rgba(51,65,85,0.5);
}

.footer-content {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .footer-content { padding: 0 2rem; }
}

@media (min-width: 768px) {
  .footer-content { padding: 0 3rem; }
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 640px) {
  .footer-links { gap: 2rem; }
}

.footer-links a {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  color: #4b5563;
}

.footer-links a:hover {
  text-decoration: underline;
  color: #111827;
}

body.dark-mode .footer-links a {
  color: #9ca3af;
}

body.dark-mode .footer-links a:hover {
  color: #e5e7eb;
}

.footer-copyright {
  font-size: 0.75rem;
  transition: color 0.5s ease;
  color: #6b7280;
}

body.dark-mode .footer-copyright {
  color: #6b7280;
}

/* ---- Responsive ---- */
@media (max-width: 639px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .tool-card { padding: 1.25rem; border-radius: 1.5rem; }
  .stats-row { gap: 1rem; }
  .page-content h1 { margin-bottom: 1.5rem; }
  .content-inner { padding: 2.5rem 1.5rem; }
}
