/**
 * Wordnus VocabDetails - World-Class Design System
 * Full motion animations, light/dark theme, mobile-first
 */

/* ============================================
   CSS CUSTOM PROPERTIES (THEMING)
   ============================================ */

:root {
  /* Light Theme (Default) */
  --wn-bg: #f8fafc;
  --wn-bg-elevated: #ffffff;
  --wn-surface: #ffffff;
  --wn-surface-hover: #f1f5f9;
  --wn-surface-active: #e2e8f0;

  --wn-text: #0f172a;
  --wn-text-secondary: #475569;
  --wn-text-muted: #64748b;
  --wn-text-faint: #94a3b8;

  --wn-border: #e2e8f0;
  --wn-border-subtle: #f1f5f9;
  --wn-divider: #e2e8f0;

  --wn-primary: #6366f1;
  --wn-primary-hover: #4f46e5;
  --wn-primary-light: #eef2ff;
  --wn-primary-text: #ffffff;

  --wn-success: #10b981;
  --wn-success-light: #d1fae5;
  --wn-success-text: #065f46;

  --wn-warning: #f59e0b;
  --wn-warning-light: #fef3c7;
  --wn-warning-text: #92400e;

  --wn-error: #ef4444;
  --wn-error-light: #fee2e2;
  --wn-error-text: #991b1b;

  --wn-synonym: #10b981;
  --wn-synonym-bg: rgba(16, 185, 129, 0.1);
  --wn-antonym: #ef4444;
  --wn-antonym-bg: rgba(239, 68, 68, 0.1);

  /* Shadows */
  --wn-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --wn-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --wn-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --wn-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --wn-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Skeleton */
  --wn-skeleton-base: #e2e8f0;
  --wn-skeleton-shine: #f8fafc;

  /* Spacing */
  --wn-space-xs: 0.25rem;
  --wn-space-sm: 0.5rem;
  --wn-space-md: 1rem;
  --wn-space-lg: 1.5rem;
  --wn-space-xl: 2rem;
  --wn-space-2xl: 3rem;

  /* Border Radius */
  --wn-radius-sm: 0.375rem;
  --wn-radius: 0.5rem;
  --wn-radius-md: 0.75rem;
  --wn-radius-lg: 1rem;
  --wn-radius-xl: 1.5rem;
  --wn-radius-full: 9999px;

  /* Typography */
  --wn-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --wn-font-serif: 'Crimson Pro', Georgia, serif;

  /* Transitions */
  --wn-transition-fast: 150ms ease;
  --wn-transition: 200ms ease;
  --wn-transition-slow: 300ms ease;
  --wn-transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --wn-z-base: 1;
  --wn-z-dropdown: 100;
  --wn-z-sticky: 200;
  --wn-z-fixed: 300;
  --wn-z-modal-backdrop: 400;
  --wn-z-modal: 500;
  --wn-z-toast: 600;

  /* Layout */
  --wn-header-height: 56px;
  --wn-progress-bar-height: 32px;
  --wn-footer-height: 72px;
  --wn-bottom-bar-height: 72px;
  --wn-max-width: 720px;
  --wn-safe-area-top: env(safe-area-inset-top, 0px);
  --wn-safe-area-bottom: env(safe-area-inset-bottom, 0px);

  /* Frame Colors */
  --wn-frame-color: #6366f1;
  --wn-frame-color-light: #818cf8;
  --wn-frame-glow: rgba(99, 102, 241, 0.3);
  --wn-frame-width: 6px;

  /* Accent */
  --wn-accent: #8b5cf6;
  --wn-primary-dark: #4f46e5;
}

/* Dark Theme */
[data-theme="dark"] {
  --wn-bg: #0f172a;
  --wn-bg-elevated: #1e293b;
  --wn-surface: #1e293b;
  --wn-surface-hover: #334155;
  --wn-surface-active: #475569;

  --wn-text: #f1f5f9;
  --wn-text-secondary: #cbd5e1;
  --wn-text-muted: #94a3b8;
  --wn-text-faint: #64748b;

  --wn-border: #334155;
  --wn-border-subtle: #1e293b;
  --wn-divider: #334155;

  --wn-primary: #818cf8;
  --wn-primary-hover: #a5b4fc;
  --wn-primary-light: rgba(129, 140, 248, 0.15);
  --wn-primary-text: #0f172a;

  --wn-success-light: rgba(16, 185, 129, 0.15);
  --wn-success-text: #34d399;

  --wn-warning-light: rgba(245, 158, 11, 0.15);
  --wn-warning-text: #fbbf24;

  --wn-error-light: rgba(239, 68, 68, 0.15);
  --wn-error-text: #f87171;

  --wn-synonym-bg: rgba(16, 185, 129, 0.15);
  --wn-antonym-bg: rgba(239, 68, 68, 0.15);

  --wn-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --wn-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --wn-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --wn-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
  --wn-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);

  --wn-skeleton-base: #334155;
  --wn-skeleton-shine: #475569;
}

/* System Preference Auto-Detection */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --wn-bg: #0f172a;
    --wn-bg-elevated: #1e293b;
    --wn-surface: #1e293b;
    --wn-surface-hover: #334155;
    --wn-surface-active: #475569;

    --wn-text: #f1f5f9;
    --wn-text-secondary: #cbd5e1;
    --wn-text-muted: #94a3b8;
    --wn-text-faint: #64748b;

    --wn-border: #334155;
    --wn-border-subtle: #1e293b;
    --wn-divider: #334155;

    --wn-primary: #818cf8;
    --wn-primary-hover: #a5b4fc;
    --wn-primary-light: rgba(129, 140, 248, 0.15);
    --wn-primary-text: #0f172a;

    --wn-success-light: rgba(16, 185, 129, 0.15);
    --wn-success-text: #34d399;

    --wn-warning-light: rgba(245, 158, 11, 0.15);
    --wn-warning-text: #fbbf24;

    --wn-error-light: rgba(239, 68, 68, 0.15);
    --wn-error-text: #f87171;

    --wn-synonym-bg: rgba(16, 185, 129, 0.15);
    --wn-antonym-bg: rgba(239, 68, 68, 0.15);

    --wn-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --wn-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --wn-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --wn-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --wn-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.6);

    --wn-skeleton-base: #334155;
    --wn-skeleton-shine: #475569;
  }
}

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

/* Page Enter Animation */
@keyframes wn-page-enter {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Page Exit Animation */
@keyframes wn-page-exit {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

/* Section Stagger Enter */
@keyframes wn-section-enter {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Content Reveal (blur to clear) */
@keyframes wn-content-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Skeleton Shimmer */
@keyframes wn-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Fade In */
@keyframes wn-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Fade Out */
@keyframes wn-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Scale In */
@keyframes wn-scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slide Up */
@keyframes wn-slide-up {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse */
@keyframes wn-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Spin */
@keyframes wn-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Bounce */
@keyframes wn-bounce {
  0%, 100% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(-10px);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* Progress Ring Fill */
@keyframes wn-ring-fill {
  from {
    stroke-dashoffset: 326.73;
  }
}

/* Float */
@keyframes wn-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

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

/* ============================================
   BASE RESET & GLOBAL STYLES
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--wn-font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--wn-text);
  background-color: var(--wn-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.wn-page-transitioning {
  overflow: hidden;
}

body.wn-modal-open {
  overflow: hidden;
}

a {
  color: var(--wn-primary);
  text-decoration: none;
  transition: color var(--wn-transition-fast);
}

a:hover {
  color: var(--wn-primary-hover);
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

/* ============================================
   PREMIUM ANIMATED BOOTLOADER
   World-class loading experience with
   responsive design for all devices
   ============================================ */

.wn-bootloader {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  width: 100dvw !important;
  height: 100dvh !important;
  max-width: 100% !important;
  min-width: 100vw !important;
  background: var(--wn-bg);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  /* Ensure it's not affected by parent layout */
  transform: none !important;
  flex-shrink: 0;
}

.wn-bootloader.wn-fade-out {
  animation: wn-bootloader-exit 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes wn-bootloader-exit {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.1); pointer-events: none; }
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */

.wn-bootloader__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.wn-bootloader__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: wn-orb-float 8s ease-in-out infinite;
}

.wn-bootloader__orb--1 {
  width: min(400px, 80vw);
  height: min(400px, 80vw);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  top: -20%;
  left: -10%;
  animation-delay: 0s;
}

.wn-bootloader__orb--2 {
  width: min(300px, 60vw);
  height: min(300px, 60vw);
  background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
  bottom: -15%;
  right: -10%;
  animation-delay: -2s;
  animation-duration: 10s;
}

.wn-bootloader__orb--3 {
  width: min(250px, 50vw);
  height: min(250px, 50vw);
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -4s;
  animation-duration: 12s;
  opacity: 0.2;
}

@keyframes wn-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(5%, 5%) scale(1.05); }
  50% { transform: translate(-3%, 8%) scale(0.95); }
  75% { transform: translate(-5%, -3%) scale(1.02); }
}

/* Subtle grid pattern */
.wn-bootloader__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: wn-grid-move 20s linear infinite;
}

@keyframes wn-grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.wn-bootloader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 5vh, 40px);
  padding: 20px;
  position: relative;
  z-index: 2;
  animation: wn-content-enter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes wn-content-enter {
  0% { opacity: 0; transform: translateY(30px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================
   LOGO SECTION WITH ORBITING PARTICLES
   ============================================ */

.wn-bootloader__logo-container {
  position: relative;
  width: clamp(120px, 25vw, 160px);
  height: clamp(120px, 25vw, 160px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Orbiting rings with particles */
.wn-bootloader__orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: wn-orbit-spin 4s linear infinite;
}

.wn-bootloader__orbit--1 {
  inset: -10px;
  animation-duration: 3s;
}

.wn-bootloader__orbit--2 {
  inset: -25px;
  animation-duration: 5s;
  animation-direction: reverse;
}

.wn-bootloader__orbit--3 {
  inset: -40px;
  animation-duration: 7s;
}

@keyframes wn-orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.wn-bootloader__particle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
  animation: wn-particle-pulse 1.5s ease-in-out infinite;
}

.wn-bootloader__orbit--2 .wn-bootloader__particle {
  background: linear-gradient(135deg, #ec4899, #f59e0b);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.6);
  animation-delay: -0.5s;
  width: 6px;
  height: 6px;
  margin-left: -3px;
}

.wn-bootloader__orbit--3 .wn-bootloader__particle {
  background: linear-gradient(135deg, #10b981, #6366f1);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
  animation-delay: -1s;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
}

@keyframes wn-particle-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.7; }
}

/* Main logo */
.wn-bootloader__logo {
  position: relative;
  width: clamp(80px, 18vw, 100px);
  height: clamp(80px, 18vw, 100px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wn-bootloader__logo-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 40px rgba(99, 102, 241, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  animation: wn-logo-breathe 3s ease-in-out infinite;
  position: relative;
  z-index: 2;
}

@keyframes wn-logo-breathe {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.05) rotate(2deg); }
}

.wn-bootloader__letter {
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 900;
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: wn-letter-float 2s ease-in-out infinite;
}

@keyframes wn-letter-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.wn-bootloader__logo-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: wn-glow-pulse 2s ease-in-out infinite;
  z-index: 1;
}

@keyframes wn-glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

/* SVG Ring Progress */
.wn-bootloader__logo-ring {
  position: absolute;
  inset: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  transform: rotate(-90deg);
}

.wn-bootloader__ring-track {
  fill: none;
  stroke: rgba(99, 102, 241, 0.15);
  stroke-width: 3;
}

.wn-bootloader__ring-progress {
  fill: none;
  stroke: #8b5cf6;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  animation: wn-ring-draw 2s ease-in-out infinite;
}

@keyframes wn-ring-draw {
  0% { stroke-dashoffset: 289; }
  50% { stroke-dashoffset: 72; }
  100% { stroke-dashoffset: 289; }
}

/* ============================================
   BRAND TEXT WITH STAGGERED ANIMATION
   ============================================ */

.wn-bootloader__brand {
  text-align: center;
}

.wn-bootloader__title {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin: 0;
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.wn-bootloader__char {
  display: inline-block;
  color: var(--wn-text);
  animation: wn-char-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--i) * 0.08s + 0.3s);
  opacity: 0;
  transform: translateY(20px);
}

@keyframes wn-char-bounce {
  0% { opacity: 0; transform: translateY(20px) scale(0.8); }
  60% { transform: translateY(-5px) scale(1.1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.wn-bootloader__char--accent {
  color: #6366f1;
}

.wn-bootloader__char--accent2 {
  color: #8b5cf6;
}

.wn-bootloader__char--accent3 {
  color: #ec4899;
}

.wn-bootloader__tagline {
  margin: 8px 0 0;
  font-size: clamp(0.75rem, 2.5vw, 0.875rem);
  color: var(--wn-text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: wn-tagline-fade 0.6s ease forwards;
  animation-delay: 1s;
  opacity: 0;
}

@keyframes wn-tagline-fade {
  to { opacity: 1; }
}

/* ============================================
   PROGRESS SECTION
   ============================================ */

.wn-bootloader__progress-section {
  width: clamp(200px, 60vw, 280px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wn-bootloader__progress-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.wn-bootloader__progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
  background-size: 200% 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: wn-progress-shimmer 2s linear infinite;
  position: relative;
}

@keyframes wn-progress-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.wn-bootloader__progress-glow {
  position: absolute;
  top: -4px;
  left: 0;
  width: 100%;
  height: 14px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(99, 102, 241, 0.3) 50%,
    transparent 100%);
  border-radius: 7px;
  animation: wn-progress-glow-move 1.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes wn-progress-glow-move {
  0%, 100% { transform: translateX(-100%); opacity: 0; }
  50% { transform: translateX(100%); opacity: 1; }
}

.wn-bootloader__status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wn-bootloader__status {
  font-size: clamp(0.75rem, 2.5vw, 0.875rem);
  color: var(--wn-text-muted);
  min-height: 1.25rem;
  transition: opacity 0.3s ease;
}

.wn-bootloader__percent {
  font-size: clamp(0.75rem, 2.5vw, 0.875rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   LOADING INDICATORS (DOTS)
   ============================================ */

.wn-bootloader__indicators {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.wn-bootloader__dot {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  animation: wn-dot-bounce 1.4s ease-in-out infinite;
}

.wn-bootloader__dot:nth-child(2) {
  animation-delay: 0.16s;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.wn-bootloader__dot:nth-child(3) {
  animation-delay: 0.32s;
  background: linear-gradient(135deg, #ec4899, #f59e0b);
}

@keyframes wn-dot-bounce {
  0%, 80%, 100% {
    transform: scale(0.6) translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1) translateY(-8px);
    opacity: 1;
  }
}

/* ============================================
   RESPONSIVE - MOBILE (< 480px)
   ============================================ */

@media (max-width: 480px) {
  .wn-bootloader__logo-container {
    width: 100px;
    height: 100px;
  }

  .wn-bootloader__logo {
    width: 70px;
    height: 70px;
  }

  .wn-bootloader__logo-inner {
    border-radius: 18px;
  }

  .wn-bootloader__orbit--1 { inset: -8px; }
  .wn-bootloader__orbit--2 { inset: -18px; }
  .wn-bootloader__orbit--3 { inset: -28px; }

  .wn-bootloader__particle {
    width: 6px;
    height: 6px;
    margin-left: -3px;
  }

  .wn-bootloader__orbit--2 .wn-bootloader__particle {
    width: 5px;
    height: 5px;
    margin-left: -2.5px;
  }

  .wn-bootloader__orbit--3 .wn-bootloader__particle {
    width: 4px;
    height: 4px;
    margin-left: -2px;
  }

  .wn-bootloader__orb--1,
  .wn-bootloader__orb--2 {
    filter: blur(60px);
    opacity: 0.3;
  }

  .wn-bootloader__orb--3 {
    display: none;
  }

  .wn-bootloader__progress-section {
    width: 85vw;
    max-width: 250px;
  }
}

/* ============================================
   RESPONSIVE - TABLET (481px - 768px)
   ============================================ */

@media (min-width: 481px) and (max-width: 768px) {
  .wn-bootloader__logo-container {
    width: 130px;
    height: 130px;
  }

  .wn-bootloader__logo {
    width: 85px;
    height: 85px;
  }

  .wn-bootloader__progress-section {
    width: 50vw;
    max-width: 260px;
  }
}

/* ============================================
   RESPONSIVE - LANDSCAPE MOBILE
   ============================================ */

@media (max-height: 500px) and (orientation: landscape) {
  .wn-bootloader__content {
    flex-direction: row;
    gap: 32px;
  }

  .wn-bootloader__logo-container {
    width: 80px;
    height: 80px;
  }

  .wn-bootloader__logo {
    width: 60px;
    height: 60px;
  }

  .wn-bootloader__logo-inner {
    border-radius: 14px;
  }

  .wn-bootloader__orbit--1 { inset: -6px; }
  .wn-bootloader__orbit--2 { inset: -14px; }
  .wn-bootloader__orbit--3 { display: none; }

  .wn-bootloader__brand {
    text-align: left;
  }

  .wn-bootloader__title {
    justify-content: flex-start;
  }

  .wn-bootloader__progress-section {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60vw;
  }

  .wn-bootloader__indicators {
    display: none;
  }

  .wn-bootloader__tagline {
    margin-top: 4px;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .wn-bootloader__orb,
  .wn-bootloader__orbit,
  .wn-bootloader__particle,
  .wn-bootloader__logo-inner,
  .wn-bootloader__letter,
  .wn-bootloader__logo-glow,
  .wn-bootloader__ring-progress,
  .wn-bootloader__progress-fill,
  .wn-bootloader__progress-glow,
  .wn-bootloader__dot,
  .wn-bootloader__grid {
    animation: none !important;
  }

  .wn-bootloader__char {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .wn-bootloader__tagline {
    animation: none !important;
    opacity: 1;
  }

  .wn-bootloader.wn-fade-out {
    animation: wn-fade-out 0.3s ease forwards;
  }
}

/* ============================================
   DARK THEME ADJUSTMENTS
   ============================================ */

[data-theme="dark"] .wn-bootloader__orb {
  opacity: 0.25;
}

[data-theme="dark"] .wn-bootloader__grid {
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
}

[data-theme="dark"] .wn-bootloader__progress-bar {
  background: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .wn-bootloader__ring-track {
  stroke: rgba(99, 102, 241, 0.2);
}

/* Legacy loading overlay fallback */
.wn-loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--wn-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-lg);
  z-index: var(--wn-z-modal);
  animation: wn-fade-in 0.2s ease;
}

.wn-loading-overlay.wn-fade-out {
  animation: wn-fade-out 0.3s ease forwards;
}

.wn-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--wn-border);
  border-top-color: var(--wn-primary);
  border-radius: 50%;
  animation: wn-spin 0.8s linear infinite;
}

.wn-spinner--lg {
  width: 56px;
  height: 56px;
  border-width: 4px;
}

.wn-loading-text {
  color: var(--wn-text-muted);
  font-size: 0.875rem;
}

/* ============================================
   APP CONTAINER & PAGE TRANSITIONS
   ============================================ */

.wn-app {
  min-height: 100vh;
  padding-top: calc(var(--wn-header-height) + var(--wn-safe-area-top));
  padding-bottom: calc(var(--wn-bottom-bar-height) + var(--wn-safe-area-bottom));
}

.wn-app.wn-page-enter {
  animation: wn-page-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.wn-app.wn-page-exit {
  animation: wn-page-exit 0.3s ease both;
}

.wn-hidden {
  display: none !important;
}

.wn-invisible {
  visibility: hidden;
  opacity: 0;
}

/* ============================================
   STICKY HERO HEADER
   ============================================ */

.wn-hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--wn-header-height);
  background: var(--wn-bg-elevated);
  border-bottom: 1px solid var(--wn-border);
  z-index: var(--wn-z-sticky);
  padding-top: var(--wn-safe-area-top);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.wn-hero__inner {
  max-width: var(--wn-max-width);
  margin: 0 auto;
  padding: 0 var(--wn-space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wn-space-md);
}

.wn-hero__back {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--wn-radius);
  color: var(--wn-text-secondary);
  transition: all var(--wn-transition-fast);
  flex-shrink: 0;
}

.wn-hero__back:hover {
  background: var(--wn-surface-hover);
  color: var(--wn-text);
}

.wn-hero__back:active {
  transform: scale(0.95);
}

.wn-hero__center {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.wn-hero__word {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.wn-hero__title {
  font-family: var(--wn-font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--wn-text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.wn-hero__pronunciation {
  font-size: 0.8125rem;
  color: var(--wn-text-muted);
  font-style: italic;
}

.wn-hero__actions {
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
  flex-shrink: 0;
}

.wn-audio-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--wn-radius-full);
  background: var(--wn-primary-light);
  color: var(--wn-primary);
  transition: all var(--wn-transition-fast);
}

.wn-audio-btn:hover {
  background: var(--wn-primary);
  color: var(--wn-primary-text);
  transform: scale(1.05);
}

.wn-audio-btn:active {
  transform: scale(0.95);
}

.wn-audio-btn.wn-playing {
  animation: wn-pulse 1s ease-in-out infinite;
}

.wn-theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--wn-radius-full);
  color: var(--wn-text-muted);
  transition: all var(--wn-transition-fast);
}

.wn-theme-toggle:hover {
  background: var(--wn-surface-hover);
  color: var(--wn-text);
}

/* ============================================
   WORD HEADER SECTION (Scrollable, not sticky)
   ============================================ */

.wn-section--word-header {
  background: linear-gradient(135deg, var(--wn-surface), var(--wn-bg-elevated));
  border: 3px solid var(--wn-primary);
  border-radius: var(--wn-radius-xl);
  padding: 0;
  margin-bottom: var(--wn-space-lg);
  position: relative;
  overflow: visible;
}

.wn-word-card {
  padding: var(--wn-space-xl) var(--wn-space-lg);
  text-align: center;
  position: relative;
}

.wn-word-card__back {
  position: absolute;
  top: var(--wn-space-md);
  left: var(--wn-space-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--wn-radius);
  color: var(--wn-text-secondary);
  background: var(--wn-bg);
  transition: all var(--wn-transition-fast);
}

.wn-word-card__back:hover {
  background: var(--wn-surface-hover);
  color: var(--wn-text);
  transform: translateX(-2px);
}

.wn-word-card__content {
  margin-bottom: var(--wn-space-lg);
}

.wn-word-title {
  font-family: var(--wn-font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--wn-text);
  margin-bottom: var(--wn-space-xs);
  line-height: 1.2;
}

.wn-word-pronunciation {
  font-size: 1.125rem;
  color: var(--wn-text-muted);
  font-style: italic;
}

.wn-word-card__audio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-md);
}

.wn-audio-btn--labeled {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: auto;
  height: auto;
  padding: var(--wn-space-sm) var(--wn-space-md);
  background: var(--wn-primary-light);
  color: var(--wn-primary);
  border-radius: var(--wn-radius-md);
  transition: all var(--wn-transition-fast);
}

.wn-audio-btn--labeled span {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wn-audio-btn--labeled:hover:not(:disabled) {
  background: var(--wn-primary);
  color: var(--wn-primary-text);
  transform: translateY(-2px);
  box-shadow: var(--wn-shadow-md);
}

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

/* ============================================
   MARK TOOLTIP (Floating near word title)
   ============================================ */

.wn-mark-tooltip {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background: var(--wn-surface);
  border: 2px solid var(--wn-primary);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-md);
  box-shadow: var(--wn-shadow-lg);
  z-index: 10;
  animation: wn-tooltip-bounce 2s ease-in-out infinite;
  min-width: 280px;
}

.wn-tooltip-arrow {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: var(--wn-surface);
  border-top: 2px solid var(--wn-primary);
  border-left: 2px solid var(--wn-primary);
  transform: translateX(-50%) rotate(45deg);
}

.wn-tooltip-text {
  display: block;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--wn-text);
  margin-bottom: var(--wn-space-sm);
}

.wn-tooltip-marks {
  display: flex;
  gap: var(--wn-space-xs);
}

.wn-tooltip-mark {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--wn-space-sm);
  border-radius: var(--wn-radius);
  background: transparent;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--wn-text-secondary);
  transition: all var(--wn-transition-fast);
}

.wn-tooltip-mark .wn-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid currentColor;
  transition: all var(--wn-transition-fast);
}

.wn-tooltip-mark--green {
  color: #22c55e;
}

.wn-tooltip-mark--orange {
  color: #f97316;
}

.wn-tooltip-mark--red {
  color: #ef4444;
}

.wn-tooltip-mark:hover {
  background: var(--wn-surface-hover);
  transform: scale(1.05);
}

.wn-tooltip-mark:hover .wn-circle {
  background: currentColor;
}

.wn-tooltip-mark:active {
  transform: scale(0.98);
}

@keyframes wn-tooltip-bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(100%);
  }
  50% {
    transform: translateX(-50%) translateY(calc(100% - 6px));
  }
}

