/* ============================================================
   WISDOMAI PRO — අල්ත්‍රා-ප්‍රිමියම් සිනමාත්මක 2026 UI
   main.css (v4.0.0 - සම්පූර්ණ සිංහල සහයෝගය + ජංගම සංශෝධන)
   ============================================================ */

/* ── 1. ගූගල් ෆොන්ට්ස් ආයාතය ─────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300&family=Noto+Sans+Sinhala:wght@300;400;500;600;700;800;900&display=swap');

/* ── 2. නිර්මාණ ටෝකන් පද්ධතිය ─────────────────────────────── */
:root {
  /* මූල පැලට් */
  --cyber-cyan: #00f2ff;
  --cyber-cyan-dim: rgba(0, 242, 255, 0.15);
  --cyber-cyan-glow: rgba(0, 242, 255, 0.35);
  --electric-purple: #7000ff;
  --purple-dim: rgba(112, 0, 255, 0.15);
  --purple-glow: rgba(112, 0, 255, 0.40);
  --accent-rose: #ff2d78;
  --accent-gold: #ffd60a;
  --neon-green: #00ff9d;

  /* මධ්‍යස්ථ පැලට් */
  --void: #020408;
  --deep-space: #050b14;
  --midnight: #080f1e;
  --surface-1: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.11);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-mid: rgba(255, 255, 255, 0.13);
  --border-bright: rgba(255, 255, 255, 0.20);

  /* පෙළ */
  --text-primary: #f0f4ff;
  --text-secondary: rgba(200, 210, 240, 0.70);
  --text-muted: rgba(160, 175, 210, 0.45);
  --text-inverse: #020408;

  /* අනුක්‍රම */
  --grad-brand: linear-gradient(135deg, var(--cyber-cyan) 0%, var(--electric-purple) 100%);
  --grad-brand-r: linear-gradient(135deg, var(--electric-purple) 0%, var(--cyber-cyan) 100%);
  --grad-glass: linear-gradient(135deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.02) 50%,
      rgba(0, 242, 255, 0.03) 100%);
  --grad-title: linear-gradient(100deg,
      #ffffff 0%,
      var(--cyber-cyan) 30%,
      #a78bfa 65%,
      var(--cyber-cyan) 85%,
      #ffffff 100%);

  /* සෙවනැලි */
  --shadow-card: 0 32px 80px rgba(0, 0, 0, 0.65),
    0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-cyan: 0 0 20px rgba(0, 242, 255, 0.25),
    0 0 60px rgba(0, 242, 255, 0.10);
  --shadow-purple: 0 0 20px rgba(112, 0, 255, 0.30),
    0 0 60px rgba(112, 0, 255, 0.12);
  --shadow-btn: 0 8px 32px rgba(0, 242, 255, 0.20),
    0 2px 8px rgba(0, 0, 0, 0.40);

  /* වටකුරු බව */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* කාල පරාසයන් */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.30, 1);
  --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);

  /* පිරිසැලසුම */
  --panel-width: 45%;
  --form-max: 480px;

  /* ෆොන්ට් */
  --font-sinhala: 'Noto Sans Sinhala', 'Outfit', system-ui, sans-serif;
  --font-primary: 'Outfit', 'Noto Sans Sinhala', system-ui, sans-serif;
  --font-secondary: 'Plus Jakarta Sans', 'Noto Sans Sinhala', system-ui, sans-serif;
}

/* ── 3. ගෝලීය යළි පිහිටුවීම සහ පදනම ─────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background: var(--void);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  line-height: 1.6;
}

/* ජංගම උපාංගවලදී සාමාන්‍ය කර්සරය */
@media (pointer: coarse) {
  body { cursor: auto !important; }
}

@media (pointer: fine) {
  body { cursor: none; }
}

/* ── 4. සජීවී අන්තර්ගත පසුබිම ─────────────────────── */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  animation: orbFloat 18s var(--ease-in-out-quart) infinite alternate;
}

