/* ============================================================
   WORD UNSCRAMBLER – Main Stylesheet
   Mobile-first, modern design, AdSense-ready
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  --primary: #6c3fff;
  --primary-dark: #5429e8;
  --primary-light: #8b65ff;
  --secondary: #ff6b35;
  --accent: #00d4aa;
  --dark: #0f0e17;
  --dark-2: #1a1828;
  --dark-3: #252336;
  --mid: #3d3a5c;
  --light: #f5f4ff;
  --light-2: #eeedf8;
  --white: #ffffff;
  --text: #2d2b3d;
  --text-muted: #6b6880;
  --text-light: #9895a8;
  --border: #e2e0f0;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(108,63,255,.08);
  --shadow: 0 8px 30px rgba(108,63,255,.12);
  --shadow-lg: 0 20px 60px rgba(108,63,255,.18);
  --transition: .2s ease;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Poppins', 'Inter', sans-serif;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
code {
  background: rgba(108,63,255,.1);
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: .88em;
  font-family: monospace;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}
.section-padding { padding: 80px 0; }
.bg-light { background: var(--light); }
.bg-dark { background: var(--dark-2); }
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Typography ---- */
h1,h2,h3,h4 { font-family: var(--font-heading); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: 0 4px 20px rgba(108,63,255,.35);
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108,63,255,.45);
  color: var(--white);
}
.btn-primary:active { transform: translateY(0); }
.btn-large { padding: 18px 40px; font-size: 1.1rem; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 20px rgba(0,0,0,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1rem;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -.3px;
}
.logo-text strong { color: var(--primary); }
.main-nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
}
.main-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.main-nav a:hover, .main-nav a.active {
  background: var(--light);
  color: var(--primary);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background: linear-gradient(150deg, var(--dark) 0%, var(--dark-2) 40%, #1e1244 100%);
  padding: 80px 0 60px;
  overflow: hidden;
}
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .25;
}
.shape-1 {
  width: 500px; height: 500px;
  background: var(--primary);
  top: -150px; right: -100px;
}
.shape-2 {
  width: 300px; height: 300px;
  background: var(--accent);
  bottom: -80px; left: -60px;
}
.shape-3 {
  width: 200px; height: 200px;
  background: var(--secondary);
  top: 50%; left: 40%;
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: #c9c1ff;
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
  letter-spacing: .3px;
}
.hero-badge i { color: var(--accent); }
.hero-title {
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.hero-sub {
  color: #b0a8d0;
  font-size: clamp(.95rem, 2vw, 1.1rem);
  max-width: 600px;
  margin-bottom: 36px;
  line-height: 1.7;
}

/* ---- Tool Card ---- */
.tool-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  max-width: 780px;
  margin-bottom: 32px;
}
.input-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.input-wrapper {
  flex: 1;
  min-width: 200px;
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-size: .9rem;
  pointer-events: none;
}
#letters-input {
  width: 100%;
  padding: 16px 50px 16px 44px;
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  background: var(--light);
  letter-spacing: .5px;
  text-transform: uppercase;
}
#letters-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(108,63,255,.12);
  background: white;
}
#letters-input::placeholder {
  text-transform: none;
  font-weight: 400;
  color: var(--text-light);
}
.clear-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  padding: 6px;
  border-radius: 50%;
  display: none;
  transition: all var(--transition);
  font-size: .85rem;
}
.clear-btn:hover { background: var(--light-2); color: var(--text); }
.clear-btn.visible { display: flex; align-items: center; justify-content: center; }
.unscramble-btn {
  padding: 16px 28px;
  font-size: 1rem;
  border-radius: 50px;
}

/* Advanced Options */
.advanced-options { margin-top: 14px; }
.advanced-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .87rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  transition: color var(--transition);
}
.advanced-toggle:hover { color: var(--primary); }
.toggle-arrow { transition: transform .25s ease; }
.advanced-toggle[aria-expanded="true"] .toggle-arrow { transform: rotate(180deg); }
.advanced-panel {
  margin-top: 16px;
  padding: 20px;
  background: var(--light);
  border-radius: var(--radius);
  animation: slideDown .2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.option-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.option-group input,
.option-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: var(--font-body);
  color: var(--text);
  background: white;
  outline: none;
  transition: border-color var(--transition);
}
.option-group input:focus,
.option-group select:focus { border-color: var(--primary); }