/* ============================================
   MARK BUTTONS - COLORED CIRCLES
   ============================================ */

.wn-mark-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid currentColor;
  transition: all var(--wn-transition-fast);
}

.wn-mark-btn--green .wn-mark-circle {
  border-color: #22c55e;
  background: transparent;
}

.wn-mark-btn--green.wn-active .wn-mark-circle {
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.wn-mark-btn--orange .wn-mark-circle {
  border-color: #f97316;
  background: transparent;
}

.wn-mark-btn--orange.wn-active .wn-mark-circle {
  background: #f97316;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.5);
}

.wn-mark-btn--red .wn-mark-circle {
  border-color: #ef4444;
  background: transparent;
}

.wn-mark-btn--red.wn-active .wn-mark-circle {
  background: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.wn-mark-btn:hover .wn-mark-circle {
  transform: scale(1.1);
}

/* Update mark label text for longer labels */
.wn-mark-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.wn-main {
  max-width: var(--wn-max-width);
  margin: 0 auto;
  padding: var(--wn-space-lg) var(--wn-space-md);
}

/* ============================================
   SECTION BASE STYLES
   ============================================ */

.wn-section {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  border: 1px solid var(--wn-border);
  margin-bottom: var(--wn-space-md);
  overflow: hidden;
  animation: wn-section-enter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  cursor: pointer;
  transition: border-color var(--wn-transition-fast), box-shadow var(--wn-transition-fast);
}

.wn-section:hover {
  border-color: var(--wn-primary);
  box-shadow: 0 0 0 2px var(--wn-primary-light);
}

/* Word header section shouldn't show click indicator */
.wn-section--word-header {
  cursor: default;
}

.wn-section--word-header:hover {
  border-color: var(--wn-primary);
  box-shadow: none;
}

/* Staggered section animations */
.wn-section:nth-child(1) { animation-delay: 0.05s; }
.wn-section:nth-child(2) { animation-delay: 0.1s; }
.wn-section:nth-child(3) { animation-delay: 0.15s; }
.wn-section:nth-child(4) { animation-delay: 0.2s; }
.wn-section:nth-child(5) { animation-delay: 0.25s; }
.wn-section:nth-child(6) { animation-delay: 0.3s; }
.wn-section:nth-child(7) { animation-delay: 0.35s; }
.wn-section:nth-child(8) { animation-delay: 0.4s; }
.wn-section:nth-child(9) { animation-delay: 0.45s; }
.wn-section:nth-child(10) { animation-delay: 0.5s; }
.wn-section:nth-child(11) { animation-delay: 0.55s; }

.wn-section--hidden {
  display: none;
}

.wn-section--fade-out {
  animation: wn-fade-out 0.3s ease forwards;
}

.wn-section__header {
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
  padding: var(--wn-space-md);
  border-bottom: 1px solid var(--wn-border-subtle);
}

.wn-section__icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wn-primary-light);
  color: var(--wn-primary);
  border-radius: var(--wn-radius);
  font-size: 1rem;
  flex-shrink: 0;
}

.wn-section__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--wn-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wn-section__content {
  padding: var(--wn-space-md);
}

.wn-section__content.wn-content-reveal {
  animation: wn-content-reveal 0.4s ease both;
}

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

.wn-skeleton {
  background: linear-gradient(
    90deg,
    var(--wn-skeleton-base) 25%,
    var(--wn-skeleton-shine) 50%,
    var(--wn-skeleton-base) 75%
  );
  background-size: 200% 100%;
  animation: wn-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--wn-radius-sm);
}

.wn-skeleton--text {
  height: 1rem;
  margin-bottom: var(--wn-space-sm);
}

.wn-skeleton--text:last-child {
  width: 70%;
  margin-bottom: 0;
}

.wn-skeleton--title {
  height: 1.5rem;
  width: 60%;
  margin-bottom: var(--wn-space-md);
}

.wn-skeleton--circle {
  border-radius: 50%;
}

.wn-skeleton--image {
  width: 100%;
  height: 200px;
  border-radius: var(--wn-radius-md);
}

.wn-skeleton--button {
  height: 40px;
  width: 120px;
  border-radius: var(--wn-radius);
}

/* ============================================
   IMAGE SECTION
   ============================================ */

.wn-section--image .wn-section__content {
  padding: 0;
}

.wn-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.wn-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--wn-transition-slow);
}

.wn-image-container:hover .wn-image {
  transform: scale(1.02);
}

.wn-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
  pointer-events: none;
}

.wn-image-credit {
  position: absolute;
  bottom: var(--wn-space-sm);
  right: var(--wn-space-sm);
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.3);
  padding: 2px 8px;
  border-radius: var(--wn-radius-sm);
}

/* ============================================
   DEFINITIONS SECTION
   ============================================ */

.wn-definitions-list {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-md);
}

.wn-definition-group {
  border-left: 3px solid var(--wn-primary);
  padding-left: var(--wn-space-md);
}

.wn-definition-pos {
  display: inline-flex;
  align-items: center;
  gap: var(--wn-space-xs);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--wn-primary);
  background: var(--wn-primary-light);
  padding: 4px 10px;
  border-radius: var(--wn-radius-full);
  margin-bottom: var(--wn-space-sm);
}

.wn-definition-item {
  margin-bottom: var(--wn-space-sm);
}

.wn-definition-item:last-child {
  margin-bottom: 0;
}

.wn-definition-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--wn-text);
}

.wn-definition-text strong {
  color: var(--wn-primary);
}

.wn-definition-bengali {
  font-size: 0.9375rem;
  color: var(--wn-text-muted);
  margin-top: 4px;
  font-style: italic;
}

.wn-definition-example {
  font-size: 0.875rem;
  color: var(--wn-text-secondary);
  margin-top: var(--wn-space-xs);
  padding-left: var(--wn-space-md);
  border-left: 2px solid var(--wn-border);
  font-style: italic;
}

/* ============================================
   EXAMPLES SECTION
   ============================================ */

.wn-examples-list {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-sm);
}

.wn-example-item {
  padding: var(--wn-space-md);
  background: var(--wn-bg);
  border-radius: var(--wn-radius);
  border-left: 3px solid var(--wn-primary);
  transition: all var(--wn-transition-fast);
}

.wn-example-item:hover {
  background: var(--wn-surface-hover);
  transform: translateX(4px);
}

.wn-example-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--wn-text);
}

.wn-example-text mark,
.wn-example-text .wn-highlight {
  background: var(--wn-primary-light);
  color: var(--wn-primary);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 500;
}

.wn-examples-more {
  margin-top: var(--wn-space-md);
}

/* ============================================
   SENTENCES (CORPUS) SECTION
   ============================================ */

.wn-sentences-tabs {
  display: flex;
  gap: var(--wn-space-xs);
  padding-bottom: var(--wn-space-md);
  border-bottom: 1px solid var(--wn-border-subtle);
  margin-bottom: var(--wn-space-md);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.wn-sentences-tabs::-webkit-scrollbar {
  display: none;
}

.wn-sentences-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--wn-text-muted);
  background: transparent;
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius-full);
  transition: all var(--wn-transition-fast);
  white-space: nowrap;
}

.wn-sentences-tab:hover {
  background: var(--wn-surface-hover);
  color: var(--wn-text);
}

.wn-sentences-tab.wn-active {
  background: var(--wn-primary);
  color: var(--wn-primary-text);
  border-color: var(--wn-primary);
}

.wn-sentence-item {
  padding: var(--wn-space-md);
  background: var(--wn-bg);
  border-radius: var(--wn-radius);
  margin-bottom: var(--wn-space-sm);
  transition: all var(--wn-transition-fast);
}

.wn-sentence-item:hover {
  background: var(--wn-surface-hover);
}

.wn-sentence-text {
  font-family: var(--wn-font-serif);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--wn-text);
}

.wn-sentence-meta {
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
  margin-top: var(--wn-space-sm);
  font-size: 0.75rem;
  color: var(--wn-text-faint);
}

.wn-sentence-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--wn-surface-hover);
  border-radius: var(--wn-radius-sm);
}

/* Tab Count Badge */
.wn-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--wn-surface-hover);
  border-radius: var(--wn-radius-full);
  color: var(--wn-text-muted);
}

.wn-sentences-tab.wn-active .wn-tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: var(--wn-primary-text);
}

/* Load More Button */
.wn-load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-sm);
  width: 100%;
  padding: var(--wn-space-md) var(--wn-space-lg);
  margin-top: var(--wn-space-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--wn-primary);
  background: var(--wn-primary-light);
  border: 2px dashed var(--wn-primary);
  border-radius: var(--wn-radius-lg);
  cursor: pointer;
  transition: all var(--wn-transition);
}

.wn-load-more-btn:hover:not(:disabled) {
  background: var(--wn-primary);
  color: var(--wn-primary-text);
  border-style: solid;
  transform: translateY(-2px);
  box-shadow: var(--wn-shadow-md);
}

.wn-load-more-btn:active:not(:disabled) {
  transform: translateY(0);
}

.wn-load-more-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.wn-load-more-btn svg {
  width: 16px;
  height: 16px;
  transition: transform var(--wn-transition);
}

.wn-load-more-btn:hover:not(:disabled) svg {
  transform: rotate(90deg);
}

/* Small spinner for loading state */
.wn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: wn-spin 0.75s linear infinite;
}

@keyframes wn-spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   PARAGRAPH SECTIONS (EN & BN)
   ============================================ */

.wn-paragraph-content {
  font-family: var(--wn-font-serif);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--wn-text);
}

.wn-paragraph-content p {
  margin-bottom: var(--wn-space-md);
}

.wn-paragraph-content p:last-child {
  margin-bottom: 0;
}

.wn-section--paragraph-bn .wn-paragraph-content {
  font-family: 'Noto Sans Bengali', 'Kalpurush', sans-serif;
  font-size: 1rem;
}

/* ============================================
   HTML CONTENT SECTIONS (Short & Long)
   ============================================ */

.wn-html-content {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--wn-text);
}

.wn-html-content h1,
.wn-html-content h2,
.wn-html-content h3,
.wn-html-content h4 {
  color: var(--wn-text);
  margin-top: var(--wn-space-lg);
  margin-bottom: var(--wn-space-sm);
  font-weight: 600;
}

.wn-html-content h1:first-child,
.wn-html-content h2:first-child,
.wn-html-content h3:first-child {
  margin-top: 0;
}

.wn-html-content p {
  margin-bottom: var(--wn-space-md);
}

.wn-html-content ul,
.wn-html-content ol {
  margin-left: var(--wn-space-lg);
  margin-bottom: var(--wn-space-md);
}

.wn-html-content li {
  margin-bottom: var(--wn-space-xs);
}

.wn-html-content blockquote {
  border-left: 3px solid var(--wn-primary);
  padding-left: var(--wn-space-md);
  margin: var(--wn-space-md) 0;
  color: var(--wn-text-secondary);
  font-style: italic;
}

.wn-html-content code {
  background: var(--wn-surface-hover);
  padding: 2px 6px;
  border-radius: var(--wn-radius-sm);
  font-size: 0.875em;
}

.wn-html-content pre {
  background: var(--wn-bg);
  padding: var(--wn-space-md);
  border-radius: var(--wn-radius);
  overflow-x: auto;
  margin-bottom: var(--wn-space-md);
}

.wn-html-content a {
  color: var(--wn-primary);
  text-decoration: underline;
}

.wn-section--long-html .wn-section__content {
  max-height: 400px;
  overflow-y: auto;
}

.wn-section--long-html .wn-section__content::-webkit-scrollbar {
  width: 6px;
}

.wn-section--long-html .wn-section__content::-webkit-scrollbar-track {
  background: var(--wn-bg);
  border-radius: 3px;
}

.wn-section--long-html .wn-section__content::-webkit-scrollbar-thumb {
  background: var(--wn-border);
  border-radius: 3px;
}

.wn-section--long-html .wn-section__content::-webkit-scrollbar-thumb:hover {
  background: var(--wn-text-faint);
}

/* ============================================
   RELATED WORDS (Synonyms & Antonyms)
   ============================================ */

.wn-related-groups {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-lg);
}

.wn-related-group {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-sm);
}

.wn-related-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--wn-text-muted);
}

.wn-related-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wn-space-sm);
}

.wn-related-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--wn-radius-full);
  transition: all var(--wn-transition-fast);
  cursor: pointer;
}

.wn-related-tag:hover {
  transform: translateY(-2px);
}

.wn-related-tag:active {
  transform: scale(0.95);
}

.wn-related-tag--synonym {
  background: var(--wn-synonym-bg);
  color: var(--wn-synonym);
  border: 1px solid var(--wn-synonym);
}

.wn-related-tag--synonym:hover {
  background: var(--wn-synonym);
  color: white;
}

.wn-related-tag--antonym {
  background: var(--wn-antonym-bg);
  color: var(--wn-antonym);
  border: 1px solid var(--wn-antonym);
}

.wn-related-tag--antonym:hover {
  background: var(--wn-antonym);
  color: white;
}

/* ============================================
   TAGS SECTION
   ============================================ */

.wn-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wn-space-sm);
}

.wn-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--wn-text-secondary);
  background: var(--wn-bg);
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius-full);
  transition: all var(--wn-transition-fast);
}

.wn-tag:hover {
  background: var(--wn-surface-hover);
  border-color: var(--wn-primary);
  color: var(--wn-primary);
  transform: scale(1.05);
}

.wn-tag__icon {
  font-size: 1rem;
}

/* ============================================
   VIDEOS SECTION
   ============================================ */

.wn-videos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wn-space-md);
}

@media (min-width: 480px) {
  .wn-videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.wn-video-card {
  position: relative;
  border-radius: var(--wn-radius-md);
  overflow: hidden;
  background: var(--wn-bg);
  transition: all var(--wn-transition);
}

.wn-video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--wn-shadow-md);
}

.wn-video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.wn-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--wn-transition);
}

.wn-video-card:hover .wn-video-thumb img {
  transform: scale(1.05);
}

.wn-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all var(--wn-transition-fast);
}

.wn-video-card:hover .wn-video-play {
  background: var(--wn-primary);
  transform: translate(-50%, -50%) scale(1.1);
}

.wn-video-duration {
  position: absolute;
  bottom: var(--wn-space-sm);
  right: var(--wn-space-sm);
  padding: 2px 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: white;
  background: rgba(0,0,0,0.8);
  border-radius: var(--wn-radius-sm);
}

.wn-video-info {
  padding: var(--wn-space-sm);
}

.wn-video-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--wn-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Video Modal */
.wn-video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: var(--wn-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--wn-space-md);
  animation: wn-fade-in 0.2s ease;
}

.wn-video-modal__close {
  position: absolute;
  top: var(--wn-space-md);
  right: var(--wn-space-md);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: background var(--wn-transition-fast);
}

.wn-video-modal__close:hover {
  background: rgba(255,255,255,0.2);
}

.wn-video-modal__content {
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
}

.wn-video-modal iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--wn-radius-md);
}

/* ============================================
   FOCUS MODAL (Section Overlay)
   ============================================ */

.wn-focus-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--wn-space-lg);
}

.wn-focus-modal.wn-hidden {
  display: none;
}

.wn-focus-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  animation: wn-fade-in 0.3s ease;
}

.wn-focus-content {
  position: relative;
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  background: var(--wn-surface);
  border-radius: var(--wn-radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: wn-modal-enter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--wn-shadow-xl);
  border: 2px solid var(--wn-primary);
}