body::before {
  width: min(700px, 80vw);
  height: min(700px, 80vw);
  background: radial-gradient(circle,
      rgba(112, 0, 255, 0.18) 0%,
      rgba(0, 242, 255, 0.06) 60%,
      transparent 100%);
  top: -200px;
  right: -200px;
  animation-duration: 22s;
}

body::after {
  width: min(550px, 70vw);
  height: min(550px, 70vw);
  background: radial-gradient(circle,
      rgba(0, 242, 255, 0.14) 0%,
      rgba(112, 0, 255, 0.05) 60%,
      transparent 100%);
  bottom: -150px;
  left: -150px;
  animation-duration: 16s;
  animation-delay: -8s;
}

.main-auth-wrapper::before {
  content: '';
  position: fixed;
  width: min(400px, 50vw);
  height: min(400px, 50vw);
  background: radial-gradient(circle,
      rgba(255, 45, 120, 0.10) 0%,
      transparent 70%);
  bottom: 20%;
  right: 10%;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 14s var(--ease-in-out-quart) infinite alternate-reverse;
  animation-delay: -4s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.08); }
  66% { transform: translate(-20px, 25px) scale(0.95); }
  100% { transform: translate(15px, -15px) scale(1.04); }
}

/* තාරකා ක්ෂේත්‍ර පසුබිම */
body {
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(112, 0, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 242, 255, 0.05) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.90' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.025'/%3E%3C/svg%3E");
  background-size: cover, cover, 200px 200px;
}

/* ── 5. ප්‍රධාන ආවරණය ────────────────────────────── */
.main-auth-wrapper {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* පද්ධති තත්ත්වය */
.system-status {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  border: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-secondary);
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
}

.system-status:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.status-dot {
  height: 8px;
  width: 8px;
  background-color: var(--neon-green);
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 10px var(--neon-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ශබ්ද පාලකය */
.audio-control {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  transition: all 0.3s var(--ease-spring);
  font-size: 1rem;
}

.audio-control:hover {
  background: var(--cyber-cyan);
  color: var(--void);
  box-shadow: 0 0 20px var(--cyber-cyan-glow);
  transform: scale(1.1);
}

.audio-control.muted {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* ── 6. දෘශ්‍ය පැනලය (වම් පස) ─────────────────────────────── */
.visual-panel {
  width: var(--panel-width);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.visual-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
      rgba(2, 4, 8, 0.10) 0%,
      rgba(5, 11, 20, 0.30) 40%,
      rgba(2, 4, 8, 0.90) 100%);
  z-index: 1;
}

.visual-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 3px,
      rgba(0, 242, 255, 0.008) 3px,
      rgba(0, 242, 255, 0.008) 4px);
  z-index: 2;
  pointer-events: none;
}

.visual-content {
  position: relative;
  width: 100%;
  height: 100%;
}

.visual-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  animation: kenBurns 28s var(--ease-in-out-quart) infinite alternate;
  transform-origin: center center;
}

@keyframes kenBurns {
  0% { transform: scale(1.00) translate(0%, 0%); }
  25% { transform: scale(1.06) translate(-1.5%, 1%); }
  50% { transform: scale(1.10) translate(1%, -1.5%); }
  75% { transform: scale(1.07) translate(-0.5%, 1.5%); }
  100% { transform: scale(1.04) translate(1.5%, -0.5%); }
}

.overlay-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 48px 52px;
  z-index: 3;
  background: linear-gradient(0deg,
      rgba(2, 4, 8, 0.95) 0%,
      rgba(5, 11, 20, 0.70) 55%,
      transparent 100%);
  backdrop-filter: blur(4px);
}

.overlay-text h3 {
  font-family: var(--font-sinhala);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #ffffff;
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.overlay-text h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 48px;
  height: 2px;
  background: var(--grad-brand);
  border-radius: var(--radius-pill);
}

.overlay-text p {
  font-family: var(--font-secondary);
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  font-weight: 400;
  color: rgba(200, 215, 245, 0.72);
  line-height: 1.7;
  max-width: 380px;
  margin-top: 20px;
}

/* ── 7. සත්‍යාපන ආවරණය (දකුණු පස) ──────────────────────────── */
.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
  position: relative;
  z-index: 2;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cyber-cyan-dim) transparent;
}