/* Results Area */
.results-area {
  margin-top: 24px;
  min-height: 120px;
}
.results-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.results-placeholder i {
  font-size: 2rem;
  color: #d4d0f0;
  margin-bottom: 12px;
}
.results-placeholder p { margin-bottom: 6px; font-size: .9rem; }
.results-placeholder .tip { font-size: .82rem; color: var(--text-light); }
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.results-count {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}
.results-letters {
  font-size: .85rem;
  color: var(--text-muted);
  margin-left: 10px;
}
.copy-all-btn {
  background: var(--light-2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.copy-all-btn:hover { background: var(--light); color: var(--primary); border-color: var(--primary); }

/* Word Groups */
.word-group { margin-bottom: 24px; }
.word-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.word-group-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}
.word-group-count {
  background: var(--primary);
  color: white;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.words-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.word-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--light);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 7px 12px;
  cursor: pointer;
  transition: all .15s ease;
  position: relative;
}
.word-chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108,63,255,.25);
}
.word-chip:hover .word-text,
.word-chip:hover .word-score { color: white; }
.word-text {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.word-score {
  font-size: .68rem;
  color: var(--text-light);
  font-weight: 500;
}
.no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.no-results i {
  font-size: 2rem;
  color: #d4d0f0;
  margin-bottom: 12px;
}
.no-results p { margin-bottom: 4px; font-size: .9rem; }

/* Spinner */
.spinner {
  display: none;
  text-align: center;
  padding: 40px;
}
.spinner.active { display: block; }
.spinner-ring {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Trust Bar */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 780px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8a80bc;
  font-size: .85rem;
  font-weight: 500;
}
.trust-item i { color: var(--accent); }

/* ============================================================
   ADS
   ============================================================ */
.ad-section { padding: 20px 0; background: #fafaf9; }
.ad-unit { display: flex; justify-content: center; align-items: center; }
.ad-placeholder {
  border: 1px dashed #d4d0ea;
  border-radius: var(--radius-sm);
  background: #f8f7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b8b4d0;
  font-size: .78rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-weight: 500;
}
.ad-leaderboard .ad-placeholder { width: 100%; max-width: 728px; height: 90px; }
.ad-rectangle .ad-placeholder { width: 300px; height: 250px; }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
}
.section-label {
  display: inline-block;
  background: rgba(108,63,255,.1);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}
.section-header h2 { margin-bottom: 14px; }
.section-header p { color: var(--text-muted); font-size: 1rem; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.step-card {
  flex: 1;
  min-width: 220px;
  max-width: 300px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all .25s ease;
  position: relative;
}
.step-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.step-number {
  position: absolute;
  top: 16px; left: 20px;
  font-size: 2.4rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--light-2);
  line-height: 1;
}
.step-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: white;
  margin: 0 auto 18px;
}
.step-card h3 { margin-bottom: 10px; }
.step-card p { color: var(--text-muted); font-size: .9rem; }
.step-arrow {
  font-size: 1.2rem;
  color: var(--primary-light);
  padding-top: 40px;
  flex-shrink: 0;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1.5px solid var(--border);
  transition: all .25s ease;
}
.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.feature-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: white;
  margin-bottom: 20px;
}
.gradient-purple { background: linear-gradient(135deg, #6c3fff, #9f6ef5); }
.gradient-blue   { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.gradient-green  { background: linear-gradient(135deg, #10b981, #34d399); }
.gradient-orange { background: linear-gradient(135deg, #f59e0b, #fcd34d); }
.gradient-pink   { background: linear-gradient(135deg, #ec4899, #f472b6); }
.gradient-teal   { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); font-size: .9rem; line-height: 1.6; }

/* ============================================================
   GAMES SECTION
   ============================================================ */
.games-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.game-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 10px 20px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  transition: all .2s ease;
  cursor: default;
}
.game-badge:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  transform: scale(1.04);
}
.game-badge i { color: var(--primary); font-size: .85rem; }
.game-badge:hover i { color: white; }

/* ============================================================
   STATS SECTION
   ============================================================ */
.stats-section { padding: 60px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: center;
}
.stat-card {
  padding: 32px 20px;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -1px;
}
.stat-label {
  color: #7a75a0;
  font-size: .9rem;
  font-weight: 500;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item[open] { border-color: var(--primary); }
.faq-question {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  gap: 12px;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question span { flex: 1; }
.faq-icon {
  flex-shrink: 0;
  font-size: .8rem;
  color: var(--primary);
  transition: transform .25s ease;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  padding: 0 24px 20px;
  color: var(--text-muted);
  font-size: .93rem;
  line-height: 1.7;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section { padding: 0 0 80px; }
.cta-card {
  background: linear-gradient(135deg, var(--dark) 0%, #1e1244 100%);
  border-radius: var(--radius-xl);
  padding: 60px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  overflow: hidden;
  position: relative;
}
.cta-content { max-width: 500px; }
.cta-content h2 {
  color: white;
  margin-bottom: 16px;
}
.cta-content p {
  color: #b0a8d0;
  margin-bottom: 30px;
  font-size: 1rem;
}
.cta-btn { background: linear-gradient(135deg, var(--accent), #00a88a); }
.cta-btn:hover { box-shadow: 0 8px 30px rgba(0,212,170,.4); }
.cta-visual { flex-shrink: 0; }
.floating-words {
  position: relative;
  width: 200px;
  height: 160px;
}
.fw {
  position: absolute;
  font-family: var(--font-heading);
  font-weight: 800;
  color: rgba(255,255,255,.08);
  font-size: 2rem;
  animation: floatWord 6s ease-in-out infinite;
}
.fw-1 { top: 0; left: 0; animation-delay: 0s; }
.fw-2 { top: 30px; right: 0; animation-delay: .8s; }
.fw-3 { top: 80px; left: 20px; animation-delay: 1.6s; }
.fw-4 { bottom: 20px; right: 20px; animation-delay: 2.4s; }
.fw-5 { bottom: 0; left: 60px; animation-delay: 3.2s; }
@keyframes floatWord {
  0%, 100% { transform: translateY(0) rotate(-5deg); opacity: .08; }
  50% { transform: translateY(-10px) rotate(5deg); opacity: .18; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--dark);
  color: #8a80bc;
  padding: 60px 0 0;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 2fr;
  gap: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand .logo .logo-text { color: #ccc8e8; }
.footer-brand p {
  font-size: .88rem;
  line-height: 1.7;
  color: #6e6990;
  max-width: 320px;
}
.footer-disclaimer {
  font-size: .78rem !important;
  margin-top: 12px !important;
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 12px;
}
.footer-disclaimer a { color: var(--primary-light); }
.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.footer-nav-group h4 {
  color: #ccc8e8;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 16px;
}
.footer-nav-group li { margin-bottom: 10px; }
.footer-nav-group a {
  color: #6e6990;
  font-size: .88rem;
  transition: color var(--transition);
}
.footer-nav-group a:hover { color: var(--primary-light); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: .82rem; color: #4a4669; }
.footer-links-inline {
  display: flex;
  gap: 16px;
}
.footer-links-inline a {
  color: #4a4669;
  font-size: .82rem;
  transition: color var(--transition);
}
.footer-links-inline a:hover { color: var(--primary-light); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 48px; height: 48px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(108,63,255,.35);
  opacity: 0;
  transform: translateY(10px);
  transition: all .3s ease;
  z-index: 900;
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 88px; right: 28px;
  background: var(--dark-3);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: .87rem;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
  opacity: 0;
  transform: translateY(6px);
  transition: all .25s ease;
  pointer-events: none;
  z-index: 1000;
  max-width: 280px;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   INNER PAGE STYLES (Privacy, ToS, Contact)
   ============================================================ */
.inner-hero {
  background: linear-gradient(150deg, var(--dark) 0%, #1a1244 100%);
  padding: 60px 0 50px;
  text-align: center;
}
.inner-hero h1 { color: white; margin-bottom: 12px; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.inner-hero p { color: #b0a8d0; font-size: 1rem; max-width: 560px; margin: 0 auto; }
.inner-hero .breadcrumb {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: .82rem;
  color: #7a74a0;
  margin-bottom: 16px;
}
.inner-hero .breadcrumb a { color: var(--primary-light); }
.inner-hero .breadcrumb a:hover { color: white; }
.inner-hero .breadcrumb span { color: #4a4669; }

.content-page { padding: 60px 0 80px; }
.content-wrap {
  max-width: 840px;
  margin: 0 auto;
}
.content-wrap h2 {
  font-size: 1.35rem;
  color: var(--text);
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light-2);
}
.content-wrap h2:first-child { margin-top: 0; }
.content-wrap p, .content-wrap li {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}
.content-wrap ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 14px;
}
.content-wrap a { color: var(--primary); }
.content-wrap a:hover { text-decoration: underline; }
.content-wrap .last-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: .82rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 36px;
}

/* Contact Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}
.contact-info h3 { margin-bottom: 20px; }
.contact-info p { color: var(--text-muted); font-size: .93rem; margin-bottom: 20px; }
.contact-info-items { display: flex; flex-direction: column; gap: 16px; }
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--light);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.contact-info-item i {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: .85rem;
  flex-shrink: 0;
}
.contact-info-item strong { display: block; font-size: .85rem; color: var(--text); margin-bottom: 2px; }
.contact-info-item span { font-size: .82rem; color: var(--text-muted); }
.contact-form-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.contact-form-card h3 { margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .93rem;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--light);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,63,255,.1);
  background: white;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group .required { color: var(--secondary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.submit-btn-wrap { margin-top: 6px; }
.form-success {
  text-align: center;
  padding: 40px 20px;
  display: none;
}
.form-success i {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 16px;
}
.form-success h3 { margin-bottom: 10px; }
.form-success p { color: var(--text-muted); font-size: .93rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .cta-card { flex-direction: column; padding: 48px 32px; }
  .cta-visual { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .step-arrow { display: none; }
}

@media (max-width: 768px) {
  .section-padding { padding: 60px 0; }
  .main-nav {
    position: absolute;
    top: 66px; left: 0; right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    display: none;
    z-index: 999;
  }
  .main-nav.open { display: block; }
  .main-nav ul {
    flex-direction: column;
    padding: 16px 20px;
    gap: 4px;
  }
  .main-nav a { display: block; padding: 12px 16px; border-radius: 8px; }
  .nav-toggle { display: flex; }
  .site-header { position: sticky; }

  .hero { padding: 60px 0 40px; }
  .tool-card { padding: 22px; border-radius: var(--radius-lg); }
  .input-group { flex-direction: column; gap: 10px; }
  .unscramble-btn { width: 100%; justify-content: center; padding: 15px; }
  .input-wrapper { min-width: 100%; }
  .trust-bar { gap: 12px; }
  .ad-leaderboard .ad-placeholder { height: 60px; max-width: 100%; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .tool-card { padding: 18px; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form-card { padding: 24px; }
  .back-to-top { bottom: 20px; right: 20px; }
  .toast { bottom: 76px; right: 16px; }
  .steps-grid { flex-direction: column; align-items: center; }
  .step-card { max-width: 100%; }
}

/* ============================================================
   LOADING ANIMATION
   ============================================================ */
.loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 40px;
}
.loading-dots span {
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 50%;
  animation: dotBounce .6s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: .1s; }
.loading-dots span:nth-child(3) { animation-delay: .2s; }
@keyframes dotBounce {
  0%, 100% { transform: scale(.8); opacity: .5; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* Print */
@media print {
  .site-header, .ad-section, .back-to-top, .toast, .cta-section { display: none; }
}