@keyframes wn-modal-enter {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.wn-focus-header {
  display: flex;
  align-items: center;
  gap: var(--wn-space-md);
  padding: var(--wn-space-lg);
  border-bottom: 2px solid var(--wn-border);
  background: linear-gradient(135deg, var(--wn-primary-light), var(--wn-surface));
}

.wn-focus-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wn-primary);
  color: var(--wn-primary-text);
  border-radius: var(--wn-radius-lg);
  font-size: 1.25rem;
}

.wn-focus-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wn-text);
}

.wn-focus-body {
  flex: 1;
  padding: var(--wn-space-xl);
  overflow-y: auto;
  font-size: var(--wn-base-font-size, 1rem);
}

/* Enhanced styles for content in focus mode */
.wn-focus-body .wn-definition-item {
  padding: var(--wn-space-lg);
  margin-bottom: var(--wn-space-md);
  background: var(--wn-bg);
  border-radius: var(--wn-radius-lg);
  border-left: 4px solid var(--wn-primary);
}

.wn-focus-body .wn-example-item,
.wn-focus-body .wn-sentence-item {
  padding: var(--wn-space-lg);
  margin-bottom: var(--wn-space-md);
  background: var(--wn-bg);
  border-radius: var(--wn-radius-lg);
  font-size: 1.1em;
  line-height: 1.8;
}

.wn-focus-body .wn-paragraph-content {
  font-size: 1.15em;
  line-height: 1.9;
}

.wn-focus-body .wn-html-content {
  font-size: 1.1em;
  line-height: 1.8;
}

.wn-focus-close {
  position: absolute;
  top: var(--wn-space-md);
  right: var(--wn-space-md);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--wn-surface);
  border: 2px solid var(--wn-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  color: var(--wn-text-secondary);
}

.wn-focus-close:hover {
  background: var(--wn-error);
  border-color: var(--wn-error);
  color: white;
  transform: rotate(90deg);
}

.wn-focus-footer {
  padding: var(--wn-space-md) var(--wn-space-lg);
  border-top: 1px solid var(--wn-border);
  text-align: center;
}

.wn-focus-tip {
  font-size: 0.75rem;
  color: var(--wn-text-muted);
}

/* Section-specific focus styles */
.wn-focus-modal[data-section="definitions"] .wn-focus-icon {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.wn-focus-modal[data-section="examples"] .wn-focus-icon,
.wn-focus-modal[data-section="sentences"] .wn-focus-icon {
  background: linear-gradient(135deg, #22c55e, #10b981);
}

.wn-focus-modal[data-section="paragraph"] .wn-focus-icon,
.wn-focus-modal[data-section="short-html"] .wn-focus-icon,
.wn-focus-modal[data-section="long-html"] .wn-focus-icon {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.wn-focus-modal[data-section="related"] .wn-focus-icon,
.wn-focus-modal[data-section="tags"] .wn-focus-icon {
  background: linear-gradient(135deg, #f97316, #eab308);
}

.wn-focus-modal[data-section="image"] .wn-focus-icon,
.wn-focus-modal[data-section="videos"] .wn-focus-icon {
  background: linear-gradient(135deg, #ec4899, #f43f5e);
}

/* ============================================
   FIXED BOTTOM BAR
   ============================================ */

.wn-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--wn-bottom-bar-height);
  background: var(--wn-bg-elevated);
  border-top: 1px solid var(--wn-border);
  padding-bottom: var(--wn-safe-area-bottom);
  z-index: var(--wn-z-fixed);
  animation: wn-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.wn-bottom-bar__inner {
  max-width: var(--wn-max-width);
  margin: 0 auto;
  padding: var(--wn-space-sm) var(--wn-space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wn-space-md);
}

/* Progress Indicator */
.wn-progress-mini {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 60px;
}

.wn-progress-mini__text {
  font-size: 0.6875rem;
  color: var(--wn-text-muted);
  text-align: center;
}

.wn-progress-mini__bar {
  height: 4px;
  background: var(--wn-border);
  border-radius: 2px;
  overflow: hidden;
}

.wn-progress-mini__fill {
  height: 100%;
  background: var(--wn-primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Mark Buttons */
.wn-mark-buttons {
  display: flex;
  gap: var(--wn-space-xs);
  flex: 1;
  justify-content: center;
}

.wn-mark-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--wn-radius);
  transition: all var(--wn-transition-fast);
}

.wn-mark-btn:active {
  transform: scale(0.95);
}

.wn-mark-btn--green {
  background: var(--wn-success-light);
  color: var(--wn-success);
  border: 1px solid var(--wn-success);
}

.wn-mark-btn--green:hover,
.wn-mark-btn--green.wn-active {
  background: var(--wn-success);
  color: white;
}

.wn-mark-btn--orange {
  background: var(--wn-warning-light);
  color: var(--wn-warning);
  border: 1px solid var(--wn-warning);
}

.wn-mark-btn--orange:hover,
.wn-mark-btn--orange.wn-active {
  background: var(--wn-warning);
  color: white;
}

.wn-mark-btn--red {
  background: var(--wn-error-light);
  color: var(--wn-error);
  border: 1px solid var(--wn-error);
}

.wn-mark-btn--red:hover,
.wn-mark-btn--red.wn-active {
  background: var(--wn-error);
  color: white;
}

/* Navigation Buttons */
.wn-nav-buttons {
  display: flex;
  gap: var(--wn-space-xs);
}

.wn-nav-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wn-surface);
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius);
  color: var(--wn-text);
  transition: all var(--wn-transition-fast);
}

.wn-nav-btn:hover:not(:disabled) {
  background: var(--wn-surface-hover);
  border-color: var(--wn-primary);
  color: var(--wn-primary);
}

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

.wn-nav-btn:disabled {
  opacity: 0.3;
}

/* ============================================
   BUTTONS
   ============================================ */

.wn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-sm);
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--wn-radius);
  border: 1px solid var(--wn-border);
  background: var(--wn-surface);
  color: var(--wn-text);
  transition: all var(--wn-transition-fast);
}

.wn-btn:hover:not(:disabled) {
  background: var(--wn-surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--wn-shadow-sm);
}

.wn-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.wn-btn--primary {
  background: var(--wn-primary);
  border-color: var(--wn-primary);
  color: var(--wn-primary-text);
}

.wn-btn--primary:hover:not(:disabled) {
  background: var(--wn-primary-hover);
  border-color: var(--wn-primary-hover);
}

.wn-btn--ghost {
  background: transparent;
  border-color: transparent;
}

.wn-btn--ghost:hover:not(:disabled) {
  background: var(--wn-surface-hover);
}

.wn-btn--sm {
  padding: 6px 12px;
  font-size: 0.75rem;
}

.wn-btn--lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.wn-btn--full {
  width: 100%;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.wn-toast-container {
  position: fixed;
  bottom: calc(var(--wn-bottom-bar-height) + var(--wn-space-md) + var(--wn-safe-area-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--wn-z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-sm);
  pointer-events: none;
  width: calc(100% - var(--wn-space-lg));
  max-width: 400px;
}

.wn-toast {
  padding: var(--wn-space-md);
  background: var(--wn-bg-elevated);
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius-md);
  box-shadow: var(--wn-shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
  animation: wn-scale-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}

.wn-toast--success {
  border-color: var(--wn-success);
  background: var(--wn-success-light);
}

.wn-toast--error {
  border-color: var(--wn-error);
  background: var(--wn-error-light);
}

.wn-toast--warning {
  border-color: var(--wn-warning);
  background: var(--wn-warning-light);
}

.wn-toast__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.wn-toast__message {
  flex: 1;
  font-size: 0.875rem;
  color: var(--wn-text);
}

.wn-toast__close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wn-text-muted);
  border-radius: var(--wn-radius-sm);
  flex-shrink: 0;
}

.wn-toast__close:hover {
  background: var(--wn-surface-hover);
  color: var(--wn-text);
}

.wn-toast.wn-toast--exit {
  animation: wn-fade-out 0.2s ease forwards;
}

/* ============================================
   MODAL
   ============================================ */

.wn-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--wn-z-modal-backdrop);
  animation: wn-fade-in 0.2s ease;
  backdrop-filter: blur(4px);
}

.wn-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - var(--wn-space-lg));
  max-width: 400px;
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  box-shadow: var(--wn-shadow-xl);
  z-index: var(--wn-z-modal);
  animation: wn-scale-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.wn-modal__header {
  padding: var(--wn-space-lg) var(--wn-space-lg) var(--wn-space-md);
}

.wn-modal__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--wn-text);
}

.wn-modal__body {
  padding: 0 var(--wn-space-lg);
  color: var(--wn-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.wn-modal__footer {
  padding: var(--wn-space-lg);
  display: flex;
  justify-content: flex-end;
  gap: var(--wn-space-sm);
}

.wn-btn--danger {
  background: var(--wn-error);
  border-color: var(--wn-error);
  color: white;
}

.wn-btn--danger:hover:not(:disabled) {
  background: #dc2626;
  border-color: #dc2626;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.wn-empty-state {
  text-align: center;
  padding: var(--wn-space-2xl) var(--wn-space-lg);
}

.wn-empty-state__icon {
  font-size: 3rem;
  margin-bottom: var(--wn-space-md);
  opacity: 0.5;
}

.wn-empty-state__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--wn-text);
  margin-bottom: var(--wn-space-sm);
}

.wn-empty-state__text {
  font-size: 0.9375rem;
  color: var(--wn-text-muted);
}

/* ============================================
   KEYBOARD SHORTCUTS HINT
   ============================================ */

.wn-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--wn-text-muted);
  background: var(--wn-bg);
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius-sm);
  box-shadow: 0 1px 0 var(--wn-border);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Small phones */
@media (max-width: 359px) {
  :root {
    font-size: 14px;
  }

  .wn-hero__title {
    font-size: 1.125rem;
  }

  .wn-mark-btn span {
    display: none;
  }

  .wn-mark-btn {
    padding: 10px 12px;
  }
}

/* Phones */
@media (max-width: 480px) {
  .wn-main {
    padding: var(--wn-space-md) var(--wn-space-sm);
  }

  .wn-section {
    border-radius: var(--wn-radius-md);
  }

  .wn-section__content {
    padding: var(--wn-space-sm) var(--wn-space-md);
  }

  .wn-mark-btn {
    padding: 8px 12px;
    font-size: 0.75rem;
  }

  .wn-nav-btn {
    width: 40px;
    height: 40px;
  }
}

/* Tablets */
@media (min-width: 768px) {
  :root {
    --wn-header-height: 64px;
    --wn-bottom-bar-height: 76px;
  }

  .wn-main {
    padding: var(--wn-space-xl) var(--wn-space-lg);
  }

  .wn-section__content {
    padding: var(--wn-space-lg);
  }

  .wn-hero__title {
    font-size: 1.5rem;
  }

  .wn-mark-btn {
    padding: 12px 20px;
  }
}

/* ============================================
   FLOATING NAVIGATION (Desktop only)
   ============================================ */

.wn-floating-nav {
  display: none;
}

/* Desktop */
@media (min-width: 1024px) {
  .wn-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--wn-space-xl);
    max-width: 1400px;
    padding: var(--wn-space-2xl) var(--wn-space-xl);
    padding-left: 80px;
    padding-right: 80px;
  }

  .wn-section {
    margin-bottom: var(--wn-space-lg);
  }

  /* Word header spans full width */
  .wn-section--word-header {
    grid-column: 1 / -1;
  }

  /* Left Column - Primary content */
  .wn-section--derived-forms,
  .wn-section--definitions,
  .wn-section--examples,
  .wn-section--sentences,
  .wn-section--related,
  .wn-section--tags,
  .wn-section--image,
  .wn-section--videos {
    grid-column: 1;
  }

  /* Right Column - Reading content */
  .wn-section--paragraph,
  .wn-section--short-html,
  .wn-section--long-html,
  .wn-section--paragraph-bn {
    grid-column: 2;
  }

  /* Floating Navigation */
  .wn-floating-nav {
    display: flex;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
  }

  .wn-floating-nav--prev {
    left: var(--wn-space-md);
  }

  .wn-floating-nav--next {
    right: var(--wn-space-md);
  }

  .wn-floating-nav-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--wn-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }

  .wn-floating-nav-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
  }

  .wn-floating-nav-btn:active:not(:disabled) {
    transform: scale(0.95);
  }

  .wn-floating-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--wn-text-muted);
  }

  /* Mark buttons show full labels on desktop */
  .wn-mark-label {
    font-size: 0.7rem;
  }
}

/* Extra large screens */
@media (min-width: 1440px) {
  .wn-main {
    padding-left: 100px;
    padding-right: 100px;
  }

  .wn-floating-nav--prev {
    left: var(--wn-space-lg);
  }

  .wn-floating-nav--next {
    right: var(--wn-space-lg);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .wn-hero,
  .wn-bottom-bar,
  .wn-toast-container,
  .wn-modal-backdrop,
  .wn-modal {
    display: none !important;
  }

  .wn-app {
    padding: 0;
  }

  .wn-section {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.wn-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;
}

.wn-text-center { text-align: center; }
.wn-text-muted { color: var(--wn-text-muted); }

.wn-mt-sm { margin-top: var(--wn-space-sm); }
.wn-mt-md { margin-top: var(--wn-space-md); }
.wn-mt-lg { margin-top: var(--wn-space-lg); }

.wn-mb-sm { margin-bottom: var(--wn-space-sm); }
.wn-mb-md { margin-bottom: var(--wn-space-md); }
.wn-mb-lg { margin-bottom: var(--wn-space-lg); }

/* ============================================
   MARK STATUS VISUAL FEEDBACK
   ============================================ */

/* Unmarked state - subtle purple glow */
.wn-app.wn-mark-none {
  --wn-mark-color: var(--wn-primary);
  --wn-mark-glow: rgba(99, 102, 241, 0.15);
}

/* Green - Mastered */
.wn-app.wn-mark-green {
  --wn-mark-color: #22c55e;
  --wn-mark-glow: rgba(34, 197, 94, 0.2);
}

/* Orange - Familiar */
.wn-app.wn-mark-orange {
  --wn-mark-color: #f97316;
  --wn-mark-glow: rgba(249, 115, 22, 0.2);
}

/* Red - Learning */
.wn-app.wn-mark-red {
  --wn-mark-color: #ef4444;
  --wn-mark-glow: rgba(239, 68, 68, 0.2);
}

/* Apply mark color to borders and accents */
.wn-app[class*="wn-mark-"] .wn-header {
  border-bottom-color: var(--wn-mark-color);
  box-shadow: 0 2px 8px var(--wn-mark-glow);
}

.wn-app[class*="wn-mark-"] .wn-bottom-bar {
  border-top-color: var(--wn-mark-color);
  box-shadow: 0 -2px 8px var(--wn-mark-glow);
}

/* Word title gets mark color accent */
.wn-app.wn-mark-green .wn-word-title,
.wn-app.wn-mark-orange .wn-word-title,
.wn-app.wn-mark-red .wn-word-title {
  background: linear-gradient(90deg, var(--wn-mark-color) 0%, var(--wn-text) 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Progress bar reflects mark color */
.wn-app.wn-mark-green .wn-progress-fill {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.wn-app.wn-mark-orange .wn-progress-fill {
  background: linear-gradient(90deg, #f97316, #fb923c);
}

.wn-app.wn-mark-red .wn-progress-fill {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Subtle background tint for marked words */
.wn-app.wn-mark-green {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.03) 0%, transparent 20%);
}

.wn-app.wn-mark-orange {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.03) 0%, transparent 20%);
}

.wn-app.wn-mark-red {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.03) 0%, transparent 20%);
}

/* Mark button active states - more prominent */
.wn-mark-btn.wn-active {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px var(--wn-mark-glow), 0 4px 12px var(--wn-mark-glow);
}

.wn-mark-btn--green.wn-active {
  background: #22c55e;
  border-color: #16a34a;
}

.wn-mark-btn--orange.wn-active {
  background: #f97316;
  border-color: #ea580c;
}

.wn-mark-btn--red.wn-active {
  background: #ef4444;
  border-color: #dc2626;
}

/* ============================================
   ADVANCED ANIMATIONS SYSTEM
   3D Flip, Glassmorphism, Neumorphism, Smooth Slide
   ============================================ */

/* Advanced Animation Properties */
:root {
  /* Glassmorphism */
  --wn-glass-bg: rgba(255, 255, 255, 0.7);
  --wn-glass-border: rgba(255, 255, 255, 0.3);
  --wn-glass-blur: 16px;

  /* Neumorphism */
  --wn-neu-light: rgba(255, 255, 255, 0.8);
  --wn-neu-dark: rgba(0, 0, 0, 0.1);
  --wn-neu-offset: 6px;

  /* 3D Effects */
  --wn-3d-perspective: 1000px;

  /* Advanced Easing Functions */
  --wn-ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --wn-ease-smooth: cubic-bezier(0.4, 0.0, 0.2, 1);
  --wn-ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

/* Dark mode overrides for advanced properties */
[data-theme="dark"] {
  --wn-glass-bg: rgba(30, 41, 59, 0.7);
  --wn-glass-border: rgba(148, 163, 184, 0.2);
  --wn-neu-light: rgba(51, 65, 85, 0.8);
  --wn-neu-dark: rgba(0, 0, 0, 0.4);
}

/* ============================================
   ANIMATION KEYFRAMES
   ============================================ */

/* 3D Flip Entrance */
@keyframes wn-flip-3d {
  from {
    opacity: 0;
    transform: perspective(1000px) rotateX(-15deg) translateY(30px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: perspective(1000px) rotateX(0) translateY(0);
    filter: blur(0);
  }
}

/* 3D Rotate Card */
@keyframes wn-rotate-3d {
  from {
    opacity: 0;
    transform: perspective(1000px) rotateY(-12deg) scale(0.92);
  }
  to {
    opacity: 1;
    transform: perspective(1000px) rotateY(0) scale(1);
  }
}

/* Glassmorphism Emerge */
@keyframes wn-glass-emerge {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(var(--wn-glass-blur));
    transform: translateY(0) scale(1);
  }
}

/* Neumorphism Lift */
@keyframes wn-neu-lift {
  from {
    opacity: 0;
    box-shadow: none;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    box-shadow:
      var(--wn-neu-offset) var(--wn-neu-offset) calc(var(--wn-neu-offset) * 2) var(--wn-neu-dark),
      calc(var(--wn-neu-offset) * -1) calc(var(--wn-neu-offset) * -1) calc(var(--wn-neu-offset) * 2) var(--wn-neu-light);
    transform: translateY(0);
  }
}

/* Pulse Glow Effect */
@keyframes wn-pulse-glow {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.05); }
}

/* Smooth Slide Up */
@keyframes wn-slide-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   TIER 1: HERO ELEMENTS (3D Flip)
   Definitions, Derived Forms
   ============================================ */

.wn-section--definitions,
.wn-section--derived-forms {
  animation: wn-flip-3d 0.6s var(--wn-ease-bounce) both;
  background: linear-gradient(135deg, var(--wn-surface), var(--wn-bg-elevated));
  border: 2px solid var(--wn-primary);
  position: relative;
  overflow: hidden;
}

.wn-section--definitions::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--wn-primary-light) 0%, transparent 60%);
  opacity: 0.2;
  animation: wn-pulse-glow 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.wn-section--definitions > * { position: relative; z-index: 1; }

.wn-section--definitions { animation-delay: 0.08s; }
.wn-section--derived-forms { animation-delay: 0.04s; }

/* ============================================
   TIER 2: RICH MEDIA (3D Rotate)
   Images, Videos
   ============================================ */

.wn-section--image,
.wn-section--videos {
  animation: wn-rotate-3d 0.55s var(--wn-ease-smooth) both;
  transform-style: preserve-3d;
}

.wn-section--image { animation-delay: 0.32s; }
.wn-section--videos { animation-delay: 0.36s; }

.wn-image-container {
  transition: transform 0.4s var(--wn-ease-smooth), box-shadow 0.4s ease;
}

.wn-image-container:hover {
  transform: perspective(1000px) rotateY(4deg) rotateX(2deg) scale(1.02);
  box-shadow: var(--wn-shadow-xl);
}

.wn-video-card,
.wn-videos-grid > * {
  transition: transform 0.4s var(--wn-ease-smooth), box-shadow 0.4s ease;
}