.auth-container::-webkit-scrollbar {
  width: 4px;
}

.auth-container::-webkit-scrollbar-track {
  background: transparent;
}

.auth-container::-webkit-scrollbar-thumb {
  background: var(--cyber-cyan-dim);
  border-radius: var(--radius-pill);
}

/* ── 8. ආකෘති ආවරණය — ප්‍රිමියම් ග්ලාස්මෝර්ෆිසම් ──────────── */
.form-container {
  width: 100%;
  max-width: var(--form-max);
  position: relative;
  padding: 44px 42px 40px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--grad-glass), rgba(8, 15, 30, 0.75);
  backdrop-filter: blur(48px) saturate(180%) brightness(1.05);
  -webkit-backdrop-filter: blur(48px) saturate(180%) brightness(1.05);
  border: 1px solid var(--border-mid);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    inset 0 -1px 1px rgba(0, 0, 0, 0.30),
    0 0 0 0.5px rgba(255, 255, 255, 0.04);
  animation: formReveal 0.9s var(--ease-out-expo) both;
}

.form-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

.form-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(0, 242, 255, 0.50) 30%,
      rgba(112, 0, 255, 0.40) 70%,
      transparent 100%);
  border-radius: var(--radius-pill);
  pointer-events: none;
  z-index: 1;
}

.form-container > * {
  position: relative;
  z-index: 2;
}

@keyframes formReveal {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.97);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ── 9. මාතෘකාව — මෙටලික්/නියොන් අනුක්‍රම ─────────────────── */
.title {
  font-family: var(--font-sinhala);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 10px;
  text-align: center;
  background: var(--grad-title);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleShimmer 5s var(--ease-smooth) infinite;
}

.title .fa-brain {
  display: inline-block;
  margin-right: 10px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.40));
  font-size: 0.9em;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