.wn-video-card:hover,
.wn-videos-grid > *:hover {
  transform: perspective(800px) rotateY(-3deg) translateZ(15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ============================================
   TIER 3: SUPPORTING CONTENT (Glassmorphism)
   Paragraph, Short/Long HTML, Examples, Sentences, Advanced Examples
   ============================================ */

.wn-section--paragraph,
.wn-section--short-html,
.wn-section--long-html,
.wn-section--examples,
.wn-section--sentences,
.wn-section--advanced-examples {
  animation: wn-glass-emerge 0.5s var(--wn-ease-smooth) both;
  background: var(--wn-glass-bg);
  backdrop-filter: blur(var(--wn-glass-blur));
  -webkit-backdrop-filter: blur(var(--wn-glass-blur));
  border: 1px solid var(--wn-glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.wn-section--paragraph { animation-delay: 0.12s; }
.wn-section--short-html { animation-delay: 0.16s; }
.wn-section--long-html { animation-delay: 0.2s; }
.wn-section--advanced-examples { animation-delay: 0.28s; }
.wn-section--examples { animation-delay: 0.4s; }
.wn-section--sentences { animation-delay: 0.44s; }

/* Advanced Examples Special Styling */
.wn-section--advanced-examples {
  background: linear-gradient(135deg, var(--wn-glass-bg), rgba(99, 102, 241, 0.08));
  border: 2px solid var(--wn-primary);
}

/* Example/Sentence Items with Glassmorphism */
.wn-example-item,
.wn-sentence-item {
  background: var(--wn-glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--wn-glass-border);
  transition: all 0.3s var(--wn-ease-smooth);
}

.wn-example-item:hover,
.wn-sentence-item:hover {
  background: var(--wn-surface);
  transform: translateX(6px) scale(1.01);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* ============================================
   TIER 4: METADATA (Neumorphism)
   Related, Tags, Paragraph Bengali
   ============================================ */

.wn-section--related,
.wn-section--tags,
.wn-section--paragraph-bn {
  animation: wn-neu-lift 0.45s var(--wn-ease-smooth) both;
  background: var(--wn-surface);
  border: none;
  box-shadow:
    var(--wn-neu-offset) var(--wn-neu-offset) calc(var(--wn-neu-offset) * 2) var(--wn-neu-dark),
    calc(var(--wn-neu-offset) * -1) calc(var(--wn-neu-offset) * -1) calc(var(--wn-neu-offset) * 2) var(--wn-neu-light);
  border-radius: var(--wn-radius-xl);
}

.wn-section--paragraph-bn { animation-delay: 0.24s; }
.wn-section--related { animation-delay: 0.48s; }
.wn-section--tags { animation-delay: 0.52s; }

/* Neumorphic Tags/Pills */
.wn-related-tag,
.wn-tag,
.wn-derived-item {
  box-shadow:
    3px 3px 6px var(--wn-neu-dark),
    -3px -3px 6px var(--wn-neu-light);
  border: none;
  transition: all 0.3s var(--wn-ease-smooth);
}

.wn-related-tag:hover,
.wn-tag:hover,
.wn-derived-item:hover {
  box-shadow:
    2px 2px 4px var(--wn-neu-dark),
    -2px -2px 4px var(--wn-neu-light);
  transform: translateY(-2px);
}

.wn-related-tag:active,
.wn-tag:active,
.wn-derived-item:active {
  box-shadow:
    inset 2px 2px 4px var(--wn-neu-dark),
    inset -2px -2px 4px var(--wn-neu-light);
  transform: translateY(0);
}

/* ============================================
   NEW SECTION STYLES: DERIVED FORMS
   ============================================ */

.wn-derived-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wn-space-sm);
  padding: var(--wn-space-sm) 0;
}

.wn-derived-item {
  display: inline-flex;
  align-items: center;
  gap: var(--wn-space-xs);
  padding: 8px 16px;
  background: var(--wn-glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--wn-radius-full);
  cursor: default;
}

.wn-derived-item:hover {
  transform: scale(1.08) rotate(-1deg);
}

.wn-derived-pos {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wn-primary);
  font-weight: 700;
  padding: 2px 8px;
  background: var(--wn-primary-light);
  border-radius: var(--wn-radius-sm);
}

.wn-derived-word {
  font-weight: 600;
  color: var(--wn-text);
}

/* ============================================
   NEW SECTION STYLES: ADVANCED EXAMPLES
   ============================================ */

.wn-advanced-examples-list {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-md);
}

.wn-advanced-example-item {
  display: flex;
  gap: var(--wn-space-md);
  padding: var(--wn-space-lg);
  background: var(--wn-glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--wn-glass-border);
  border-left: 4px solid var(--wn-primary);
  border-radius: var(--wn-radius-md);
  transition: all 0.3s var(--wn-ease-smooth);
}

.wn-advanced-example-item:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-left-width: 6px;
}

.wn-advanced-example-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wn-primary);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
}

.wn-advanced-example-content {
  flex: 1;
  min-width: 0;
}

.wn-advanced-example-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--wn-text);
}

.wn-advanced-example-source {
  display: inline-block;
  margin-top: var(--wn-space-sm);
  font-size: 0.75rem;
  color: var(--wn-text-muted);
  font-style: italic;
}

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

/* Section hover lift */
.wn-section {
  transition: transform 0.3s var(--wn-ease-smooth), box-shadow 0.3s ease;
}

.wn-section:hover {
  transform: translateY(-2px);
}

/* Icon pulse on section hover */
.wn-section__icon {
  transition: transform 0.3s var(--wn-ease-bounce);
}

.wn-section:hover .wn-section__icon {
  transform: scale(1.12) rotate(3deg);
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

.wn-section,
.wn-section__content,
.wn-example-item,
.wn-sentence-item,
.wn-advanced-example-item,
.wn-related-tag,
.wn-tag,
.wn-derived-item,
.wn-video-card,
.wn-image-container {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Reduce animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wn-section,
  .wn-section *,
  .wn-example-item,
  .wn-advanced-example-item,
  .wn-derived-item {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  :root {
    --wn-glass-blur: 10px;
    --wn-neu-offset: 4px;
  }

  .wn-section--definitions::before {
    display: none;
  }

  .wn-section:hover {
    transform: none;
  }

  .wn-image-container:hover,
  .wn-video-card:hover {
    transform: none;
  }

  .wn-example-item:hover,
  .wn-sentence-item:hover {
    transform: translateX(3px);
  }
}

/* ============================================
   PHASE 7: FIXED HEADER, FOOTER, FRAME, PARTICLES
   ============================================ */

/* Page Frame States */
.wn-page-frame[data-mark="green"] {
  --wn-frame-color: #22c55e;
  --wn-frame-color-light: #4ade80;
  --wn-frame-glow: rgba(34, 197, 94, 0.4);
}

.wn-page-frame[data-mark="orange"] {
  --wn-frame-color: #f97316;
  --wn-frame-color-light: #fb923c;
  --wn-frame-glow: rgba(249, 115, 22, 0.4);
}

.wn-page-frame[data-mark="red"] {
  --wn-frame-color: #ef4444;
  --wn-frame-color-light: #f87171;
  --wn-frame-glow: rgba(239, 68, 68, 0.4);
}

/* Page Frame Container */
.wn-page-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* Frame Borders - Solid Deep Colors */
.wn-frame-border {
  position: absolute;
  background: var(--wn-frame-color);
  box-shadow:
    0 0 15px var(--wn-frame-glow),
    0 0 30px var(--wn-frame-glow);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.wn-frame-border--top,
.wn-frame-border--bottom {
  left: 0;
  right: 0;
  height: var(--wn-frame-width);
}

.wn-frame-border--top { top: 0; }
.wn-frame-border--bottom { bottom: 0; }

.wn-frame-border--left,
.wn-frame-border--right {
  top: 0;
  bottom: 0;
  width: var(--wn-frame-width);
}

.wn-frame-border--left { left: 0; }
.wn-frame-border--right { right: 0; }

/* Corner Accents */
.wn-frame-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: var(--wn-frame-width) solid var(--wn-frame-color);
  box-shadow: 0 0 15px var(--wn-frame-glow);
}

.wn-frame-corner--tl {
  top: 0; left: 0;
  border-right: none; border-bottom: none;
  border-radius: 8px 0 0 0;
}

.wn-frame-corner--tr {
  top: 0; right: 0;
  border-left: none; border-bottom: none;
  border-radius: 0 8px 0 0;
}

.wn-frame-corner--bl {
  bottom: 0; left: 0;
  border-right: none; border-top: none;
  border-radius: 0 0 0 8px;
}

.wn-frame-corner--br {
  bottom: 0; right: 0;
  border-left: none; border-top: none;
  border-radius: 0 0 8px 0;
}

/* Particle Canvas */
.wn-frame-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ============================================
   FIXED HEADER
   ============================================ */

.wn-fixed-header {
  position: fixed;
  top: var(--wn-frame-width);
  left: var(--wn-frame-width);
  right: var(--wn-frame-width);
  height: var(--wn-header-height);
  background: var(--wn-surface);
  border-bottom: 3px solid var(--wn-frame-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--wn-space-lg);
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.wn-header__brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wn-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--wn-primary), var(--wn-primary-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.wn-brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--wn-primary), var(--wn-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wn-header__nav {
  display: flex;
  gap: var(--wn-space-sm);
}

.wn-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--wn-radius-md);
  color: var(--wn-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--wn-font-sans);
}

.wn-nav-link:hover {
  background: var(--wn-surface-hover);
  color: var(--wn-text);
}

.wn-nav-link--logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.wn-nav-link svg {
  flex-shrink: 0;
}

/* ============================================
   SETTINGS DROPDOWN
   ============================================ */

.wn-settings-dropdown {
  position: relative;
}

.wn-nav-link--settings {
  gap: 4px;
}

.wn-dropdown-arrow {
  transition: transform 0.2s ease;
}

.wn-settings-dropdown:has(.wn-settings-menu:not(.wn-hidden)) .wn-dropdown-arrow {
  transform: rotate(180deg);
}

.wn-settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  /* Solid fallback first for Samsung/Safari where backdrop-filter fails */
  background: #ffffff;
  background: var(--wn-surface);
  border: 2px solid var(--wn-border);
  border-radius: var(--wn-radius-lg);
  box-shadow: var(--wn-shadow-lg);
  z-index: 1100;
  padding: var(--wn-space-sm);
  animation: wn-scale-in 0.15s ease;
  /* Samsung/Safari backdrop-filter fix */
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Dark mode fallback for settings menu */
[data-theme="dark"] .wn-settings-menu {
  background: #1e293b;
  background: var(--wn-surface);
}

/* ============================================
   V2 COMPACT SETTINGS MENU
   ============================================ */

/* ============================================
   SETTINGS MODAL - YELLOW/BLACK HIGH CONTRAST
   ============================================ */
.wn-settings-compact {
  width: 340px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  border-radius: 12px;
  /* YELLOW background with BLACK border */
  background: #fef9c3 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 3px solid #000000 !important;
}

[data-theme="dark"] .wn-settings-compact {
  background: #1c1917 !important;
  border-color: #facc15 !important;
}

/* Section Labels */
.wn-settings-section-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #000000 !important;
  margin-bottom: 6px;
  padding-left: 4px;
  text-transform: uppercase;
}

[data-theme="dark"] .wn-settings-section-label {
  color: #facc15 !important;
}

.wn-settings-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: #ffffff !important;
  border: 2px solid #000000 !important;
  border-radius: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

[data-theme="dark"] .wn-settings-row {
  background: #292524 !important;
  border-color: #facc15 !important;
}

/* Labeled Button - Icon + Text */
.wn-labeled-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  min-width: 52px;
  background: #fef9c3 !important;
  border: 2px solid #000000 !important;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="dark"] .wn-labeled-btn {
  background: #1c1917 !important;
  border-color: #a16207 !important;
}

.wn-labeled-btn svg {
  width: 20px;
  height: 20px;
  stroke: #000000 !important;
  stroke-width: 2.5;
}

[data-theme="dark"] .wn-labeled-btn svg {
  stroke: #facc15 !important;
}

.wn-labeled-btn span {
  font-size: 10px;
  font-weight: 800;
  color: #000000 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="dark"] .wn-labeled-btn span {
  color: #fef9c3 !important;
}

.wn-labeled-btn:hover {
  background: #fde047 !important;
  transform: translateY(-2px);
}

[data-theme="dark"] .wn-labeled-btn:hover {
  background: #422006 !important;
  border-color: #facc15 !important;
}

.wn-labeled-btn.wn-active {
  background: #000000 !important;
  border-color: #000000 !important;
}

[data-theme="dark"] .wn-labeled-btn.wn-active {
  background: #facc15 !important;
  border-color: #facc15 !important;
}

.wn-labeled-btn.wn-active svg {
  stroke: #facc15 !important;
}

[data-theme="dark"] .wn-labeled-btn.wn-active svg {
  stroke: #000000 !important;
}

.wn-labeled-btn.wn-active span {
  color: #facc15 !important;
}

[data-theme="dark"] .wn-labeled-btn.wn-active span {
  color: #000000 !important;
}

/* Font Size Letter */
.wn-size-letter {
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1;
  color: #000000 !important;
}

[data-theme="dark"] .wn-size-letter {
  color: #fef9c3 !important;
}

.wn-labeled-btn.wn-active .wn-size-letter {
  color: #facc15 !important;
}

[data-theme="dark"] .wn-labeled-btn.wn-active .wn-size-letter {
  color: #000000 !important;
}

.wn-font-size-btn[data-size="0"] .wn-size-letter { font-size: 12px !important; }
.wn-font-size-btn[data-size="1"] .wn-size-letter { font-size: 14px !important; }
.wn-font-size-btn[data-size="2"] .wn-size-letter { font-size: 16px !important; }
.wn-font-size-btn[data-size="3"] .wn-size-letter { font-size: 18px !important; }
.wn-font-size-btn[data-size="4"] .wn-size-letter { font-size: 20px !important; }

/* Font Preview */
.wn-font-preview {
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1;
  color: #000000 !important;
}

[data-theme="dark"] .wn-font-preview {
  color: #fef9c3 !important;
}

.wn-labeled-btn.wn-active .wn-font-preview {
  color: #facc15 !important;
}

[data-theme="dark"] .wn-labeled-btn.wn-active .wn-font-preview {
  color: #000000 !important;
}

/* Legacy classes - hidden */
.wn-settings-group,
.wn-settings-divider,
.wn-icon-btn {
  display: none !important;
}

/* Toggles Grid - Yellow/Black Theme (4 columns to fit all 12 labels) */
.wn-settings-toggles-compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px;
  background: #ffffff !important;
  border: 2px solid #000000 !important;
  border-radius: 8px;
  margin-bottom: 12px;
}

[data-theme="dark"] .wn-settings-toggles-compact {
  background: #292524 !important;
  border-color: #facc15 !important;
}

.wn-mini-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 5px;
  background: #fef9c3 !important;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  border: 1.5px solid #000000 !important;
  min-width: 0;
}

[data-theme="dark"] .wn-mini-toggle {
  background: #1c1917 !important;
  border-color: #a16207 !important;
}

.wn-mini-toggle:hover {
  background: #fde047 !important;
  transform: translateY(-1px);
}

[data-theme="dark"] .wn-mini-toggle:hover {
  background: #422006 !important;
  border-color: #facc15 !important;
}

.wn-mini-toggle input[type="checkbox"] {
  width: 12px;
  height: 12px;
  accent-color: #000000;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

[data-theme="dark"] .wn-mini-toggle input[type="checkbox"] {
  accent-color: #facc15;
}

.wn-mini-toggle span {
  display: inline-block !important;
  visibility: visible !important;
  color: #000000 !important;
  font-weight: 700 !important;
  font-size: 8px !important;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: visible !important;
  flex: 1;
  min-width: 0;
}

[data-theme="dark"] .wn-mini-toggle span {
  color: #fef9c3 !important;
  visibility: visible !important;
  overflow: visible !important;
}

.wn-mini-toggle:has(input:checked) {
  background: #000000 !important;
  border-color: #000000 !important;
}

[data-theme="dark"] .wn-mini-toggle:has(input:checked) {
  background: #facc15 !important;
  border-color: #facc15 !important;
}

.wn-mini-toggle:has(input:checked) span {
  color: #facc15 !important;
  font-weight: 800;
}

[data-theme="dark"] .wn-mini-toggle:has(input:checked) span {
  color: #000000 !important;
}

.wn-mini-toggle:has(input:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Footer - Yellow/Black Theme */
.wn-settings-footer-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 4px;
  border-top: 2px solid #000000;
  margin-top: 8px;
}

[data-theme="dark"] .wn-settings-footer-compact {
  border-color: #facc15;
}

.wn-save-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #000000 !important;
  color: #facc15 !important;
  border: 2px solid #000000 !important;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="dark"] .wn-save-compact {
  background: #facc15 !important;
  color: #000000 !important;
  border-color: #facc15 !important;
}

.wn-save-compact svg {
  width: 16px;
  height: 16px;
  stroke: #facc15 !important;
}

[data-theme="dark"] .wn-save-compact svg {
  stroke: #000000 !important;
}

.wn-save-compact:hover {
  background: #facc15 !important;
  color: #000000 !important;
  transform: translateY(-2px);
}

[data-theme="dark"] .wn-save-compact:hover {
  background: #fde047 !important;
}

.wn-save-compact:hover svg {
  stroke: #000000 !important;
}

/* Auto-save notice */
.wn-auto-save-notice {
  font-size: 9px;
  color: #166534 !important;
  font-weight: 700;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .wn-auto-save-notice {
  color: #86efac !important;
}

/* Close button */
.wn-close-settings {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #000000 !important;
  color: #facc15 !important;
  border: 2px solid #000000 !important;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="dark"] .wn-close-settings {
  background: #facc15 !important;
  color: #000000 !important;
  border-color: #facc15 !important;
}

.wn-close-settings svg {
  stroke: #facc15 !important;
}

[data-theme="dark"] .wn-close-settings svg {
  stroke: #000000 !important;
}

.wn-close-settings:hover {
  background: #facc15 !important;
  color: #000000 !important;
  transform: translateY(-1px);
}

.wn-close-settings:hover svg {
  stroke: #000000 !important;
}

[data-theme="dark"] .wn-close-settings:hover {
  background: #fde047 !important;
}

/* Legacy styles */
.wn-refresh-notice {
  display: none;
}

.wn-settings-section {
  padding: var(--wn-space-sm);
}

.wn-settings-section + .wn-settings-section {
  border-top: 1px solid var(--wn-border);
}

.wn-settings-section__title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--wn-text-muted);
  margin-bottom: var(--wn-space-sm);
}

.wn-settings-options {
  display: flex;
  gap: 6px;
}

.wn-settings-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: var(--wn-surface-hover);
  border: 2px solid transparent;
  border-radius: var(--wn-radius-md);
  color: var(--wn-text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wn-settings-option:hover {
  background: var(--wn-surface-active);
}

.wn-settings-option.wn-active {
  background: var(--wn-primary-light);
  border-color: var(--wn-primary);
  color: var(--wn-primary);
}

.wn-settings-toggles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.wn-settings-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--wn-surface-hover);
  border-radius: var(--wn-radius);
  cursor: pointer;
  transition: background 0.2s ease;
}

.wn-settings-toggle:hover {
  background: var(--wn-surface-active);
}

.wn-settings-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--wn-primary);
  cursor: pointer;
}

.wn-settings-toggle input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wn-toggle-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--wn-text-secondary);
}

/* Section hidden by settings */
.wn-section-hidden {
  display: none !important;
}

/* ============================================
   FONT SIZE SLIDER
   ============================================ */

.wn-font-size-slider {
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
  padding: var(--wn-space-sm) 0;
}

.wn-size-label {
  font-weight: 600;
  color: var(--wn-text-muted);
}

.wn-size-label--min {
  font-size: 0.75rem;
}

.wn-size-label--max {
  font-size: 1.25rem;
}

.wn-slider {
  flex: 1;
  height: 6px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--wn-surface-active);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.wn-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--wn-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--wn-bg-elevated);
  box-shadow: var(--wn-shadow-sm);
  transition: all var(--wn-transition-fast);
}

.wn-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: var(--wn-shadow);
}

.wn-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--wn-primary);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--wn-bg-elevated);
  box-shadow: var(--wn-shadow-sm);
}

.wn-font-preview {
  padding: var(--wn-space-sm);
  background: var(--wn-bg);
  border-radius: var(--wn-radius);
  text-align: center;
  color: var(--wn-text);
  font-size: var(--wn-preview-font-size, 1rem);
  transition: font-size var(--wn-transition);
}

/* ============================================
   FONT FAMILY OPTIONS
   ============================================ */

.wn-font-options {
  display: flex;
  gap: var(--wn-space-xs);
}

.wn-font-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--wn-space-sm);
  background: transparent;
  border: 2px solid var(--wn-border);
  border-radius: var(--wn-radius);
  cursor: pointer;
  transition: all var(--wn-transition-fast);
  color: var(--wn-text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
}

.wn-font-option:hover {
  background: var(--wn-surface-hover);
  border-color: var(--wn-primary);
  color: var(--wn-text);
}

.wn-font-option.wn-active {
  background: var(--wn-primary-light);
  border-color: var(--wn-primary);
  color: var(--wn-primary);
}

.wn-font-sample {
  font-size: 1.25rem;
  font-weight: 600;
}

.wn-font-sample--serif {
  font-family: 'Crimson Pro', Georgia, serif;
}

.wn-font-sample--sans {
  font-family: 'Inter', -apple-system, sans-serif;
}

.wn-font-sample--mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   SETTINGS FOOTER (SAVE BUTTON)
   ============================================ */

.wn-settings-section--footer {
  padding-top: var(--wn-space-md);
  border-top: 1px solid var(--wn-border);
}

.wn-settings-section--footer .wn-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-sm);
}

/* ============================================
   PROGRESS BAR CONTAINER
   ============================================ */

.wn-progress-bar-container {
  position: fixed;
  top: calc(var(--wn-frame-width) + var(--wn-header-height));
  left: var(--wn-frame-width);
  right: var(--wn-frame-width);
  height: var(--wn-progress-bar-height);
  background: var(--wn-bg);
  border-bottom: 2px solid var(--wn-frame-color);
  display: flex;
  align-items: center;
  padding: 0 var(--wn-space-lg);
  gap: var(--wn-space-md);
  z-index: 999;
}

.wn-progress-word {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wn-text);
  min-width: 80px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wn-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--wn-surface-active);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.wn-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--wn-frame-color), var(--wn-frame-color-light));
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

.wn-progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4));
  animation: wn-progress-shine 1.5s ease-in-out infinite;
}

@keyframes wn-progress-shine {
  0%, 100% { opacity: 0.4; transform: translateX(-100%); }
  50% { opacity: 1; transform: translateX(0); }
}

.wn-progress-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wn-text-secondary);
  min-width: 60px;
  text-align: right;
}

/* ============================================
   ADAPTIVE SET TIME PROGRESS
   ============================================ */

.wn-time-progress {
  position: fixed;
  top: calc(var(--wn-frame-width) + var(--wn-header-height) + var(--wn-progress-bar-height));
  left: var(--wn-frame-width);
  right: var(--wn-frame-width);
  background: var(--wn-bg);
  border-bottom: 2px solid var(--wn-success);
  padding: var(--wn-space-sm) var(--wn-space-lg);
  z-index: 998;
  animation: wn-time-slide-in 0.3s ease-out;
}

@keyframes wn-time-slide-in {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.wn-time-progress__bar-container {
  height: 8px;
  background: var(--wn-border);
  border-radius: var(--wn-radius-full);
  overflow: hidden;
  position: relative;
}

.wn-time-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--wn-primary) 0%, var(--wn-success) 100%);
  border-radius: var(--wn-radius-full);
  width: 0%;
  transition: width 0.3s ease-out;
  position: relative;
}

.wn-time-progress__bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: wn-time-shine 2s ease-in-out infinite;
}

@keyframes wn-time-shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

.wn-time-progress__bar.wn-time-complete {
  background: var(--wn-success);
  animation: wn-pulse-success 0.5s ease-out;
}

@keyframes wn-pulse-success {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.5); box-shadow: 0 0 20px rgba(16, 185, 129, 0.5); }
}

.wn-time-progress__info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--wn-space-xs);
  font-size: 0.75rem;
}

.wn-time-progress__label {
  color: var(--wn-text-muted);
  font-weight: 500;
}

.wn-time-progress__countdown {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--wn-text);
  min-width: 50px;
  text-align: right;
}

.wn-time-progress__countdown.wn-time-ready {
  color: var(--wn-success);
  animation: wn-bounce 0.3s ease-out;
}

@keyframes wn-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Disabled Next button state for adaptive sets */
.wn-nav-btn--next.wn-btn--disabled,
.wn-nav-btn--next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Adjust app padding when time progress is visible */
.wn-app.wn-has-time-progress {
  padding-top: calc(var(--wn-frame-width) + var(--wn-header-height) + var(--wn-progress-bar-height) + 48px + var(--wn-space-md));
}

/* ============================================
   FIXED FOOTER
   ============================================ */

.wn-fixed-footer {
  position: fixed;
  bottom: var(--wn-frame-width);
  left: var(--wn-frame-width);
  right: var(--wn-frame-width);
  height: var(--wn-footer-height);
  background: var(--wn-surface);
  border-top: 3px solid var(--wn-frame-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--wn-space-lg);
  padding-bottom: var(--wn-safe-area-bottom);
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.wn-footer__marks {
  display: flex;
  gap: var(--wn-space-sm);
}

.wn-fixed-footer .wn-mark-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 16px;
  border-radius: var(--wn-radius-lg);
  border: 2px solid transparent;
  background: var(--wn-surface-hover);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 70px;
}

.wn-fixed-footer .wn-mark-btn--green { --mark-color: #22c55e; }
.wn-fixed-footer .wn-mark-btn--orange { --mark-color: #f97316; }
.wn-fixed-footer .wn-mark-btn--red { --mark-color: #ef4444; }

.wn-fixed-footer .wn-mark-btn:hover {
  border-color: var(--mark-color);
  background: color-mix(in srgb, var(--mark-color) 10%, var(--wn-surface-hover));
}

.wn-fixed-footer .wn-mark-btn.wn-active {
  border-color: var(--mark-color);
  background: color-mix(in srgb, var(--mark-color) 20%, var(--wn-surface));
  box-shadow: 0 0 20px color-mix(in srgb, var(--mark-color) 40%, transparent);
}

.wn-mark-icon {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--mark-color);
}

.wn-mark-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--wn-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wn-footer__nav {
  display: flex;
  gap: var(--wn-space-sm);
}

.wn-fixed-footer .wn-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: var(--wn-radius-lg);
  border: 2px solid var(--wn-border);
  background: var(--wn-surface-hover);
  color: var(--wn-text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--wn-font-sans);
  font-size: 0.875rem;
}

.wn-fixed-footer .wn-nav-btn:hover:not(:disabled) {
  border-color: var(--wn-primary);
  background: var(--wn-primary);
  color: white;
}

.wn-fixed-footer .wn-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================
   LAYOUT ADJUSTMENTS FOR FIXED ELEMENTS
   ============================================ */

body {
  padding-top: calc(var(--wn-frame-width) + var(--wn-header-height) + var(--wn-progress-bar-height) + var(--wn-space-md));
  padding-bottom: calc(var(--wn-frame-width) + var(--wn-footer-height) + var(--wn-safe-area-bottom) + var(--wn-space-md));
  padding-left: calc(var(--wn-frame-width) + var(--wn-space-sm));
  padding-right: calc(var(--wn-frame-width) + var(--wn-space-sm));
}

.wn-app {
  padding-top: 0;
  padding-bottom: 0;
}

.wn-main {
  max-width: var(--wn-max-width);
  margin: 0 auto;
  padding: var(--wn-space-md);
}

/* Hide old bottom bar if present */
.wn-bottom-bar {
  display: none !important;
}

/* ============================================
   ENHANCED SECTION CARDS WITH SOLID DEEP BORDERS
   ============================================ */

.wn-section {
  position: relative;
  background: var(--wn-surface);
  border-radius: var(--wn-radius-xl);
  overflow: hidden;
  margin-bottom: var(--wn-space-lg);
  border: 3px solid var(--section-color, var(--wn-primary));
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* Deep color glow effect on hover */
.wn-section:hover {
  box-shadow:
    0 8px 25px -5px var(--section-glow, rgba(99, 102, 241, 0.25)),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Section-specific deep colors */
.wn-section--definitions,
.wn-section--derived-forms {
  --section-color: #4f46e5;
  --section-glow: rgba(79, 70, 229, 0.35);
}

.wn-section--paragraph,
.wn-section--short-html,
.wn-section--long-html {
  --section-color: #2563eb;
  --section-glow: rgba(37, 99, 235, 0.3);
}

.wn-section--paragraph-bn {
  --section-color: #0891b2;
  --section-glow: rgba(8, 145, 178, 0.3);
}

.wn-section--image,
.wn-section--videos {
  --section-color: #db2777;
  --section-glow: rgba(219, 39, 119, 0.3);
}

.wn-section--examples {
  --section-color: #16a34a;
  --section-glow: rgba(22, 163, 74, 0.3);
}

.wn-section--sentences {
  --section-color: #059669;
  --section-glow: rgba(5, 150, 105, 0.3);
}

.wn-section--related {
  --section-color: #ea580c;
  --section-glow: rgba(234, 88, 12, 0.3);
}

.wn-section--tags {
  --section-color: #ca8a04;
  --section-glow: rgba(202, 138, 4, 0.3);
}

/* Colored left accent bar */
.wn-section::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--section-color, var(--wn-primary));
  z-index: 1;
}

/* Card entrance animations */
@keyframes wn-card-appear {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.wn-section {
  animation: wn-card-appear 0.6s ease-out both;
}

/* Staggered delays */
.wn-section:nth-of-type(1) { animation-delay: 0.05s; }
.wn-section:nth-of-type(2) { animation-delay: 0.1s; }
.wn-section:nth-of-type(3) { animation-delay: 0.15s; }
.wn-section:nth-of-type(4) { animation-delay: 0.2s; }
.wn-section:nth-of-type(5) { animation-delay: 0.25s; }
.wn-section:nth-of-type(6) { animation-delay: 0.3s; }
.wn-section:nth-of-type(7) { animation-delay: 0.35s; }
.wn-section:nth-of-type(8) { animation-delay: 0.4s; }
.wn-section:nth-of-type(9) { animation-delay: 0.45s; }
.wn-section:nth-of-type(10) { animation-delay: 0.5s; }
.wn-section:nth-of-type(11) { animation-delay: 0.55s; }
.wn-section:nth-of-type(12) { animation-delay: 0.6s; }

/* ============================================
   RESPONSIVE ADJUSTMENTS FOR FIXED LAYOUT
   ============================================ */

@media (max-width: 640px) {
  .wn-fixed-header {
    padding: 0 var(--wn-space-md);
  }

  .wn-header__nav span {
    display: none;
  }

  .wn-nav-link {
    padding: 8px;
  }

  .wn-progress-bar-container {
    padding: 0 var(--wn-space-md);
  }

  .wn-fixed-footer {
    padding: 0 var(--wn-space-md);
    flex-wrap: wrap;
    height: auto;
    padding-top: var(--wn-space-sm);
    padding-bottom: calc(var(--wn-space-sm) + var(--wn-safe-area-bottom));
    gap: var(--wn-space-sm);
  }

  .wn-footer__marks {
    order: 1;
    flex: 1;
    justify-content: center;
  }

  .wn-footer__nav {
    order: 2;
    flex: 1;
    justify-content: center;
  }

  .wn-fixed-footer .wn-mark-btn {
    min-width: 60px;
    padding: 6px 12px;
  }

  .wn-fixed-footer .wn-nav-btn {
    padding: 10px 16px;
  }

  .wn-fixed-footer .wn-nav-btn span {
    display: none;
  }

  body {
    padding-bottom: calc(var(--wn-frame-width) + 100px + var(--wn-safe-area-bottom));
  }
}

/* Hide frame on very small screens for performance */
@media (max-width: 480px) {
  .wn-frame-corner {
    display: none;
  }

  .wn-frame-border {
    box-shadow: 0 0 10px var(--wn-frame-glow);
  }
}

/* ============================================
   SSR SECTION DESIGNS - Unique per section
   ============================================ */

/* Word Content Container */
.wn-word-content {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-lg);
  padding: var(--wn-space-md);
}

/* SSR Loading State */
.wn-ssr-loading {
  padding: var(--wn-space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-md);
}

/* Word Header - Hero style */
.wn-ssr-header {
  background: linear-gradient(135deg, var(--wn-primary-dark), var(--wn-primary));
  color: white;
  padding: var(--wn-space-xl);
  border-radius: var(--wn-radius-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: wn-ssr-fade-up 0.4s ease-out;
}

.wn-ssr-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: wn-ssr-float 8s ease-in-out infinite;
}

.wn-ssr-header .wn-word-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}

.wn-ssr-header .wn-word-pronunciation {
  display: block;
  font-size: 1.1rem;
  opacity: 0.9;
  margin-top: var(--wn-space-xs);
  font-style: italic;
  position: relative;
  z-index: 1;
}

.wn-ssr-header .wn-word-audio {
  display: flex;
  justify-content: center;
  gap: var(--wn-space-md);
  margin-top: var(--wn-space-md);
  position: relative;
  z-index: 1;
}

.wn-ssr-header .wn-audio-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 8px 16px;
  border-radius: var(--wn-radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--wn-transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.wn-ssr-header .wn-audio-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

/* Definitions - Card stack style */
.wn-ssr-definitions {
  background: var(--wn-surface);
  border: 2px solid var(--wn-primary);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
  box-shadow:
    0 2px 0 var(--wn-primary),
    0 4px 0 var(--wn-primary-dark);
  animation: wn-ssr-card-enter 0.5s ease-out 0.1s both;
}

.wn-ssr-definitions .wn-section__header {
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
  margin-bottom: var(--wn-space-md);
}

.wn-ssr-definitions .wn-section__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--wn-text);
  margin: 0;
}

.wn-ssr-definitions .wn-def-group {
  margin-bottom: var(--wn-space-lg);
  padding-left: var(--wn-space-md);
  border-left: 4px solid var(--wn-primary);
}

.wn-ssr-definitions .wn-def-pos {
  display: inline-block;
  background: var(--wn-primary);
  color: white;
  padding: 2px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--wn-space-sm);
}

.wn-ssr-definitions .wn-def-item {
  margin-bottom: var(--wn-space-md);
  padding: var(--wn-space-sm) 0;
}

.wn-ssr-definitions .wn-def-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--wn-text);
  margin: 0;
}

.wn-ssr-definitions .wn-def-bengali {
  font-size: 0.9rem;
  color: var(--wn-text-secondary);
  margin: var(--wn-space-xs) 0 0 0;
  font-family: 'Noto Sans Bengali', sans-serif;
}

.wn-ssr-definitions .wn-def-example {
  font-size: 0.875rem;
  color: var(--wn-text-muted);
  font-style: italic;
  margin: var(--wn-space-sm) 0 0 0;
  padding-left: var(--wn-space-md);
  border-left: 2px solid var(--wn-border);
}

/* Paragraph - Book style */
.wn-ssr-paragraph {
  background: linear-gradient(to right, #f5f5dc 0%, #fffff0 50%, #f5f5dc 100%);
  border: 1px solid #d4c4a8;
  border-radius: var(--wn-radius-md);
  padding: var(--wn-space-xl);
  font-family: var(--wn-font-serif);
  position: relative;
  animation: wn-ssr-book-open 0.6s ease-out 0.2s both;
}

[data-theme="dark"] .wn-ssr-paragraph {
  background: linear-gradient(to right, #2c2416 0%, #3c3426 50%, #2c2416 100%);
  border-color: #5c4c38;
}

.wn-ssr-paragraph::before {
  content: '"';
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  font-size: 4rem;
  color: var(--wn-primary-light);
  opacity: 0.5;
  font-family: serif;
  line-height: 1;
}

.wn-ssr-paragraph .wn-section__header {
  margin-bottom: var(--wn-space-md);
}

.wn-ssr-paragraph .wn-section__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--wn-text-secondary);
  margin: 0;
}

.wn-ssr-paragraph .wn-paragraph-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--wn-text);
  margin: 0;
  text-indent: 2rem;
}

/* Short HTML - Glassmorphism */
.wn-ssr-short {
  background: rgba(99, 102, 241, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
  animation: wn-ssr-glass-emerge 0.5s ease-out 0.25s both;
}

[data-theme="dark"] .wn-ssr-short {
  background: rgba(129, 140, 248, 0.1);
  border-color: rgba(129, 140, 248, 0.2);
}

.wn-ssr-short .wn-section__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--wn-primary);
  margin: 0 0 var(--wn-space-md) 0;
}

.wn-ssr-short .wn-short-content {
  line-height: 1.7;
  color: var(--wn-text);
}

/* Long HTML - Deep content */
.wn-ssr-long {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-xl);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.06);
  animation: wn-ssr-expand 0.6s ease-out 0.3s both;
}

[data-theme="dark"] .wn-ssr-long {
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.2);
}

.wn-ssr-long .wn-section__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--wn-text);
  margin: 0 0 var(--wn-space-lg) 0;
  padding-bottom: var(--wn-space-sm);
  border-bottom: 2px solid var(--wn-primary);
}

.wn-ssr-long .wn-long-content {
  line-height: 1.75;
  color: var(--wn-text);
}

/* Bengali Paragraph */
.wn-ssr-paragraph-bn {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: var(--wn-radius-md);
  padding: var(--wn-space-lg);
  animation: wn-ssr-fade-up 0.5s ease-out 0.35s both;
}

[data-theme="dark"] .wn-ssr-paragraph-bn {
  background: linear-gradient(135deg, #422006 0%, #713f12 100%);
}

.wn-ssr-paragraph-bn .wn-section__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--wn-warning-text);
  margin: 0 0 var(--wn-space-md) 0;
}

.wn-ssr-paragraph-bn .wn-paragraph-bn-text {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--wn-text);
}

/* Image - Gallery style */
.wn-ssr-image {
  padding: 0;
  animation: wn-ssr-zoom-in 0.5s ease-out 0.4s both;
}

.wn-ssr-image .wn-image-container {
  position: relative;
  border-radius: var(--wn-radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: transform var(--wn-transition);
}

.wn-ssr-image .wn-image-container:hover {
  transform: scale(1.02);
}

.wn-ssr-image .wn-image {
  width: 100%;
  display: block;
}

.wn-ssr-image .wn-image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  padding: var(--wn-space-lg) var(--wn-space-md) var(--wn-space-md);
  font-size: 0.875rem;
}

/* Examples - Quote blocks */
.wn-ssr-examples {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
  animation: wn-ssr-slide-in 0.5s ease-out 0.45s both;
}

.wn-ssr-examples .wn-section__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--wn-text);
  margin: 0 0 var(--wn-space-md) 0;
}

.wn-ssr-examples .wn-example-item {
  display: flex;
  gap: var(--wn-space-md);
  padding: var(--wn-space-md);
  margin-bottom: var(--wn-space-sm);
  background: var(--wn-bg-elevated);
  border-radius: var(--wn-radius-md);
  border-left: 4px solid var(--wn-accent);
  transition: all var(--wn-transition);
}

.wn-ssr-examples .wn-example-item:hover {
  transform: translateX(8px);
  border-left-color: var(--wn-primary);
}

.wn-ssr-examples .wn-example-num {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--wn-primary);
  min-width: 24px;
}

.wn-ssr-examples .wn-example-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--wn-text);
  margin: 0;
}

/* Sentences - Clean list with tabs */
.wn-ssr-sentences {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
  animation: wn-ssr-fade-up 0.5s ease-out 0.5s both;
}

.wn-ssr-sentences .wn-section__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--wn-text);
  margin: 0 0 var(--wn-space-md) 0;
}

.wn-sentence-tabs {
  display: flex;
  gap: var(--wn-space-xs);
  flex-wrap: wrap;
  margin-bottom: var(--wn-space-md);
  padding-bottom: var(--wn-space-sm);
  border-bottom: 1px solid var(--wn-border);
}