@keyframes titleShimmer {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

/* ── 10. උපමාතෘකාව ───────────────────────────────────────── */
.subtitle {
  font-family: var(--font-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-align: center;
  letter-spacing: 0.01em;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* ── 11. ආකෘති අන්තර්ගතය ───────────────────────────────────── */
.form-content {
  width: 100%;
}

/* ── 12. පාවෙන ලේබල් ආදාන කාණ්ඩ ──────────────────────────── */
.input-group {
  margin-bottom: 20px;
}

.floating-label-group {
  position: relative;
}

.floating-label-group input {
  width: 100%;
  padding: 18px 44px 8px 16px;
  font-family: var(--font-primary);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  background: rgba(10, 18, 35, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color 0.35s var(--ease-smooth),
    box-shadow 0.35s var(--ease-smooth),
    background 0.35s var(--ease-smooth),
    transform 0.20s var(--ease-spring);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(0, 0, 0, 0.20);
}

/* ඔටෝෆිල් ප්‍රතික්‍රියාව */
.floating-label-group input:-webkit-autofill,
.floating-label-group input:-webkit-autofill:hover,
.floating-label-group input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px rgba(10, 18, 35, 0.90) inset;
  transition: background-color 9999s ease;
  caret-color: var(--cyber-cyan);
}

.floating-label-group label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  pointer-events: none;
  letter-spacing: 0.02em;
  transition:
    top 0.28s var(--ease-out-expo),
    transform 0.28s var(--ease-out-expo),
    font-size 0.28s var(--ease-out-expo),
    color 0.28s var(--ease-smooth),
    letter-spacing 0.28s var(--ease-smooth);
}

.floating-label-group input:not(:placeholder-shown) ~ label,
.floating-label-group input:focus ~ label {
  top: 10px;
  transform: translateY(0);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.floating-label-group input:not(:placeholder-shown) ~ label {
  color: var(--text-secondary);
}

.floating-label-group input:focus {
  background: rgba(0, 242, 255, 0.03);
  border-color: rgba(0, 242, 255, 0.50);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 3px rgba(0, 242, 255, 0.08),
    0 0 0 1px rgba(0, 242, 255, 0.30),
    0 0 24px rgba(0, 242, 255, 0.10),
    0 8px 32px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(0, 242, 255, 0.06);
}

.floating-label-group input:focus ~ label {
  color: var(--cyber-cyan);
}

.floating-label-group:focus-within {
  border-radius: var(--radius-md);
  box-shadow:
    0 0 0 1px rgba(112, 0, 255, 0.12),
    0 0 40px rgba(112, 0, 255, 0.04);
}

.floating-label-group input[readonly] {
  opacity: 0.55;
  cursor: not-allowed;
  border-style: dashed;
  border-color: var(--border-subtle);
}

/* ── 13. පණිවිඩ ආවරණ ─────────────────────────────────────── */
.message-container {
  min-height: 20px;
  margin-top: 6px;
}

.message-container p {
  font-family: var(--font-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  line-height: 1.5;
}

/* ── 14. කැප්ස් ලොක් අනතුරු ඇඟවීම ──────────────────────────── */
.caps-lock-warning {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 14px;
  font-family: var(--font-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--accent-gold);
  background: rgba(255, 214, 10, 0.06);
  border: 1px solid rgba(255, 214, 10, 0.18);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
}

.caps-lock-warning .fa-exclamation-triangle {
  font-size: 0.75rem;
  filter: drop-shadow(0 0 4px rgba(255, 214, 10, 0.40));
}

/* ── 15. වෙන්කරුවා ────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  font-family: var(--font-primary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      var(--border-mid) 40%,
      var(--border-mid) 60%,
      transparent);
}

/* ── 16. බොත්තම් ආවරණ ───────────────────────────────────── */
.button-container {
  margin-top: 8px;
}

/* ── 17. සජීවී බොත්තම — පදනම ──────────────────────────── */
.dynamic-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 14px 24px;
  font-family: var(--font-sinhala);
  font-size: 0.925rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  overflow: hidden;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition:
    transform 0.30s var(--ease-spring),
    box-shadow 0.30s var(--ease-smooth),
    opacity 0.25s var(--ease-smooth),
    background 0.30s var(--ease-smooth);
  background: linear-gradient(135deg,
      rgba(0, 242, 255, 0.80) 0%,
      rgba(112, 0, 255, 0.85) 100%);
  box-shadow:
    0 4px 20px rgba(0, 242, 255, 0.15),
    0 1px 4px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dynamic-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 65%;
  height: 100%;
  background: linear-gradient(105deg,
      transparent 0%,
      rgba(255, 255, 255, 0.18) 45%,
      rgba(255, 255, 255, 0.08) 55%,
      transparent 100%);
  transform: skewX(-20deg);
  transition: left 0s;
  pointer-events: none;
}

.dynamic-button::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-md) + 2px);
  background: var(--grad-brand);
  z-index: -1;
  opacity: 0;
  filter: blur(12px);
  transition: opacity 0.35s var(--ease-smooth);
}

.dynamic-button:hover:not(:disabled) {
  transform: scale(1.025) translateY(-2px);
  box-shadow:
    var(--shadow-btn),
    0 12px 40px rgba(0, 242, 255, 0.22),
    0 4px 16px rgba(112, 0, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.dynamic-button:hover:not(:disabled)::before {
  left: 120%;
  transition: left 0.65s var(--ease-out-expo);
}

.dynamic-button:hover:not(:disabled)::after {
  opacity: 0.40;
}

.dynamic-button:active:not(:disabled) {
  transform: scale(0.985) translateY(0px);
  box-shadow:
    0 2px 12px rgba(0, 242, 255, 0.14),
    0 1px 4px rgba(0, 0, 0, 0.35);
  transition-duration: 0.10s;
}

.dynamic-button:focus-visible {
  outline: 2px solid var(--cyber-cyan);
  outline-offset: 3px;
}

.dynamic-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.6);
  transform: none !important;
  box-shadow: none !important;
}

/* ── 18. සමාජ සත්‍යාපන බොත්තම් පේළිය ─────────────────────────── */
.auth-btn-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 4px;
}