.wn-sentence-tab {
  background: var(--wn-bg-elevated);
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius-full);
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--wn-text-secondary);
  cursor: pointer;
  transition: all var(--wn-transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.wn-sentence-tab:hover {
  background: var(--wn-surface-hover);
  border-color: var(--wn-primary);
}

.wn-sentence-tab.wn-active {
  background: var(--wn-primary);
  border-color: var(--wn-primary);
  color: white;
}

.wn-tab-count {
  font-size: 0.7rem;
  background: rgba(0,0,0,0.1);
  padding: 2px 6px;
  border-radius: 10px;
}

.wn-sentence-tab.wn-active .wn-tab-count {
  background: rgba(255,255,255,0.2);
}

.wn-sentences-list {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-sm);
}

.wn-sentence-item {
  padding: var(--wn-space-md);
  background: var(--wn-bg-elevated);
  border-radius: var(--wn-radius-md);
  transition: all var(--wn-transition);
  position: relative;
}

.wn-sentence-item:hover {
  background: var(--wn-bg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.wn-sentence-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: var(--wn-space-xs);
}

.wn-sentence-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--wn-text);
  margin: 0;
}

.wn-sentence-source {
  display: block;
  font-size: 0.75rem;
  color: var(--wn-text-muted);
  margin-top: var(--wn-space-xs);
  font-style: italic;
}

/* ============================================
   V3 SENTENCE CARDS (Unique category designs, clickable)
   ============================================ */

.wn-sentence-card {
  position: relative;
  padding: var(--wn-space-md);
  margin: 0;
  border-radius: var(--wn-radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  /* Border-left and gradient background set inline via API */
}

.wn-sentence-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.wn-sentence-card .wn-sentence-text {
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* V3 Sentence Modal */
.wn-sentence-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: wn-fade-in 0.2s ease;
}

.wn-sentence-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.wn-sentence-modal-content {
  position: relative;
  background: var(--wn-surface);
  padding: 28px;
  border-radius: 20px;
  max-width: 90%;
  width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  animation: wn-scale-in 0.3s ease;
}

.wn-sentence-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--wn-surface-hover);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wn-text-muted);
  transition: all 0.2s ease;
}

.wn-sentence-modal-close:hover {
  background: var(--wn-surface-active);
  color: var(--wn-text);
}

.wn-sentence-modal-content .wn-sentence-badge {
  margin-bottom: var(--wn-space-md);
}

.wn-sentence-modal-content .wn-sentence-full {
  font-size: 1.1rem;
  line-height: 1.8;
  text-align: justify;
  margin: 16px 0;
  color: var(--wn-text);
}

.wn-sentence-modal-content .wn-sentence-source {
  padding-top: var(--wn-space-md);
  border-top: 1px solid var(--wn-border);
}

/* ============================================
   V3 PARAGRAPH CARDS (Animated, clickable for modal)
   ============================================ */

.wn-para-card {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
  cursor: pointer;
  animation: wn-card-float-in 0.6s ease both;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  max-height: 180px;
}

.wn-para-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(99,102,241,0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.wn-para-card::after {
  content: 'Click to expand';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 16px 12px;
  background: linear-gradient(transparent, var(--wn-surface));
  font-size: 0.75rem;
  color: var(--wn-text-muted);
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.wn-para-card:hover::before {
  opacity: 1;
}

.wn-para-card:hover::after {
  opacity: 1;
}

.wn-para-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

@keyframes wn-card-float-in {
  0% {
    opacity: 0;
    transform: translateY(40px) rotateX(-10deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

/* Unique card type styles */
.wn-para-quick { border-left: 4px solid #8b5cf6; }
.wn-para-deep { border-left: 4px solid #3b82f6; }
.wn-para-context { border-left: 4px solid #10b981; }
.wn-para-bengali { border-left: 4px solid #f59e0b; }

/* V3 Paragraph Modal */
.wn-para-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: wn-fade-in 0.2s ease;
}

.wn-para-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.wn-para-modal-content {
  position: relative;
  background: var(--wn-surface);
  padding: 28px;
  border-radius: 20px;
  max-width: 90%;
  width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  animation: wn-scale-in 0.3s ease;
}

.wn-para-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--wn-text);
}

.wn-para-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--wn-surface-hover);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wn-text-muted);
  transition: all 0.2s ease;
}

.wn-para-modal-close:hover {
  background: var(--wn-surface-active);
  color: var(--wn-text);
}

.wn-para-modal-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--wn-text);
}

.wn-para-modal-body p {
  margin-bottom: var(--wn-space-md);
}

/* ============================================
   V3 MOBILE IMPROVEMENTS (No margins, full width)
   ============================================ */

@media (max-width: 768px) {
  .wn-right-pane {
    padding: 0;
  }

  /* Full width sections on mobile */
  .wn-word-content > section {
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
    border-left: none;
    border-right: none;
  }

  /* Full width sentence cards */
  .wn-sentences-list {
    margin: 0;
    padding: 0;
  }

  .wn-sentences-items {
    gap: 0;
  }

  .wn-sentence-card {
    border-radius: 0;
    margin: 0;
    border-bottom: 1px solid var(--wn-border);
  }

  .wn-sentence-card:last-child {
    border-bottom: none;
  }

  /* Paragraph cards full width */
  .wn-para-grid {
    gap: 0;
  }

  .wn-para-card {
    border-radius: 0;
    margin: 0;
    border-bottom: 1px solid var(--wn-border);
  }

  /* Adjust mobile footer padding for new layout */
  .wn-mobile-footer {
    padding: var(--wn-space-sm) var(--wn-space-md);
  }

  /* Sentence text justified on mobile */
  .wn-sentence-text {
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
}

/* Responsive modals on small screens */
@media (max-width: 480px) {
  .wn-sentence-modal-content,
  .wn-para-modal-content {
    width: 95%;
    max-height: 90vh;
    padding: 20px;
    border-radius: 16px;
  }

  .wn-para-modal-title {
    font-size: 1.1rem;
  }

  .wn-sentence-full {
    font-size: 1rem;
  }
}

/* Load More Button */
.wn-load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-sm);
  width: 100%;
  padding: var(--wn-space-md);
  margin-top: var(--wn-space-md);
  background: var(--wn-primary-light);
  border: 1px dashed var(--wn-primary);
  border-radius: var(--wn-radius-md);
  color: var(--wn-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--wn-transition);
}

.wn-load-more-btn:hover:not(:disabled) {
  background: var(--wn-primary);
  color: white;
  border-style: solid;
}

.wn-load-more-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.wn-remaining {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Related - Tag cloud */
.wn-ssr-related {
  background: linear-gradient(135deg, var(--wn-surface) 0%, var(--wn-bg-elevated) 100%);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
  animation: wn-ssr-bounce-in 0.6s ease-out 0.55s both;
}

.wn-ssr-related .wn-section__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--wn-text);
  margin: 0 0 var(--wn-space-md) 0;
}

.wn-ssr-related .wn-related-group {
  margin-bottom: var(--wn-space-md);
}

.wn-ssr-related .wn-related-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wn-text-muted);
  margin-bottom: var(--wn-space-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wn-ssr-related .wn-related-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wn-space-xs);
}

.wn-ssr-related .wn-related-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--wn-transition);
}

.wn-ssr-related .wn-tag--syn {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.wn-ssr-related .wn-tag--ant {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.wn-ssr-related .wn-related-tag:hover {
  transform: scale(1.08) rotate(-2deg);
}

/* Videos - Grid */
.wn-ssr-videos {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
  animation: wn-ssr-fade-up 0.5s ease-out 0.6s both;
}

.wn-ssr-videos .wn-section__title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--wn-text);
  margin: 0 0 var(--wn-space-md) 0;
}

.wn-ssr-videos .wn-videos-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--wn-space-md);
}

.wn-ssr-videos .wn-video-card {
  position: relative;
  border-radius: var(--wn-radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--wn-transition);
  box-shadow: var(--wn-shadow);
}

.wn-ssr-videos .wn-video-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--wn-shadow-lg);
}

.wn-ssr-videos .wn-video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.wn-ssr-videos .wn-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(255,0,0,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  transition: transform var(--wn-transition);
  pointer-events: none;
}

.wn-ssr-videos .wn-video-card:hover .wn-video-play {
  transform: translate(-50%, -50%) scale(1.15);
}

/* Tags - Badges */
.wn-ssr-tags {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
  animation: wn-ssr-fade-up 0.5s ease-out 0.65s both;
}

.wn-ssr-tags .wn-section__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--wn-text);
  margin: 0 0 var(--wn-space-md) 0;
}

.wn-ssr-tags .wn-tags-content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wn-space-sm);
}

.wn-ssr-tags .wn-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--wn-primary-light);
  color: var(--wn-primary);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--wn-transition);
}

.wn-ssr-tags .wn-tag:hover {
  background: var(--wn-primary);
  color: white;
}

/* Highlight */
.wn-highlight {
  background: rgba(250, 204, 21, 0.35);
  padding: 0 2px;
  border-radius: 2px;
}

[data-theme="dark"] .wn-highlight {
  background: rgba(250, 204, 21, 0.25);
}

/* Empty state */
.wn-empty {
  text-align: center;
  color: var(--wn-text-muted);
  padding: var(--wn-space-xl);
  font-size: 0.9rem;
}

/* Sentences Loading */
.wn-sentences-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-sm);
  padding: var(--wn-space-xl);
  color: var(--wn-text-muted);
}

/* Hidden sections */
.wn-section-hidden {
  display: none !important;
}

/* ============================================
   SSR ANIMATIONS
   ============================================ */

@keyframes wn-ssr-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wn-ssr-card-enter {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes wn-ssr-book-open {
  from {
    opacity: 0;
    transform: perspective(800px) rotateY(-15deg);
  }
  to {
    opacity: 1;
    transform: perspective(800px) rotateY(0);
  }
}

@keyframes wn-ssr-glass-emerge {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateY(0);
  }
}

@keyframes wn-ssr-expand {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  to {
    opacity: 1;
    max-height: 2000px;
    padding-top: var(--wn-space-xl);
    padding-bottom: var(--wn-space-xl);
  }
}

@keyframes wn-ssr-zoom-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes wn-ssr-slide-in {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes wn-ssr-bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  60% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes wn-ssr-float {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-20px, 20px);
  }
}

/* Spinner */
.wn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--wn-border);
  border-top-color: var(--wn-primary);
  border-radius: 50%;
  animation: wn-spin 0.8s linear infinite;
}

@keyframes wn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Focus content in modal */
.wn-focus-content [class*="wn-ssr-"] {
  animation: none;
  box-shadow: none;
}

/* ============================================
   SSR RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 640px) {
  .wn-word-content {
    padding: var(--wn-space-sm);
    gap: var(--wn-space-md);
  }

  .wn-ssr-header {
    padding: var(--wn-space-lg);
  }

  .wn-ssr-header .wn-word-title {
    font-size: 1.75rem;
  }

  .wn-ssr-definitions,
  .wn-ssr-paragraph,
  .wn-ssr-short,
  .wn-ssr-long,
  .wn-ssr-examples,
  .wn-ssr-sentences,
  .wn-ssr-related,
  .wn-ssr-videos,
  .wn-ssr-tags {
    padding: var(--wn-space-md);
  }

  .wn-sentence-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .wn-sentence-tabs::-webkit-scrollbar {
    display: none;
  }

  .wn-ssr-videos .wn-videos-content {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--wn-space-sm);
  }
}

/* ============================================
   V2 REDESIGN - TWO PANE LAYOUT
   ============================================ */

/* Two Pane Container */
.wn-two-pane {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: calc(var(--wn-header-height) + var(--wn-progress-bar-height) + var(--wn-frame-width));
}

@media (min-width: 1024px) {
  .wn-two-pane {
    flex-direction: row;
    padding-top: calc(var(--wn-header-height) + var(--wn-frame-width));
  }

  /* Hide progress bar on desktop - left pane has its own progress display */
  .wn-progress-bar-container {
    display: none !important;
  }
}

/* Left Pane - Fixed on Desktop */
.wn-left-pane {
  display: none;
}

@media (min-width: 1024px) {
  .wn-left-pane {
    display: flex;
    flex-direction: column;
    width: 40%;
    max-width: 480px;
    min-width: 360px;
    position: sticky;
    top: calc(var(--wn-header-height) + var(--wn-frame-width));
    height: calc(100vh - var(--wn-header-height) - var(--wn-frame-width));
    padding: var(--wn-space-xl);
    border-right: 1px solid var(--wn-border);
    background: var(--wn-bg);
    overflow-y: auto;
  }
}

/* Right Pane - Scrollable */
.wn-right-pane {
  flex: 1;
  padding: var(--wn-space-md);
  padding-bottom: calc(var(--wn-bottom-bar-height) + var(--wn-space-xl));
}

@media (min-width: 1024px) {
  .wn-right-pane {
    padding: var(--wn-space-xl);
    padding-bottom: var(--wn-space-2xl);
    max-width: none;
  }
}

/* ============================================
   V2 HEADER - Always White with Branded Logo
   ============================================ */

.wn-fixed-header {
  background: #ffffff !important;
  color: #1a1a1a !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="dark"] .wn-fixed-header {
  background: #ffffff !important;
  color: #1a1a1a !important;
}

.wn-logo-link {
  display: flex;
  align-items: center;
}

.wn-logo-img {
  width: 36px;
  height: 36px;
  border-radius: var(--wn-radius-md);
  object-fit: cover;
  transition: transform var(--wn-transition);
}

.wn-logo-img:hover {
  transform: scale(1.05) rotate(5deg);
}

.wn-brand-text {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: #1a1a1a;
  text-decoration: none;
  margin-left: 8px;
}

.wn-brand-text .wn-n { color: #22c55e !important; font-weight: 700; }
.wn-brand-text .wn-u { color: #ef4444 !important; font-weight: 700; }
.wn-brand-text .wn-s { color: #22c55e !important; font-weight: 700; }

.wn-set-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 0.875rem;
  padding: 4px 8px;
  background: #f1f5f9;
  border-radius: var(--wn-radius);
}

/* ============================================
   V2 WORD CARD - Premium Design
   ============================================ */

.wn-word-card,
.wn-left-word-card .wn-word-card {
  /* FORCED WHITE/CREAM regardless of light/dark mode */
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
  color: #1a1a1a !important;
  padding: var(--wn-space-xl);
  border-radius: var(--wn-radius-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.wn-word-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 60%);
  animation: wn-float 8s ease-in-out infinite;
}

@keyframes wn-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 20px); }
}

.wn-word-card .wn-word-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-md);
  position: relative;
  z-index: 1;
}

.wn-word-card .wn-word-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: #1a1a1a !important;
}

@media (min-width: 1024px) {
  .wn-word-card .wn-word-title {
    font-size: 3rem;
  }
}

.wn-word-card .wn-audio-btn.wn-audio-main {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--wn-primary);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--wn-transition);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.wn-word-card .wn-audio-btn.wn-audio-main:hover {
  background: var(--wn-primary-dark);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.wn-word-card .wn-word-tags {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wn-primary);
  margin: var(--wn-space-md) 0 0;
  position: relative;
  z-index: 1;
}

.wn-word-card .wn-word-variations {
  font-size: 1rem;
  font-weight: 400;
  color: #4b5563;
  margin: var(--wn-space-sm) 0 0;
  position: relative;
  z-index: 1;
}

.wn-word-card .wn-label {
  color: #6b7280;
}

.wn-word-card .wn-word-reference {
  font-size: 0.8rem;
  font-style: italic;
  color: #6b7280;
  margin: var(--wn-space-md) 0 0;
  position: relative;
  z-index: 1;
}

/* ============================================
   V2 MARK SECTION
   ============================================ */

.wn-mark-word {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
  margin-top: var(--wn-space-lg);
  border: 1px solid var(--wn-border);
}

.wn-mark-header {
  margin-bottom: var(--wn-space-md);
}

.wn-mark-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wn-text-secondary);
}

.wn-mark-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-sm);
}

.wn-mark-btn {
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
  padding: var(--wn-space-sm) var(--wn-space-md);
  border-radius: var(--wn-radius-md);
  border: 2px solid transparent;
  background: var(--wn-bg);
  cursor: pointer;
  transition: all var(--wn-transition);
  font-size: 0.875rem;
  font-weight: 500;
}

.wn-mark-btn:hover {
  transform: translateX(4px);
}

.wn-mark-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid currentColor;
  transition: all var(--wn-transition);
}

.wn-mark-btn--green { color: #22c55e; border-color: rgba(34, 197, 94, 0.2); }
.wn-mark-btn--green:hover { background: rgba(34, 197, 94, 0.1); }
.wn-mark-btn--green.wn-active .wn-mark-circle { background: #22c55e; }

.wn-mark-btn--orange { color: #f59e0b; border-color: rgba(245, 158, 11, 0.2); }
.wn-mark-btn--orange:hover { background: rgba(245, 158, 11, 0.1); }
.wn-mark-btn--orange.wn-active .wn-mark-circle { background: #f59e0b; }

.wn-mark-btn--red { color: #ef4444; border-color: rgba(239, 68, 68, 0.2); }
.wn-mark-btn--red:hover { background: rgba(239, 68, 68, 0.1); }
.wn-mark-btn--red.wn-active .wn-mark-circle { background: #ef4444; }

.wn-mark-status {
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
  margin-top: var(--wn-space-md);
  padding-top: var(--wn-space-md);
  border-top: 1px solid var(--wn-border);
}

.wn-mark-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--wn-text-muted);
}

.wn-mark-indicator.wn-green { background: #22c55e; }
.wn-mark-indicator.wn-orange { background: #f59e0b; }
.wn-mark-indicator.wn-red { background: #ef4444; }

.wn-status-text {
  font-size: 0.8rem;
  color: var(--wn-text-muted);
}

/* ============================================
   V2 LEFT NAV
   ============================================ */

.wn-left-nav {
  margin-top: auto;
  padding-top: var(--wn-space-lg);
}

.wn-nav-progress {
  display: flex;
  align-items: center;
  gap: var(--wn-space-md);
  margin-bottom: var(--wn-space-md);
}

.wn-nav-progress .wn-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--wn-border);
  border-radius: var(--wn-radius-full);
  overflow: hidden;
}

.wn-nav-progress .wn-progress-fill {
  height: 100%;
  background: var(--wn-primary);
  transition: width var(--wn-transition);
}

.wn-nav-progress .wn-progress-text {
  font-size: 0.8rem;
  color: var(--wn-text-muted);
  white-space: nowrap;
}

.wn-nav-buttons {
  display: flex;
  gap: var(--wn-space-sm);
}

.wn-nav-buttons .wn-nav-btn {
  flex: 1;
}

/* ============================================
   V2 LEFT PROFILE
   ============================================ */

.wn-left-profile {
  display: flex;
  align-items: center;
  gap: var(--wn-space-md);
  padding-top: var(--wn-space-lg);
  margin-top: var(--wn-space-lg);
  border-top: 1px solid var(--wn-border);
}

.wn-profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--wn-border);
}

.wn-profile-link {
  font-size: 0.875rem;
  color: var(--wn-primary);
  text-decoration: none;
}

.wn-profile-link:hover {
  text-decoration: underline;
}

/* ============================================
   V2 DEFINITIONS - Animated Cards
   ============================================ */

.wn-ssr-definitions {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
}

.wn-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--wn-text);
  margin: 0 0 var(--wn-space-lg);
}

/* ============================================
   V3 FRAME TITLE EFFECT (Cut-out style with hover shimmer)
   ============================================ */

.wn-frame-title {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--wn-bg);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--section-color, var(--wn-primary));
  transition: all 0.3s ease;
  z-index: 1;
}

/* Section with frame needs relative positioning and margin-top */
section:has(.wn-frame-title) {
  position: relative;
  margin-top: 24px;
  border: 2px solid var(--section-color, var(--wn-border));
  border-radius: var(--wn-radius-lg);
  padding-top: var(--wn-space-lg);
}

/* Hover shimmer on section */
section:has(.wn-frame-title):hover {
  border-color: var(--section-color, var(--wn-primary));
}

section:has(.wn-frame-title):hover .wn-frame-title {
  text-shadow: 0 0 8px currentColor;
}

/* Shimmer gradient appears ONLY on hover */
section:has(.wn-frame-title)::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--wn-radius-lg);
  background: linear-gradient(90deg,
    transparent 0%,
    var(--section-color, var(--wn-primary)) 50%,
    transparent 100%);
  z-index: -1;
  opacity: 0;
  background-size: 200% 100%;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

section:has(.wn-frame-title):hover::before {
  opacity: 0.15;
  animation: wn-frame-shimmer 2s ease infinite;
}

@keyframes wn-frame-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Section-specific colors for frames */
.wn-ssr-definitions { --section-color: #6366f1; }
.wn-ssr-paragraphs { --section-color: #3b82f6; }
.wn-ssr-related { --section-color: #10b981; }
.wn-ssr-advanced { --section-color: #8b5cf6; }
.wn-ssr-examples { --section-color: #f59e0b; }
.wn-ssr-sentences { --section-color: #ec4899; }
.wn-ssr-image { --section-color: #06b6d4; }
.wn-ssr-videos { --section-color: #ef4444; }

.wn-def-cards {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-md);
}

.wn-def-card {
  display: flex;
  gap: var(--wn-space-md);
  padding: var(--wn-space-md);
  background: var(--wn-bg);
  border-radius: var(--wn-radius-md);
  border-left: 4px solid var(--wn-primary);
  animation: wn-fade-up 0.4s ease-out backwards;
}

.wn-def-number {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wn-primary);
  color: white;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
}

.wn-def-content {
  flex: 1;
}

.wn-def-english {
  color: var(--wn-text);
  margin: 0 0 var(--wn-space-xs);
  line-height: 1.5;
}

.wn-def-bengali {
  color: var(--wn-text-secondary);
  font-size: 0.9rem;
  margin: 0;
  font-family: 'Noto Sans Bengali', sans-serif;
}

@keyframes wn-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   V2 PARAGRAPH CARDS - Four Distinct Styles
   ============================================ */

.wn-ssr-paragraphs {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
}

.wn-para-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wn-space-md);
}

@media (min-width: 768px) {
  .wn-para-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.wn-para-card {
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
  position: relative;
  overflow: hidden;
}

.wn-para-icon {
  font-size: 1.5rem;
  margin-bottom: var(--wn-space-sm);
}

.wn-para-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 var(--wn-space-md);
}

.wn-para-content {
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: justify;
}

/* Quick Summary - Glassmorphism */
.wn-para-quick {
  background: rgba(99, 102, 241, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Deep Dive - Dark */
.wn-para-deep {
  background: #1e293b;
  color: #f1f5f9;
}

.wn-para-deep h3 {
  color: #f1f5f9;
}

/* Context - Gradient Border */
.wn-para-context {
  background: var(--wn-bg);
  border: 2px solid transparent;
  background-image: linear-gradient(var(--wn-bg), var(--wn-bg)),
                    linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* Bengali - Cultural Pattern */
.wn-para-bengali {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #86efac;
}

[data-theme="dark"] .wn-para-bengali {
  background: linear-gradient(135deg, #14532d 0%, #166534 100%);
  border-color: #22c55e;
}

.wn-para-bengali .wn-para-content {
  font-family: 'Noto Sans Bengali', sans-serif;
}

/* ============================================
   V2 SYNONYMS & ANTONYMS - Tag Cloud
   ============================================ */

.wn-ssr-related {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
}

.wn-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wn-space-lg);
}

@media (min-width: 640px) {
  .wn-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.wn-related-label {
  display: flex;
  align-items: center;
  gap: var(--wn-space-xs);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 var(--wn-space-md);
  color: var(--wn-text);
}

.wn-related-label .wn-icon {
  font-size: 1.2em;
}

.wn-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wn-space-xs);
}

.wn-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--wn-radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--wn-transition);
}

.wn-tag-syn {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.wn-tag-syn:hover {
  background: rgba(34, 197, 94, 0.25);
  transform: scale(1.05);
}

.wn-tag-ant {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.wn-tag-ant:hover {
  background: rgba(239, 68, 68, 0.25);
  transform: scale(1.05);
}

/* ============================================
   V2 ADVANCED LEARNING
   ============================================ */

.wn-ssr-advanced {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
}

.wn-advanced-content {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-lg);
}

.wn-pos-group {
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius-md);
  padding: var(--wn-space-md);
}

.wn-pos-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--wn-primary);
  color: white;
  border-radius: var(--wn-radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: var(--wn-space-md);
}

.wn-sense-card {
  padding: var(--wn-space-md);
  background: var(--wn-bg);
  border-radius: var(--wn-radius);
  margin-bottom: var(--wn-space-sm);
}

.wn-sense-card:last-child {
  margin-bottom: 0;
}

.wn-sense-def {
  font-size: 0.95rem;
  color: var(--wn-text);
  line-height: 1.5;
}

.wn-sense-examples {
  margin-top: var(--wn-space-sm);
  padding-left: var(--wn-space-md);
  border-left: 2px solid var(--wn-border);
}

.wn-sense-examples .wn-example {
  font-size: 0.85rem;
  color: var(--wn-text-secondary);
  font-style: italic;
  margin-bottom: var(--wn-space-xs);
}

.wn-sense-relations {
  margin-top: var(--wn-space-sm);
  display: flex;
  flex-wrap: wrap;
  gap: var(--wn-space-sm);
}

.wn-relation {
  font-size: 0.8rem;
}

.wn-relation-type {
  color: var(--wn-text-muted);
  margin-right: 4px;
}

.wn-relation-words {
  color: var(--wn-primary);
}

.wn-json-fallback {
  background: var(--wn-bg);
  padding: var(--wn-space-md);
  border-radius: var(--wn-radius);
  overflow-x: auto;
}

.wn-json-fallback pre {
  margin: 0;
  font-size: 0.75rem;
  color: var(--wn-text-secondary);
}

/* ============================================
   V2 EASY EXAMPLES
   ============================================ */

.wn-ssr-examples {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
}

.wn-examples-list {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-sm);
}

.wn-example-card {
  display: flex;
  gap: var(--wn-space-md);
  padding: var(--wn-space-md);
  background: var(--wn-bg);
  border-radius: var(--wn-radius-md);
  border-left: 4px solid var(--wn-accent);
  transition: all var(--wn-transition);
}

.wn-example-card:hover {
  transform: translateX(8px);
  border-left-color: var(--wn-primary);
}

.wn-example-num {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wn-accent);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
}

.wn-example-text {
  flex: 1;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--wn-text);
}

/* ============================================
   V2 SENTENCES - Dropdown
   ============================================ */

.wn-ssr-sentences {
  background: var(--wn-surface);
  border-radius: var(--wn-radius-lg);
  padding: var(--wn-space-lg);
}

.wn-category-select {
  display: flex;
  align-items: center;
  gap: var(--wn-space-md);
  margin-bottom: var(--wn-space-lg);
  flex-wrap: wrap;
}

.wn-category-select label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wn-text-secondary);
}

.wn-select {
  padding: 8px 12px;
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius);
  background: var(--wn-bg);
  color: var(--wn-text);
  font-size: 0.875rem;
  cursor: pointer;
  min-width: 160px;
}

.wn-select:focus {
  outline: none;
  border-color: var(--wn-primary);
}

.wn-sentence-count {
  font-size: 0.8rem;
  color: var(--wn-text-muted);
}

.wn-sentences-items {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-sm);
}

/* ============================================
   V2 MARK OVERLAY
   ============================================ */

.wn-mark-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--wn-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--wn-space-lg);
}

.wn-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.wn-overlay-content {
  position: relative;
  background: var(--wn-surface);
  border-radius: var(--wn-radius-xl);
  padding: var(--wn-space-xl);
  max-width: 400px;
  width: 100%;
  text-align: center;
  animation: wn-scale-in 0.3s ease-out;
}

@keyframes wn-scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.wn-overlay-content h3 {
  font-size: 1.25rem;
  margin: 0 0 var(--wn-space-sm);
  color: var(--wn-text);
}

.wn-overlay-content p {
  color: var(--wn-text-secondary);
  margin: 0 0 var(--wn-space-lg);
}

.wn-overlay-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-sm);
}

.wn-overlay-skip {
  margin-top: var(--wn-space-md);
  padding: var(--wn-space-sm);
  background: transparent;
  border: none;
  color: var(--wn-text-muted);
  cursor: pointer;
  font-size: 0.875rem;
}

.wn-overlay-skip:hover {
  color: var(--wn-text);
}

/* ============================================
   V2 COMPLETION MODAL
   ============================================ */

.wn-completion-modal {
  position: fixed;
  inset: 0;
  z-index: var(--wn-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--wn-space-lg);
}

/* Completion modal backdrop - no blur, solid overlay */
#complete-modal-backdrop {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(15, 23, 42, 0.85);
  pointer-events: none; /* Prevent accidental dismissal */
}

.wn-completion-content {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--wn-radius-xl);
  padding: var(--wn-space-2xl);
  max-width: 480px;
  width: 100%;
  text-align: center;
  animation: wn-scale-in 0.4s ease-out, celebratePulse 2s ease-in-out infinite;
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.1),
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 100px rgba(99, 102, 241, 0.2);
  border: 2px solid transparent;
  background-clip: padding-box;
}

@keyframes celebratePulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.1), 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 60px rgba(99, 102, 241, 0.15); }
  50% { box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2), 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 100px rgba(99, 102, 241, 0.3); }
}

.wn-completion-close {
  position: absolute;
  top: var(--wn-space-md);
  right: var(--wn-space-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--wn-radius-full);
  background: var(--wn-surface-hover);
  color: var(--wn-text-muted);
  border: none;
  cursor: pointer;
  transition: all var(--wn-transition-fast);
  z-index: 10;
}

.wn-completion-close:hover {
  background: var(--wn-surface-active);
  color: var(--wn-text);
  transform: scale(1.1);
}

.wn-completion-content h2 {
  font-size: 1.75rem;
  margin: 0 0 var(--wn-space-sm);
  color: var(--wn-text);
}

.wn-completion-content p {
  color: var(--wn-text-secondary);
  margin: 0 0 var(--wn-space-xl);
}

.wn-completion-stats {
  display: flex;
  justify-content: center;
  gap: var(--wn-space-lg);
  margin-bottom: var(--wn-space-xl);
}

.wn-stat {
  text-align: center;
}

.wn-stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
}

.wn-stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--wn-text-muted);
}

.wn-stat-green .wn-stat-num { color: #22c55e; }
.wn-stat-orange .wn-stat-num { color: #f59e0b; }
.wn-stat-red .wn-stat-num { color: #ef4444; }

.wn-completion-actions {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-sm);
}

.wn-confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

/* ============================================
   V2 MOBILE FOOTER
   ============================================ */

.wn-mobile-footer {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--wn-surface);
  border-top: 1px solid var(--wn-border);
  padding: var(--wn-space-md);
  z-index: var(--wn-z-fixed);
}

@media (min-width: 1024px) {
  .wn-mobile-footer {
    display: none;
  }
}

.wn-mobile-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wn-space-md);
}

.wn-mobile-progress {
  font-size: 0.875rem;
  color: var(--wn-text-muted);
}

/* ============================================
   V3 WATER FLOW MARK SECTION (Mobile)
   Three colored circles with water-like animation
   ============================================ */

.wn-mark-water {
  position: relative;
  border-top: 3px solid var(--wn-border);
  background: var(--wn-surface);
  overflow: hidden;
  transition: border-color 0.6s ease;
}

/* Water flow background - fills from circle position */
.wn-water-bg {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Active states - water fills the bar */
.wn-mark-water.wn-marked-green {
  border-top-color: #22c55e;
}
.wn-mark-water.wn-marked-green .wn-water-bg {
  background: linear-gradient(90deg,
    rgba(34, 197, 94, 0.05) 0%,
    rgba(34, 197, 94, 0.15) 33%,
    rgba(34, 197, 94, 0.05) 100%);
  opacity: 1;
  animation: wn-water-flow 1s ease forwards;
}

.wn-mark-water.wn-marked-orange {
  border-top-color: #f97316;
}
.wn-mark-water.wn-marked-orange .wn-water-bg {
  background: linear-gradient(90deg,
    rgba(249, 115, 22, 0.05) 0%,
    rgba(249, 115, 22, 0.15) 50%,
    rgba(249, 115, 22, 0.05) 100%);
  opacity: 1;
  animation: wn-water-flow 1s ease forwards;
}

.wn-mark-water.wn-marked-red {
  border-top-color: #ef4444;
}
.wn-mark-water.wn-marked-red .wn-water-bg {
  background: linear-gradient(90deg,
    rgba(239, 68, 68, 0.05) 0%,
    rgba(239, 68, 68, 0.15) 66%,
    rgba(239, 68, 68, 0.05) 100%);
  opacity: 1;
  animation: wn-water-flow 1s ease forwards;
}

@keyframes wn-water-flow {
  0% {
    transform: scaleX(0);
    opacity: 0;
  }
  30% {
    opacity: 0.8;
  }
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* Circle container */
.wn-mark-circles {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 12px 16px;
}

/* Individual circle buttons */
.wn-water-circle {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid transparent;
  background: var(--wn-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  overflow: visible;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wn-water-circle svg {
  opacity: 0.6;
  transition: all 0.3s ease;
}

/* Color variants */
.wn-water-circle--green {
  border-color: rgba(34, 197, 94, 0.4);
  color: #22c55e;
}
.wn-water-circle--green:hover,
.wn-water-circle--green.wn-active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2), 0 4px 12px rgba(34, 197, 94, 0.3);
}
.wn-water-circle--green.wn-active {
  background: #22c55e;
  color: white;
}
.wn-water-circle--green.wn-active svg {
  opacity: 1;
}

.wn-water-circle--orange {
  border-color: rgba(249, 115, 22, 0.4);
  color: #f97316;
}
.wn-water-circle--orange:hover,
.wn-water-circle--orange.wn-active {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.15);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2), 0 4px 12px rgba(249, 115, 22, 0.3);
}
.wn-water-circle--orange.wn-active {
  background: #f97316;
  color: white;
}
.wn-water-circle--orange.wn-active svg {
  opacity: 1;
}

.wn-water-circle--red {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}
.wn-water-circle--red:hover,
.wn-water-circle--red.wn-active {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2), 0 4px 12px rgba(239, 68, 68, 0.3);
}
.wn-water-circle--red.wn-active {
  background: #ef4444;
  color: white;
}
.wn-water-circle--red.wn-active svg {
  opacity: 1;
}

/* Ripple effect from circle */
.wn-water-ripple {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
  transform: scale(0);
  opacity: 0;
}

.wn-water-circle--green .wn-water-ripple {
  background: rgba(34, 197, 94, 0.4);
}
.wn-water-circle--orange .wn-water-ripple {
  background: rgba(249, 115, 22, 0.4);
}
.wn-water-circle--red .wn-water-ripple {
  background: rgba(239, 68, 68, 0.4);
}

/* Ripple animation on click */
.wn-water-circle.wn-rippling .wn-water-ripple {
  animation: wn-ripple-out 0.6s ease-out forwards;
}

@keyframes wn-ripple-out {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Circle "attached" to border effect - small connector */
.wn-water-circle::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 8px;
  background: var(--wn-surface);
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  transition: all 0.3s ease;
}

.wn-water-circle--green::before {
  border-left-color: rgba(34, 197, 94, 0.4);
  border-right-color: rgba(34, 197, 94, 0.4);
}
.wn-water-circle--green.wn-active::before {
  border-left-color: #22c55e;
  border-right-color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
}

.wn-water-circle--orange::before {
  border-left-color: rgba(249, 115, 22, 0.4);
  border-right-color: rgba(249, 115, 22, 0.4);
}
.wn-water-circle--orange.wn-active::before {
  border-left-color: #f97316;
  border-right-color: #f97316;
  background: rgba(249, 115, 22, 0.15);
}

.wn-water-circle--red::before {
  border-left-color: rgba(239, 68, 68, 0.4);
  border-right-color: rgba(239, 68, 68, 0.4);
}
.wn-water-circle--red.wn-active::before {
  border-left-color: #ef4444;
  border-right-color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* Hover scale */
.wn-water-circle:hover {
  transform: scale(1.1);
}

.wn-water-circle:active {
  transform: scale(0.95);
}

/* Dark theme adjustments */
[data-theme="dark"] .wn-water-circle {
  background: var(--wn-surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

[data-theme="dark"] .wn-water-circle::before {
  background: var(--wn-surface);
}

/* ============================================
   V2 COPYRIGHT FOOTER
   ============================================ */

.wn-copyright-footer {
  background: var(--wn-bg);
  padding: var(--wn-space-md);
  text-align: center;
  border-top: 1px solid var(--wn-border);
}

.wn-copyright-footer p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--wn-text-muted);
}

@media (max-width: 1023px) {
  .wn-copyright-footer {
    padding-bottom: calc(var(--wn-space-md) + 180px);
  }
}

/* ============================================
   V2 MOBILE MARK SECTION
   ============================================ */

.wn-mobile-mark {
  padding-bottom: var(--wn-space-md);
  margin-bottom: var(--wn-space-sm);
  border-bottom: 1px solid var(--wn-border);
}

.wn-mobile-mark .wn-mark-header {
  margin-bottom: var(--wn-space-sm);
  text-align: center;
}

.wn-mobile-mark .wn-mark-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--wn-text-secondary);
}

.wn-mark-buttons--mobile {
  display: flex;
  gap: var(--wn-space-xs);
  justify-content: center;
}

.wn-mark-buttons--mobile .wn-mark-btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.7rem;
}

.wn-mark-buttons--mobile .wn-mark-circle {
  width: 10px;
  height: 10px;
}

.wn-mark-buttons--mobile .wn-mark-text {
  font-size: 0.65rem;
}

.wn-mark-status--mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-xs);
  margin-top: var(--wn-space-xs);
  font-size: 0.65rem;
}

/* Hide mobile mark on desktop */
@media (min-width: 1024px) {
  .wn-mobile-mark {
    display: none;
  }
}

/* Increase mobile footer height to accommodate mark section */
@media (max-width: 1023px) {
  .wn-mobile-footer {
    padding-bottom: calc(var(--wn-space-md) + var(--wn-safe-area-bottom));
  }
}

/* V2 COMPACT SETTINGS - styles moved to yellow/black theme section above */

/* Completion Modal Close Button */
.wn-completion-close {
  position: absolute;
  top: var(--wn-space-md);
  right: var(--wn-space-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--wn-radius-full);
  background: var(--wn-surface-hover);
  color: var(--wn-text-muted);
  border: none;
  cursor: pointer;
  transition: all var(--wn-transition-fast);
  z-index: 10;
}

.wn-completion-close:hover {
  background: var(--wn-surface-active);
  color: var(--wn-text);
}

.wn-completion-content {
  position: relative;
}

/* ============================================
   AI PERSONALIZED LEARNING SECTION
   ============================================ */

/* Section Header Badge */
.wn-ai-badge-header {
  margin-left: auto;
  padding: 0.25rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--wn-primary);
  background: var(--wn-primary-light);
  border-radius: var(--wn-radius-full);
}

[data-theme="dark"] .wn-ai-badge-header {
  background: rgba(99, 102, 241, 0.2);
}

/* AI Icon gradient */
.wn-section__icon--ai {
  background: linear-gradient(135deg, var(--wn-primary), #8b5cf6);
  color: white;
}

/* Privacy Notice */
.wn-ai-privacy {
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
  padding: var(--wn-space-sm) var(--wn-space-md);
  margin-bottom: var(--wn-space-md);
  font-size: 0.8125rem;
  color: var(--wn-warning-text);
  background: var(--wn-warning-light);
  border-radius: var(--wn-radius);
  border-left: 3px solid var(--wn-warning);
}

[data-theme="dark"] .wn-ai-privacy {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.wn-ai-privacy svg {
  flex-shrink: 0;
}

/* Form Fields */
.wn-ai-form {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-md);
}

.wn-ai-field {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-xs);
}

.wn-ai-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wn-text);
}

.wn-label-hint {
  font-weight: 400;
  color: var(--wn-text-muted);
}

.wn-ai-input,
.wn-ai-textarea,
.wn-ai-select {
  width: 100%;
  padding: var(--wn-space-sm) var(--wn-space-md);
  font-family: var(--wn-font-sans);
  font-size: 0.9375rem;
  color: var(--wn-text);
  background: var(--wn-bg);
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius);
  transition: border-color var(--wn-transition-fast), box-shadow var(--wn-transition-fast);
}