/* ── 19. සමාජ බොත්තම් ──────────────────────────────────── */
.social-btn {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-secondary) !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  padding: 11px 8px !important;
  border-radius: var(--radius-md) !important;
  gap: 6px !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.25) !important;
  transition:
    background 0.30s var(--ease-smooth),
    border-color 0.30s var(--ease-smooth),
    color 0.30s var(--ease-smooth),
    transform 0.30s var(--ease-spring),
    box-shadow 0.30s var(--ease-smooth) !important;
}

.social-btn:hover:not(:disabled) {
  transform: scale(1.03) translateY(-2px) !important;
}

.google-btn:hover:not(:disabled) {
  background: rgba(66, 133, 244, 0.12) !important;
  border-color: rgba(66, 133, 244, 0.40) !important;
  color: #8ab4f8 !important;
  box-shadow: 0 0 16px rgba(66, 133, 244, 0.15), inset 0 1px 0 rgba(66, 133, 244, 0.10) !important;
}

.fb-btn:hover:not(:disabled) {
  background: rgba(24, 119, 242, 0.12) !important;
  border-color: rgba(24, 119, 242, 0.40) !important;
  color: #6e95fe !important;
  box-shadow: 0 0 16px rgba(24, 119, 242, 0.15), inset 0 1px 0 rgba(24, 119, 242, 0.08) !important;
}

.github-btn:hover:not(:disabled) {
  background: rgba(200, 200, 200, 0.08) !important;
  border-color: rgba(200, 200, 200, 0.30) !important;
  color: #e0e0e0 !important;
  box-shadow: 0 0 16px rgba(200, 200, 200, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.microsoft-btn:hover:not(:disabled) {
  background: rgba(0, 120, 215, 0.12) !important;
  border-color: rgba(0, 120, 215, 0.40) !important;
  color: #60a5fa !important;
  box-shadow: 0 0 16px rgba(0, 120, 215, 0.15), inset 0 1px 0 rgba(0, 120, 215, 0.08) !important;
}

.yahoo-btn:hover:not(:disabled) {
  background: rgba(112, 0, 255, 0.12) !important;
  border-color: rgba(112, 0, 255, 0.40) !important;
  color: #a78bfa !important;
  box-shadow: 0 0 16px rgba(112, 0, 255, 0.15), inset 0 1px 0 rgba(112, 0, 255, 0.08) !important;
}

.apple-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.30) !important;
  color: #ffffff !important;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}

.game-center-btn {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-secondary) !important;
  font-size: 0.78rem !important;
}

.game-center-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

.google-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0.9) saturate(0.9);
  transition: filter 0.25s var(--ease-smooth),
              transform 0.3s var(--ease-spring),
              opacity 0.25s ease;
}

.social-btn:hover .google-icon {
  filter: brightness(1) saturate(1);
  transform: scale(1.15);
  opacity: 1;
}

/* ── 20. මුරපදය අමතක වීමේ සබැඳිය ───────────────────────────── */
.forgot-password {
  display: inline-block;
  font-family: var(--font-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cyber-cyan);
  text-decoration: none;
  letter-spacing: 0.02em;
  margin: 6px 0 18px;
  position: relative;
  transition: color 0.25s var(--ease-smooth), text-shadow 0.25s var(--ease-smooth);
}

.forgot-password::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 1px;
  background: var(--grad-brand);
  border-radius: var(--radius-pill);
  transition: width 0.30s var(--ease-out-expo);
}

.forgot-password:hover {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(0, 242, 255, 0.45);
}

.forgot-password:hover::after {
  width: 100%;
}

/* ── 21. මුරපද ශක්ති පටි ──────────────────────────────── */
.password-strength-container {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 10px;
}

.strength-bar {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: var(--grad-brand);
  transition:
    width 0.45s var(--ease-out-expo),
    background 0.35s var(--ease-smooth);
  box-shadow: 0 0 8px rgba(0, 242, 255, 0.30);
}

.strength-label {
  font-family: var(--font-secondary);
  font-size: 0.7rem;
  margin-top: 6px;
  display: block;
  font-weight: 600;
  transition: color 0.3s ease;
}