.wn-ai-input:focus,
.wn-ai-textarea:focus,
.wn-ai-select:focus {
  outline: none;
  border-color: var(--wn-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.wn-ai-textarea {
  resize: vertical;
  min-height: 80px;
}

.wn-ai-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.wn-char-count {
  align-self: flex-end;
  font-size: 0.75rem;
  color: var(--wn-text-muted);
}

/* Generate Button */
.wn-btn--ai {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-xs);
  padding: var(--wn-space-md) var(--wn-space-lg);
  background: linear-gradient(135deg, var(--wn-primary), #8b5cf6);
  color: white;
  border: none;
  border-radius: var(--wn-radius-md);
  font-family: var(--wn-font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--wn-transition-fast), box-shadow var(--wn-transition-fast);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  position: relative;
  overflow: hidden;
}

.wn-btn--ai:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.wn-btn--ai:active:not(:disabled) {
  transform: translateY(0);
}

.wn-btn--ai:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.wn-btn-icon {
  flex-shrink: 0;
}

.wn-btn-text {
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
}

.wn-btn-subtext {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.8;
}

.wn-btn-loader {
  display: none;
  position: absolute;
}

.wn-btn--ai.loading .wn-btn-icon,
.wn-btn--ai.loading .wn-btn-text,
.wn-btn--ai.loading .wn-btn-subtext {
  opacity: 0;
}

.wn-btn--ai.loading .wn-btn-loader {
  display: block;
}

/* Spinner */
.wn-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: wn-spin 0.8s linear infinite;
}

@keyframes wn-spin {
  to { transform: rotate(360deg); }
}

/* AI Result Card */
.wn-ai-result {
  margin-top: var(--wn-space-md);
}

.wn-ai-card {
  padding: var(--wn-space-lg);
  background: var(--wn-surface);
  border: 1px solid var(--wn-border);
  border-radius: var(--wn-radius-lg);
  transition: box-shadow var(--wn-transition);
}

.wn-ai-card--user {
  border-color: var(--wn-primary);
  border-width: 2px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
}

[data-theme="dark"] .wn-ai-card--user {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
}

.wn-ai-card-header {
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
  margin-bottom: var(--wn-space-md);
}

.wn-ai-badge {
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  background: linear-gradient(135deg, var(--wn-primary), #8b5cf6);
  border-radius: var(--wn-radius-full);
}

.wn-ai-difficulty {
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--wn-text-muted);
  background: var(--wn-surface-hover);
  border-radius: var(--wn-radius-sm);
  text-transform: capitalize;
}

.wn-ai-paragraph {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--wn-text);
}

/* Highlighted keyword in AI paragraphs (bold + underline) */
.wn-ai-keyword {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--wn-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

[data-theme="dark"] .wn-ai-keyword {
  text-decoration-color: var(--wn-primary-light, #6366f1);
}

.wn-ai-meta {
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
  margin-top: var(--wn-space-md);
  padding-top: var(--wn-space-md);
  border-top: 1px solid var(--wn-border-subtle);
}

.wn-ai-nickname {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--wn-text-secondary);
}

.wn-ai-nickname::before {
  content: '~';
  margin-right: 2px;
  opacity: 0.5;
}

/* Others Section */
.wn-ai-others {
  margin-top: var(--wn-space-xl);
  padding-top: var(--wn-space-lg);
  border-top: 1px solid var(--wn-border);
}

.wn-ai-others-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--wn-space-md);
}

.wn-ai-others-title {
  display: flex;
  align-items: center;
  gap: var(--wn-space-sm);
  font-size: 1rem;
  font-weight: 600;
  color: var(--wn-text);
  margin: 0;
}

.wn-ai-others-count {
  font-size: 0.8125rem;
  color: var(--wn-text-muted);
}

.wn-ai-others-list {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-md);
}

/* Loading State */
.wn-ai-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-sm);
  padding: var(--wn-space-xl);
  color: var(--wn-text-muted);
  font-size: 0.875rem;
}

/* Empty State */
.wn-ai-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-sm);
  padding: var(--wn-space-xl);
  text-align: center;
  color: var(--wn-text-muted);
}

.wn-ai-empty svg {
  opacity: 0.5;
}

.wn-ai-empty p {
  font-size: 0.875rem;
  max-width: 280px;
}

/* Others Card */
.wn-ai-card--other {
  background: var(--wn-bg);
}

.wn-ai-card--other:hover {
  box-shadow: var(--wn-shadow);
}

/* Premium Carousel */
.wn-ai-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--wn-radius-lg);
}

.wn-ai-carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wn-ai-carousel-track .wn-ai-card {
  flex: 0 0 100%;
  min-width: 100%;
  box-sizing: border-box;
}

/* Carousel Navigation */
.wn-ai-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-lg);
  margin-top: var(--wn-space-md);
  padding: var(--wn-space-sm) 0;
}

.wn-ai-carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wn-surface);
  border: 1px solid var(--wn-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--wn-text);
}

.wn-ai-carousel-btn:hover:not(:disabled) {
  background: var(--wn-primary);
  color: white;
  border-color: var(--wn-primary);
}

.wn-ai-carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.wn-ai-carousel-progress {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--wn-text-muted);
  min-width: 60px;
  text-align: center;
}

/* Love Button */
.wn-ai-love-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: var(--wn-text-muted);
  cursor: pointer;
  transition: color 0.2s;
  border-radius: var(--wn-radius);
}

.wn-ai-love-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.wn-ai-love-btn--active {
  color: #ef4444;
}

.wn-ai-love-btn--active .wn-ai-love-icon {
  fill: #ef4444;
}

.wn-ai-love-icon {
  flex-shrink: 0;
  transition: fill 0.2s;
}

.wn-ai-love-count {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Name display (for both user and others) */
.wn-ai-name {
  font-size: 0.8125rem;
  color: var(--wn-text-muted);
  font-style: italic;
}

/* User result love count */
.wn-ai-user-loves {
  display: flex;
  align-items: center;
  gap: var(--wn-space-xs);
  color: var(--wn-text-muted);
  font-size: 0.8125rem;
}

.wn-ai-user-loves svg {
  color: #ef4444;
}

/* Pagination (legacy - keeping for backward compatibility) */
.wn-ai-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--wn-space-md);
  margin-top: var(--wn-space-lg);
  padding-top: var(--wn-space-md);
}

.wn-ai-page-info {
  font-size: 0.8125rem;
  color: var(--wn-text-muted);
  min-width: 60px;
  text-align: center;
}

.wn-btn--sm {
  display: inline-flex;
  align-items: center;
  gap: var(--wn-space-xs);
  padding: var(--wn-space-sm) var(--wn-space-md);
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--wn-radius);
  transition: all var(--wn-transition-fast);
}

.wn-btn--outline {
  background: transparent;
  color: var(--wn-text-secondary);
  border: 1px solid var(--wn-border);
}

.wn-btn--outline:hover:not(:disabled) {
  background: var(--wn-surface-hover);
  border-color: var(--wn-primary);
  color: var(--wn-primary);
}

.wn-btn--outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 640px) {
  .wn-ai-card {
    padding: var(--wn-space-md);
  }

  .wn-ai-paragraph {
    font-size: 0.9375rem;
  }

  .wn-btn--ai {
    padding: var(--wn-space-md);
  }
}

/* ============================================
   FLOATING PILL SHORTLINK
   ============================================ */

.wn-word-quick-pill {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0 1.25rem;
}

.wn-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, #f472b6 0%, #a855f7 50%, #6366f1 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.wn-pill-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #3b82f6 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wn-pill-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.5);
}

.wn-pill-btn:hover::before {
  opacity: 1;
}

.wn-pill-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.wn-pill-icon {
  position: relative;
  z-index: 1;
  font-size: 1rem;
}

.wn-pill-text {
  position: relative;
  z-index: 1;
}

.wn-pill-badge {
  position: relative;
  z-index: 1;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #fbbf24;
  color: #1f2937;
  border-radius: 12px;
}

.wn-pill-badge--pulse {
  animation: badge-bounce 2s ease-in-out infinite;
}

@keyframes badge-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

[data-theme="dark"] .wn-pill-btn {
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.5);
}

/* ============================================
   WRITE SENTENCES SECTION - Playful & Colorful
   ============================================ */

.wn-section--write-sentences {
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.05) 0%,
    rgba(236, 72, 153, 0.05) 50%,
    rgba(99, 102, 241, 0.05) 100%);
  border: 2px solid transparent;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.wn-section--write-sentences::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f472b6 0%, #a855f7 33%, #6366f1 66%, #f472b6 100%);
  background-size: 300% 100%;
  animation: gradient-slide 4s linear infinite;
}

@keyframes gradient-slide {
  0% { background-position: 100% 0; }
  100% { background-position: -200% 0; }
}

.wn-section--write-sentences .wn-section__header {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  margin: -1px -1px 0 -1px;
  padding: 1rem 1.25rem;
  border-radius: 18px 18px 0 0;
}

.wn-section--write-sentences .wn-section__icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.wn-section--write-sentences .wn-section__title {
  color: white;
}

.wn-section--write-sentences .wn-section__title::before {
  content: "✍️ ";
}

.wn-section--write-sentences .wn-ai-badge-header {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

[data-theme="dark"] .wn-section--write-sentences {
  background: linear-gradient(135deg,
    rgba(168, 85, 247, 0.1) 0%,
    rgba(236, 72, 153, 0.1) 50%,
    rgba(99, 102, 241, 0.1) 100%);
}

/* Write Sentences Textarea - Playful */
.wn-ws-textarea {
  min-height: 60px;
  resize: vertical;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.wn-ws-textarea:focus {
  border-style: solid;
  border-color: #a855f7;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.15),
              0 0 20px rgba(168, 85, 247, 0.1);
}

.wn-ws-textarea.wn-ws-missing-word {
  border-color: #f59e0b;
  border-style: solid;
  background: rgba(245, 158, 11, 0.05);
}

[data-theme="dark"] .wn-ws-textarea {
  border-color: #4b5563;
}

[data-theme="dark"] .wn-ws-textarea:focus {
  border-color: #a855f7;
}

[data-theme="dark"] .wn-ws-textarea.wn-ws-missing-word {
  background: rgba(245, 158, 11, 0.1);
}

/* Required/Optional labels */
.wn-label-required {
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Submit Button - Playful & Fun */
#ws-submit-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  border: none;
  border-radius: 50px;
  padding: 1rem 2rem;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#ws-submit-btn::before {
  content: '🚀';
  position: relative;
  z-index: 1;
  margin-right: 0.5rem;
}

#ws-submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

#ws-submit-btn:active {
  transform: translateY(-1px) scale(0.98);
}

#ws-submit-btn .wn-btn-text,
#ws-submit-btn .wn-btn-hint {
  position: relative;
  z-index: 1;
}

/* Shimmer effect on hover */
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

#ws-submit-btn:hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 1.5s infinite;
}

/* Ripple effect */
#ws-submit-btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.4s, opacity 0.8s;
}

#ws-submit-btn:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

/* User Result Section */
.wn-ws-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--wn-space-md);
}

/* Score Badge */
.wn-ws-score-badge {
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.wn-ws-score--perfect {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
  color: #22c55e;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.wn-ws-score--partial {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(251, 191, 36, 0.15) 100%);
  color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.wn-ws-score--needs-work {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(248, 113, 113, 0.15) 100%);
  color: #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

[data-theme="dark"] .wn-ws-score--perfect {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(16, 185, 129, 0.2) 100%);
}

[data-theme="dark"] .wn-ws-score--partial {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(251, 191, 36, 0.2) 100%);
}

[data-theme="dark"] .wn-ws-score--needs-work {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(248, 113, 113, 0.2) 100%);
}

/* Sentences List */
.wn-ws-sentences-list {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-md);
}

/* Feedback Card - Enhanced */
.wn-ws-feedback {
  padding: var(--wn-space-lg);
  border-radius: 12px;
  border-left: 4px solid;
  background: var(--wn-surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.wn-ws-feedback::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  transform: translate(50%, -50%);
  opacity: 0.05;
}

.wn-ws-feedback:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.wn-ws-feedback--success {
  border-color: #22c55e;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.04) 0%, rgba(255, 255, 255, 0) 100%);
}

.wn-ws-feedback--success::before {
  background: #22c55e;
}

.wn-ws-feedback--warning {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, rgba(255, 255, 255, 0) 100%);
}

.wn-ws-feedback--warning::before {
  background: #f59e0b;
}

[data-theme="dark"] .wn-ws-feedback--success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(0, 0, 0, 0) 100%);
}

[data-theme="dark"] .wn-ws-feedback--warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(0, 0, 0, 0) 100%);
}

.wn-ws-sentence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--wn-space-sm);
}

.wn-ws-sentence-label {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wn-text-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.wn-ws-sentence-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.wn-ws-status-icons {
  display: flex;
  gap: var(--wn-space-md);
}

.wn-ws-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  background: var(--wn-surface);
}

.wn-ws-status--pass {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.wn-ws-status--fail {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Status Icons */
.wn-ws-icon {
  flex-shrink: 0;
}

.wn-ws-icon--check {
  color: #22c55e;
}

.wn-ws-icon--x {
  color: #ef4444;
}

.wn-ws-mini-icon {
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 0.375rem;
}

/* Sentence Text */
.wn-ws-sentence-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--wn-text-primary);
  margin-bottom: var(--wn-space-md);
  padding: var(--wn-space-sm);
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .wn-ws-sentence-text {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
}

/* Analysis */
.wn-ws-analysis {
  font-size: 0.875rem;
  color: var(--wn-text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
  padding-left: var(--wn-space-md);
  border-left: 2px solid var(--wn-border);
}

.wn-ws-suggestion {
  font-size: 0.875rem;
  color: var(--wn-text-secondary);
  line-height: 1.6;
  margin-top: var(--wn-space-md);
  margin-bottom: 0;
  padding: var(--wn-space-sm) var(--wn-space-md);
  background: rgba(139, 92, 246, 0.05);
  border-radius: 8px;
  border: 1px dashed rgba(139, 92, 246, 0.2);
}

.wn-ws-suggestion strong {
  color: #8b5cf6;
  font-weight: 600;
}

/* ============================================
   OTHERS' SENTENCES CAROUSEL CARD - Enhanced
   ============================================ */

.wn-ws-card {
  background: linear-gradient(135deg, var(--wn-surface) 0%, var(--wn-surface) 100%);
  border: 1px solid var(--wn-border);
  border-radius: 16px;
  padding: var(--wn-space-lg);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wn-ws-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8b5cf6 0%, #a855f7 50%, #ec4899 100%);
  opacity: 0.8;
}

.wn-ws-card::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.wn-ws-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

.wn-ws-card .wn-ai-card-header {
  position: relative;
  z-index: 1;
}

.wn-ws-card .wn-ws-sentence-count {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #8b5cf6;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.625rem;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 6px;
}

.wn-ws-card-sentences {
  display: flex;
  flex-direction: column;
  gap: var(--wn-space-sm);
  margin: var(--wn-space-md) 0;
  position: relative;
  z-index: 1;
}

.wn-ws-card-sentence {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--wn-text-primary);
  margin: 0;
  padding: var(--wn-space-sm) var(--wn-space-md);
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  transition: background 0.2s ease;
}

[data-theme="dark"] .wn-ws-card-sentence {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
}

.wn-ws-card-sentence:hover {
  background: rgba(139, 92, 246, 0.05);
}

.wn-ws-card-sentence + .wn-ws-card-sentence {
  border-top: none;
  padding-top: var(--wn-space-sm);
}

.wn-ws-card .wn-ai-meta {
  position: relative;
  z-index: 1;
  padding-top: var(--wn-space-sm);
  border-top: 1px solid var(--wn-border-light);
}

.wn-ws-card .wn-ai-name {
  font-weight: 600;
  color: var(--wn-text-secondary);
  font-size: 0.8125rem;
}

/* Love Button Enhanced */
.wn-ws-card .wn-ai-love-btn {
  position: relative;
  z-index: 1;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  background: var(--wn-surface);
  border: 1px solid var(--wn-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wn-ws-card .wn-ai-love-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  transform: scale(1.05);
}

.wn-ws-card .wn-ai-love-btn:active {
  transform: scale(0.95);
}

.wn-ws-card .wn-ai-love-btn--active {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

.wn-ws-card .wn-ai-love-btn--active .wn-ai-love-icon {
  animation: love-pop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes love-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ============================================
   WORD HIGHLIGHT IN SENTENCES
   ============================================ */

.wn-word-highlight {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-weight: 600;
  color: #7c3aed;
}

[data-theme="dark"] .wn-word-highlight {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
  color: #a78bfa;
}

/* ============================================
   STAR RATING
   ============================================ */

.wn-ws-star-rating {
  font-size: 0.75rem;
  letter-spacing: -0.05em;
  margin-left: 0.5rem;
}

.wn-ws-card-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wn-ws-avatar {
  font-size: 1rem;
}

/* ============================================
   ACCORDION FOR AI FEEDBACK (Others' Sentences)
   ============================================ */

.wn-ws-sentence-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.75rem 0;
}

.wn-ws-sentence-item:last-child {
  border-bottom: none;
}

[data-theme="dark"] .wn-ws-sentence-item {
  border-color: rgba(255, 255, 255, 0.05);
}

.wn-ws-sentence-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.wn-ws-sentence-num {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.wn-ws-sentence-text-wrap {
  flex: 1;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  word-break: break-word;
  line-height: 1.6;
  margin: 0;
  font-size: 0.9375rem;
}

.wn-ws-icons {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.wn-ws-icon-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.wn-ws-icon-badge--success {
  background: #d1fae5;
  color: #059669;
}

.wn-ws-icon-badge--warning {
  background: #fef3c7;
  color: #d97706;
}

[data-theme="dark"] .wn-ws-icon-badge--success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

[data-theme="dark"] .wn-ws-icon-badge--warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.wn-ws-expand-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  color: var(--wn-text-muted);
}

.wn-ws-expand-btn:hover {
  background: #e5e7eb;
}

.wn-ws-expand-btn[aria-expanded="true"] {
  background: #a855f7;
  color: white;
}

.wn-ws-expand-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

[data-theme="dark"] .wn-ws-expand-btn {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .wn-ws-expand-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Accordion Animation */
.wn-ws-feedback-accordion {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
  margin-left: 2.25rem;
  margin-top: 0;
}

.wn-ws-feedback-accordion.wn-ws-accordion-open {
  max-height: 300px;
  opacity: 1;
  margin-top: 0.75rem;
}

.wn-ws-ai-analysis,
.wn-ws-ai-suggestion {
  background: #faf5ff;
  border-left: 3px solid #a855f7;
  padding: 0.75rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.wn-ws-ai-suggestion {
  background: #fffbeb;
  border-color: #f59e0b;
}

[data-theme="dark"] .wn-ws-ai-analysis {
  background: rgba(168, 85, 247, 0.1);
}

[data-theme="dark"] .wn-ws-ai-suggestion {
  background: rgba(245, 158, 11, 0.1);
}

.wn-ws-ai-label {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.375rem;
  color: var(--wn-text-muted);
}

.wn-ws-ai-analysis p,
.wn-ws-ai-suggestion p {
  margin: 0;
  color: var(--wn-text-secondary);
}

/* Responsive Write Sentences */
@media (max-width: 640px) {
  .wn-word-quick-pill {
    margin: 0.5rem 0 1rem;
  }

  .wn-pill-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .wn-ws-sentence-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--wn-space-xs);
  }

  .wn-ws-status-icons {
    gap: var(--wn-space-sm);
  }

  .wn-ws-result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--wn-space-sm);
  }

  .wn-ws-feedback {
    padding: var(--wn-space-md);
  }

  .wn-ws-card {
    padding: var(--wn-space-md);
  }

  /* Accordion responsive */
  .wn-ws-sentence-row {
    flex-wrap: wrap;
  }

  .wn-ws-sentence-text-wrap {
    flex-basis: calc(100% - 40px);
    text-align: left; /* Left-align on mobile for readability */
  }

  .wn-ws-icons {
    margin-left: auto;
    margin-top: 0.5rem;
  }

  .wn-ws-expand-btn {
    margin-top: 0.5rem;
  }

  .wn-ws-feedback-accordion {
    margin-left: 0;
  }

  .wn-ws-feedback-accordion.wn-ws-accordion-open {
    margin-left: 0;
  }
}