/* ── 22. මුරපද ටොගල් නිකුත් කිරීම ──────────────────────── */
.password-toggle {
  transition: color 0.2s ease, transform 0.2s ease;
}

.password-toggle:hover {
  transform: scale(1.1);
}

/* ── 23. සමාජ බොත්තම් තුළ අයිකන ──────────────────────────── */
.social-btn i,
.dynamic-button i {
  font-size: 1em;
  line-height: 1;
  transition: transform 0.25s var(--ease-spring);
}

.social-btn:hover i {
  transform: scale(1.15);
}

/* ── 24. ලියාපදිංචි සමාජ පේළිය ──────────────────────────── */
#newUserSection .auth-btn-row {
  grid-template-columns: 1fr 1fr;
  margin-top: 22px;
  gap: 12px;
}

#newUserSection .auth-btn-row .dynamic-button {
  font-size: 0.82rem !important;
  padding: 12px 14px !important;
}

/* ── 25. නියුරල් ආරක්ෂක UI ──────────────────────────────── */
.security-verify-container {
  margin: 24px 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(0, 242, 255, 0.15);
  text-align: center;
}

.security-label {
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--cyber-cyan);
  margin-bottom: 16px;
  opacity: 0.8;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-secondary);
}

.sync-track {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 50px;
  position: relative;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.neural-core {
  width: 40px;
  height: 40px;
  background: var(--cyber-cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--void);
  cursor: grab;
  box-shadow: 0 0 20px var(--cyber-cyan-glow), 0 0 40px rgba(0, 242, 255, 0.15);
  z-index: 10;
  transition: transform 0.2s, box-shadow 0.3s;
  position: relative;
  left: 0;
  font-size: 1.1rem;
}

.neural-core:hover {
  box-shadow: 0 0 30px var(--cyber-cyan-glow), 0 0 60px rgba(0, 242, 255, 0.20);
  transform: scale(1.05);
}

.neural-core:active {
  cursor: grabbing;
  transform: scale(0.95);
}

.sync-socket {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.15);
  transition: all 0.4s ease;
  font-size: 1rem;
}

.sync-socket.verified {
  background: rgba(0, 255, 157, 0.15);
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 25px rgba(0, 255, 157, 0.3);
  animation: socketPulse 2s infinite;
}

@keyframes socketPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(0, 255, 157, 0.3); }
  50% { box-shadow: 0 0 30px rgba(0, 255, 157, 0.5); }
}

.sync-socket.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ── 26. වලංගුතා ප්‍රතිපෝෂණ ──────────────────────────────── */
.validation-feedback {
  font-family: var(--font-secondary);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 27. ටෝස්ට් දැනුම්දීම් ───────────────────────────────── */
.custom-toast {
  font-family: var(--font-sinhala) !important;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-content i {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ── 28. අභිරහික කර්සරය (ඩෙස්ක්ටොප් පමණි) ─────────────────── */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  background: var(--cyber-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.7),
    0 0 30px rgba(0, 242, 255, 0.35);
  transition: width 0.3s ease, height 0.3s ease, background 0.3s ease;
  transform: translate(-50%, -50%);
  will-change: transform;
  animation: cursorPulse 2s infinite;
}

#cursor.hovered {
  width: 50px;
  height: 50px;
  background: rgba(0, 242, 255, 0.12);
  border: 2px solid var(--cyber-cyan);
  box-shadow: 0 0 25px rgba(0, 242, 255, 0.5);
  mix-blend-mode: screen;
}

@keyframes cursorPulse {
  0% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 15px rgba(0, 242, 255, 0.7); }
  50% { transform: translate(-50%, -50%) scale(1.2); box-shadow: 0 0 25px rgba(0, 242, 255, 0.9); }
  100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 15px rgba(0, 242, 255, 0.7); }
}

/* ජංගමයේදී කර්සරය සඟවන්න */
@media (pointer: coarse) {
  #cursor { display: none !important; }
  body { cursor: auto !important; }
}

/* ── 29. ප්‍රතිචාර ලක්ෂ්‍ය ──────────────────────────── */
@media (max-width: 960px) {
  :root { --panel-width: 40%; }
  .form-container { padding: 36px 28px 32px; }
  .overlay-text { padding: 40px 32px 32px; }
}

@media (max-width: 768px) {
  .main-auth-wrapper {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .visual-panel {
    width: 100%;
    height: 200px;
    flex-shrink: 0;
  }

  .visual-image {
    height: 200px;
  }

  .overlay-text {
    padding: 24px 24px 20px;
  }

  .overlay-text h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
  }

  .overlay-text h3::after {
    width: 32px;
    bottom: -4px;
  }

  .overlay-text p {
    display: none;
  }

  .auth-container {
    flex: 1;
    align-items: flex-start;
    padding: 20px 16px 32px;
    overflow-y: visible;
  }

  .form-container {
    padding: 28px 20px 24px;
    border-radius: var(--radius-lg);
    max-width: 100%;
  }

  .auth-btn-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .social-btn {
    font-size: 0.7rem !important;
    padding: 10px 6px !important;
  }

  .system-status {
    top: 10px;
    right: 10px;
    font-size: 0.6rem;
    padding: 6px 10px;
  }

  .audio-control {
    bottom: 15px;
    right: 15px;
    width: 38px;
    height: 38px;
  }

  body { overflow: auto; }
}

@media (max-width: 480px) {
  .form-container {
    padding: 24px 16px 20px;
    border-radius: var(--radius-md);
  }

  .title {
    font-size: 1.4rem;
  }

  .subtitle {
    font-size: 0.8rem;
    margin-bottom: 24px;
  }

  .auth-btn-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .social-btn {
    font-size: 0.68rem !important;
    padding: 9px 4px !important;
    gap: 4px !important;
  }

  .google-icon {
    width: 14px;
    height: 14px;
  }

  .floating-label-group input {
    padding: 16px 40px 6px 14px;
    font-size: 0.875rem;
  }

  .floating-label-group label {
    font-size: 0.8rem;
  }

  .floating-label-group input:not(:placeholder-shown) ~ label,
  .floating-label-group input:focus ~ label {
    font-size: 0.6rem;
    top: 8px;
  }

  .dynamic-button {
    padding: 12px 20px;
    font-size: 0.875rem;
  }

  .security-verify-container {
    padding: 14px;
  }

  .sync-track {
    padding: 10px 16px;
    height: 48px;
  }

  .neural-core {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }

  .sync-socket {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }
}

/* ── 30. අඩු චලන ප්‍රවේශ්‍යතාව ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .visual-image {
    animation: none;
    transform: scale(1.04);
  }

  body::before,
  body::after,
  .main-auth-wrapper::before {
    animation: none;
  }

  .title {
    animation: none;
    background-position: 0% center;
  }

  #cursor {
    animation: none;
  }
}

/* ── 31. තේරීමේ වර්ණය ──────────────────────────────────── */
::selection {
  background: rgba(0, 242, 255, 0.20);
  color: #ffffff;
}

::-moz-selection {
  background: rgba(0, 242, 255, 0.20);
  color: #ffffff;
}

/* ── 32. කර්සරය සම්බන්ධය ───────────────────────────────────── */
input, textarea {
  caret-color: var(--cyber-cyan);
}

/* ── 33. ප්‍රවේශ්‍යතා අමතර ─────────────────────────────────── */
.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;
}

/* ෆෝකස් දෘශ්‍යය */
:focus-visible {
  outline: 2px solid var(--cyber-cyan);
  outline-offset: 2px;
}

/* ── 34. ලෝඩින් තත්ත්වය ──────────────────────────────────── */
.dynamic-button.loading {
  pointer-events: none;
  opacity: 0.7;
}

.dynamic-button.loading::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinLoader 0.75s linear infinite;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spinLoader {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── 35. ආකෘති කොටස් මාරුව ──────────────────────────────── */
#emailCheckForm,
#existingUserSection,
#newUserSection {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── 36. අමතර ඇනිමේෂන් ──────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s var(--ease-out-expo) both;
}

/* ── END OF main.css ─────────────────────────────────────── */