/* 
  GeezKTB Styles
  
  COLOR CUSTOMIZATION:
  Change the CSS variables below to customize colors
*/

:root {
  /* Light Mode Colors - Inspired by Ethiopian/Eritrean colors */
  --primary: #2D6A4F;
  --primary-dark: #1B4332;
  --accent: #D4A574;
  --accent-dark: #B87333;
  --bg-primary: #FDFCFB;
  --bg-secondary: #F5F3F0;
  --bg-card: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #5A5A5A;
  --text-muted: #8A8A8A;
  --border: #E5E5E5;
  --success: #2D6A4F;
  --error: #DC3545;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-lg: rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] {
  --primary: #52B788;
  --primary-dark: #40916C;
  --accent: #D4A574;
  --accent-dark: #E5B894;
  --bg-primary: #1A1A2E;
  --bg-secondary: #16213E;
  --bg-card: #0F3460;
  --text-primary: #F5F5F5;
  --text-secondary: #B0B0B0;
  --text-muted: #707070;
  --border: #2A2A4A;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-lg: rgba(0, 0, 0, 0.4);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--shadow);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #6366f1, #8b5cf6, #a855f7);
  color: white;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4), 0 2px 8px rgba(139, 92, 246, 0.3);
  animation: logoFloat 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.logo-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  animation: logoShine 4s ease-in-out infinite;
}

@keyframes logoShine {
  0%, 100% { transform: translateX(-100%) rotate(45deg); }
  50% { transform: translateX(100%) rotate(45deg); }
}

.logo-u {
  font-size: 2.4rem;
  font-weight: 900;
  font-family: 'Arial Black', sans-serif;
  color: rgba(255, 255, 255, 0.25);
  position: absolute;
  line-height: 1;
  transform: scaleX(0.9);
}

.logo-t {
  font-size: 1.4rem;
  color: #fcd34d;
  position: absolute;
  z-index: 1;
  margin-top: 2px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 20px rgba(252, 211, 77, 0.4);
  animation: logoTGlow 2s ease-in-out infinite;
}

@keyframes logoTGlow {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.08);
    filter: brightness(1.2);
  }
}

.logo-icon::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f472b6, #8b5cf6, #06b6d4);
  z-index: -1;
  opacity: 0.6;
  animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes logoPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

.logo-text {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

.theme-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s;
}

.theme-toggle:hover {
  background: var(--primary);
  color: white;
}

.sun-icon { display: block; }
.moon-icon { display: none; }
[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

/* Main */
.main {
  flex: 1;
  padding: 2rem 1rem;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  background: linear-gradient(135deg, var(--primary), #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  font-weight: 800;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto 1.5rem auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-accent {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
}

.btn-accent:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.3);
}

/* Keyboard Section */
.keyboard-section {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

.language-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.input-area {
  margin-bottom: 1rem;
}

.text-input {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.text-input:focus {
  outline: none;
  border-color: var(--primary);
}

.text-input::placeholder {
  color: var(--text-muted);
}

.output-area {
  margin-bottom: 1.5rem;
}

.output-label {
  display: block;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.geez-output {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  min-height: 80px;
  font-size: 1.5rem;
  line-height: 2;
  word-wrap: break-word;
  color: var(--text-primary);
}

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon {
  font-size: 1.1rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  background: var(--primary);
  color: white;
  border-radius: 6px;
}

/* Share */
.share-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.share-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.share-buttons {
  display: flex;
  gap: 0.5rem;
}

.share-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  color: white;
  transition: transform 0.2s;
}

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

.share-btn.facebook { background: #1877F2; }
.share-btn.twitter { background: #000000; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.telegram { background: #0088cc; }

/* Help Section */
.help-section {
  margin-bottom: 2rem;
}

.help-section h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.help-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.help-card h3 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.help-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.help-card code {
  display: block;
  background: var(--bg-secondary);
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 1.1rem;
  color: var(--accent-dark);
}

/* Daily Word */
.daily-word {
  margin-bottom: 2rem;
}

.daily-word h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.word-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  max-width: 400px;
}

.word-geez {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.word-latin {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.word-meaning {
  font-size: 1rem;
  opacity: 0.8;
}

/* Embed Section */
.embed-section {
  margin-bottom: 2rem;
}

.embed-section h2 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.embed-section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.embed-code {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.embed-code code {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-secondary);
  word-break: break-all;
}

/* Ad Containers */
.ad-container {
  margin: 1rem auto;
  max-width: 728px;
}

.ad-placeholder {
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.sidebar-ad {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar-ad {
    display: block;
    position: fixed;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
  }
}

/* Footer */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2rem 1rem;
  margin-top: auto;
}

.footer-content {
  text-align: center;
}

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

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

.copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .header-content {
    padding: 0.75rem 1rem;
  }
  
  .nav a {
    display: none;
  }
  
  .keyboard-section {
    padding: 1rem;
  }
  
  .tab-btn {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
  }
  
  .text-input {
    font-size: 1rem;
  }
  
  .geez-output {
    font-size: 1.25rem;
  }
  
  .btn {
    padding: 0.75rem 1rem;
    flex: 1;
    justify-content: center;
  }
  
  .word-geez {
    font-size: 2.5rem;
  }
}

/* =====================================================
   VOICE AGENT STYLES
   ===================================================== */

/* Floating Voice Widget */
.voice-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.voice-widget.expanded {
  bottom: 20px;
}

/* Voice Panel */
.voice-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 32px var(--shadow-lg);
  width: 280px;
  display: none;
  animation: slideUp 0.3s ease;
}

.voice-widget.expanded .voice-panel {
  display: block;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.voice-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.voice-panel-title {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.voice-panel-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.voice-panel-close:hover {
  color: var(--text-primary);
}

/* Voice Controls */
.voice-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.voice-btn {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.voice-btn:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.voice-btn.active {
  background: var(--error);
  border-color: var(--error);
  color: white;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
}

.voice-btn.emoji-btn {
  flex: 0;
  width: 48px;
}

/* Voice Transcript */
.voice-transcript {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 0.75rem;
  min-height: 60px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.voice-transcript .geez-text {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-top: 0.5rem;
}

/* Emoji Suggestions */
.emoji-suggestions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.emoji-suggestion {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.emoji-suggestion:hover {
  transform: scale(1.2);
}

/* Privacy Note */
.voice-privacy {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* Main Voice Button (FAB) */
.voice-fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--shadow-lg);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px var(--shadow-lg);
}

.voice-fab.listening {
  background: linear-gradient(135deg, var(--error), #c0392b);
  animation: pulse 1.5s infinite;
}

/* Not Supported Message */
.voice-not-supported {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
}

/* =====================================================
   EMOJI PICKER STYLES
   ===================================================== */

.emoji-picker {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px var(--shadow-lg);
  width: 300px;
  max-height: 350px;
  overflow: hidden;
  z-index: 1001;
  animation: slideUp 0.2s ease;
}

.emoji-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.emoji-title {
  font-weight: 600;
  color: var(--text-primary);
}

.emoji-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.emoji-categories {
  display: flex;
  padding: 0.5rem;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.emoji-category-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.emoji-category-btn:hover,
.emoji-category-btn.active {
  background: var(--bg-secondary);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  padding: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.emoji-item {
  background: none;
  border: none;
  font-size: 1.5rem;
  padding: 0.5rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.emoji-item:hover {
  background: var(--bg-secondary);
  transform: scale(1.2);
}

.emoji-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  grid-column: 1 / -1;
}

/* =====================================================
   AVATAR STYLES
   ===================================================== */

.avatar-container {
  width: 80px;
  margin: 0 auto 1rem;
}

.avatar-wrapper {
  position: relative;
}

.avatar-svg {
  width: 80px;
  height: 80px;
}

/* Avatar Base */
.avatar-glow {
  fill: var(--primary);
  opacity: 0.1;
  transition: opacity 0.3s;
}

.avatar-face {
  fill: var(--accent);
  transition: fill 0.3s;
}

.avatar-eye {
  fill: white;
}

.avatar-pupil {
  fill: var(--text-primary);
  transition: transform 0.2s;
}

.avatar-eyebrow {
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 2;
  stroke-linecap: round;
}

.avatar-mouth {
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 3;
  stroke-linecap: round;
  transition: d 0.3s;
}

.avatar-blush {
  fill: #FFB6C1;
  opacity: 0.5;
}

/* Sound waves - hidden by default */
.avatar-waves {
  opacity: 0;
  transition: opacity 0.3s;
}

.wave {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
}

/* Thinking dots - hidden by default */
.avatar-thinking {
  opacity: 0;
  transition: opacity 0.3s;
}

.thinking-dot {
  fill: var(--primary);
}

/* Avatar Status */
.avatar-status {
  text-align: center;
  margin-top: 0.5rem;
}

.status-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* State: Idle */
.state-idle .avatar-face {
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* State: Listening */
.state-listening .avatar-glow {
  opacity: 0.3;
  animation: glowPulse 1s ease-in-out infinite;
}

.state-listening .avatar-waves {
  opacity: 1;
}

.state-listening .wave-1 {
  animation: waveMove 0.8s ease-in-out infinite;
}

.state-listening .wave-2 {
  animation: waveMove 0.8s ease-in-out infinite 0.2s;
}

.state-listening .wave-3 {
  animation: waveMove 0.8s ease-in-out infinite;
}

.state-listening .wave-4 {
  animation: waveMove 0.8s ease-in-out infinite 0.2s;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.2; r: 45; }
  50% { opacity: 0.4; r: 47; }
}

@keyframes waveMove {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* State: Processing */
.state-processing .avatar-thinking {
  opacity: 1;
}

.state-processing .dot-1 {
  animation: bounce 0.6s ease-in-out infinite;
}

.state-processing .dot-2 {
  animation: bounce 0.6s ease-in-out infinite 0.2s;
}

.state-processing .dot-3 {
  animation: bounce 0.6s ease-in-out infinite 0.4s;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* State: Speaking */
.state-speaking .avatar-mouth {
  animation: speak 0.3s ease-in-out infinite;
}

@keyframes speak {
  0%, 100% { d: path("M 35 62 Q 50 72 65 62"); }
  50% { d: path("M 35 62 Q 50 68 65 62"); }
}

/* State: Error */
.state-error {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Reactions */
.react-happy .avatar-face {
  fill: #FFD93D;
}

.react-excited .avatar-wrapper {
  animation: jump 0.5s ease;
}

@keyframes jump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Speech Bubble */
.avatar-bubble {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px var(--shadow);
  animation: fadeIn 0.3s ease;
}

.avatar-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-card);
}

.avatar-bubble.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Mobile Voice Widget */
@media (max-width: 640px) {
  .voice-widget {
    bottom: 10px;
    right: 10px;
  }
  
  .voice-panel {
    width: calc(100vw - 40px);
    max-width: 300px;
  }
  
  .voice-fab {
    width: 54px;
    height: 54px;
    font-size: 1.3rem;
  }
  
  .emoji-picker {
    width: calc(100vw - 40px);
    max-width: 280px;
  }
  
  .emoji-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Virtual Geez Keyboard */
.virtual-keyboard {
  margin-top: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--border);
}

.keyboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.geez-keys {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

@media (max-width: 768px) {
  .geez-keys {
    grid-template-columns: repeat(7, 1fr);
  }
}

@media (max-width: 480px) {
  .geez-keys {
    grid-template-columns: repeat(5, 1fr);
  }
}

.geez-key {
  aspect-ratio: 1;
  font-size: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-primary);
  font-family: 'Noto Sans Ethiopic', 'Nyala', serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
}

.geez-key:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
  z-index: 1;
}

.geez-key:active {
  transform: scale(0.95);
}

.geez-key.special {
  font-size: 0.9rem;
  grid-column: span 2;
  aspect-ratio: auto;
  padding: 0.75rem;
}

.virtual-keyboard.hidden .geez-keys {
  display: none;
}

/* Pricing Navigation Link */
.nav-pricing {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white !important;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

.nav-pricing:hover {
  opacity: 0.9;
}

/* Vowel Popup */
.vowel-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 32px var(--shadow-lg);
  z-index: 200;
  min-width: 280px;
}

.vowel-popup.hidden {
  display: none;
}

.vowel-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.vowel-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  line-height: 1;
}

.vowel-close:hover {
  color: var(--error);
}

.vowel-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.vowel-btn {
  width: 50px;
  height: 50px;
  font-size: 1.8rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-primary);
  font-family: 'Noto Sans Ethiopic', 'Nyala', serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vowel-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.15);
}

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

.vowel-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2px;
}

.virtual-keyboard {
  position: relative;
}

/* =====================================================
   AI Dictionary Widget Styles
   ===================================================== */

.dictionary-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dictionary-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 40px);
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 8px 32px var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: none;
  flex-direction: column;
  max-height: 500px;
}

.dictionary-widget.open .dictionary-panel {
  display: flex;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.dictionary-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
}

.dictionary-panel-title {
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dictionary-panel-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: background 0.2s;
}

.dictionary-panel-close:hover {
  background: rgba(255,255,255,0.3);
}

.dictionary-lang-selector {
  display: flex;
  gap: 4px;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.dict-lang-btn {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.dict-lang-btn:hover {
  background: var(--bg-card);
}

.dict-lang-btn.active {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.dictionary-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dict-message {
  display: flex;
  gap: 0.5rem;
}

.dict-message.user {
  justify-content: flex-end;
}

.dict-message-content {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.dict-message.bot .dict-message-content {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.dict-message.user .dict-message-content {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border-bottom-right-radius: 4px;
}

.dict-message.bot .dict-message-content strong {
  color: var(--primary);
}

.dictionary-input-area {
  display: flex;
  gap: 8px;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.dictionary-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.dictionary-input:focus {
  border-color: var(--primary);
}

.dictionary-input::placeholder {
  color: var(--text-muted);
}

.dictionary-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.2s;
}

.dictionary-send-btn:hover {
  transform: scale(1.05);
}

.dictionary-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dictionary-footer {
  padding: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.dictionary-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dictionary-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.dict-typing {
  display: flex;
  gap: 4px;
  padding: 0.5rem 1rem;
}

.dict-typing span {
  width: 8px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typingDot 1.4s infinite ease-in-out;
}

.dict-typing span:nth-child(2) { animation-delay: 0.2s; }
.dict-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
  .dictionary-panel {
    width: calc(100vw - 40px);
    bottom: 65px;
  }
  
  .dictionary-fab {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
}

/* =====================================================
   AI Thinking Animation (Siri-like)
   ===================================================== */

.dict-thinking {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  gap: 0.5rem;
}

.thinking-orb {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thinking-orb::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  animation: orbPulse 2s ease-in-out infinite;
  opacity: 0.3;
}

.thinking-orb::after {
  content: '';
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #d946ef 100%);
  animation: orbPulse 2s ease-in-out infinite 0.3s;
  opacity: 0.5;
}

.thinking-core {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #d946ef);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.6), 0 0 40px rgba(168, 85, 247, 0.3);
  animation: coreGlow 1.5s ease-in-out infinite;
  z-index: 1;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.2); opacity: 0.6; }
}

@keyframes coreGlow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.6), 0 0 40px rgba(168, 85, 247, 0.3);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.8), 0 0 60px rgba(168, 85, 247, 0.5);
    transform: scale(1.1);
  }
}

/* Wave bars animation */
.thinking-waves {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 40px;
}

.thinking-wave {
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, #6366f1, #a855f7);
  border-radius: 4px;
  animation: waveBar 1s ease-in-out infinite;
}

.thinking-wave:nth-child(1) { animation-delay: 0s; }
.thinking-wave:nth-child(2) { animation-delay: 0.1s; }
.thinking-wave:nth-child(3) { animation-delay: 0.2s; }
.thinking-wave:nth-child(4) { animation-delay: 0.3s; }
.thinking-wave:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveBar {
  0%, 100% { height: 10px; opacity: 0.5; }
  50% { height: 35px; opacity: 1; }
}

/* Thinking text */
.thinking-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Combined thinking container */
.dict-thinking-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  margin: 0.5rem 0;
}

/* Shimmer effect for message placeholder */
.dict-shimmer {
  background: linear-gradient(90deg, 
    var(--bg-secondary) 0%, 
    rgba(139, 92, 246, 0.1) 50%, 
    var(--bg-secondary) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
  height: 16px;
  margin: 4px 0;
}

.dict-shimmer:nth-child(1) { width: 80%; }
.dict-shimmer:nth-child(2) { width: 60%; }
.dict-shimmer:nth-child(3) { width: 70%; }

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

/* =====================================================
   Speak Now Button States
   ===================================================== */

.btn-accent.listening {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  animation: pulseBtn 1.5s ease-in-out infinite;
}

.pulse-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulseDot 1s ease-in-out infinite;
}

@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50% { box-shadow: 0 0 0 15px rgba(34, 197, 94, 0); }
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

/* =====================================================
   Donation Button
   ===================================================== */

.donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.donate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Floating Donate Button - Professional Style */
.floating-donate-btn {
  position: fixed;
  right: 24px;
  bottom: 100px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 999;
  box-shadow: 
    0 4px 15px rgba(239, 68, 68, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: floatBtnAppear 0.5s ease-out, floatBtnPulse 3s ease-in-out infinite 1s;
}

.floating-donate-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 8px 25px rgba(239, 68, 68, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.2);
}

.floating-donate-btn:active {
  transform: translateY(-2px) scale(1.02);
}

.floating-donate-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heartBeat 1.5s ease-in-out infinite;
}

.floating-donate-icon svg {
  fill: white;
  stroke: white;
}

.floating-donate-text {
  font-weight: 700;
  letter-spacing: 0.3px;
}

.floating-donate-badge {
  position: absolute;
  top: -8px;
  right: -4px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
  animation: badgeBounce 2s ease-in-out infinite;
}

@keyframes floatBtnAppear {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes floatBtnPulse {
  0%, 100% {
    box-shadow: 
      0 4px 15px rgba(239, 68, 68, 0.4),
      0 2px 6px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 
      0 4px 25px rgba(239, 68, 68, 0.6),
      0 2px 8px rgba(0, 0, 0, 0.2);
  }
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.1); }
  50% { transform: scale(1); }
  75% { transform: scale(1.1); }
}

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

/* Mobile adjustments for floating button */
@media (max-width: 768px) {
  .floating-donate-btn {
    right: 16px;
    bottom: 80px;
    padding: 12px 16px;
    font-size: 0.85rem;
  }
  
  .floating-donate-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }
}

.donate-section {
  text-align: center;
  padding: 2rem;
  margin: 2rem 0;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.donate-section h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.donate-section p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* =====================================================
   Mediavine/Raptive Premium Ad Placeholders
   ===================================================== */

.ad-mediavine {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
  border: 2px dashed rgba(255,255,255,0.3);
  color: white;
  text-align: center;
  padding: 2rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.ad-mediavine .ad-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.ad-mediavine .ad-size {
  font-size: 1.5rem;
  font-weight: 600;
}

.ad-sidebar-sticky {
  position: sticky;
  top: 100px;
}

/* Welcome Modal */
.welcome-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.welcome-content {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  animation: slideUp 0.4s ease;
}

.welcome-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.welcome-content h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* 3D Hand Icon */
.welcome-icon-3d {
  margin-bottom: 1rem;
  perspective: 500px;
}

.hand-3d {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 auto;
  background: linear-gradient(145deg, #FFE0B2 0%, #FFCC80 50%, #FFB74D 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: perspective(500px) rotateX(10deg) rotateY(-5deg);
  box-shadow: 
    0 12px 25px rgba(255, 152, 0, 0.4),
    0 6px 12px rgba(0, 0, 0, 0.15),
    inset 0 3px 0 rgba(255, 255, 255, 0.4),
    inset 0 -3px 0 rgba(0, 0, 0, 0.1);
  animation: handWave 2s ease-in-out infinite;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.hand-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 100%);
  border-radius: 50% 50% 60% 60%;
  pointer-events: none;
}

.hand-palm {
  font-size: 28px;
  z-index: 1;
}

.hand-palm::before {
  content: '✋';
  display: block;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.2));
}

.hand-wave-effect {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 183, 77, 0.5);
  animation: waveRipple 2s ease-out infinite;
}

@keyframes handWave {
  0%, 100% {
    transform: perspective(500px) rotateX(10deg) rotateY(-5deg) rotate(0deg);
  }
  25% {
    transform: perspective(500px) rotateX(10deg) rotateY(-5deg) rotate(15deg);
  }
  75% {
    transform: perspective(500px) rotateX(10deg) rotateY(-5deg) rotate(-15deg);
  }
}

@keyframes waveRipple {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* 3D Welcome Title - Modern Pill Style */
.welcome-title-3d-container {
  perspective: 1000px;
  margin-bottom: 1rem;
}

.welcome-pill-3d {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  background: linear-gradient(135deg, #2D6A4F 0%, #40916C 50%, #52B788 100%);
  border-radius: 50px;
  position: relative;
  transform: perspective(1000px) rotateX(8deg) rotateY(-3deg);
  transform-style: preserve-3d;
  box-shadow: 
    0 15px 30px rgba(45, 106, 79, 0.4),
    0 8px 15px rgba(0, 0, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  animation: pillFloat 4s ease-in-out infinite;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.welcome-pill-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
  border-radius: 60px 60px 100px 100px;
  pointer-events: none;
}

.welcome-pill-3d::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 10%;
  right: 10%;
  height: 15px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.3) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(4px);
  transform: translateZ(-20px);
}

.welcome-pill-3d .geez-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 255, 255, 0.2);
  letter-spacing: 1px;
}

.welcome-pill-3d .to-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

.welcome-pill-3d .brand-text {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #FFD700, #FFA500, #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.welcome-pill-3d .sparkle {
  font-size: 1.1rem;
  color: #FFD700;
  animation: sparkleRotate 2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

@keyframes pillFloat {
  0%, 100% {
    transform: perspective(1000px) rotateX(8deg) rotateY(-3deg) translateY(0);
  }
  50% {
    transform: perspective(1000px) rotateX(6deg) rotateY(-5deg) translateY(-8px);
  }
}

@keyframes sparkleRotate {
  0%, 100% {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
  50% {
    transform: rotate(180deg) scale(1.2);
    opacity: 0.8;
  }
}

/* Dark mode adjustments for 3D pill */
[data-theme="dark"] .welcome-pill-3d {
  background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 50%, #40916C 100%);
  box-shadow: 
    0 20px 40px rgba(27, 67, 50, 0.5),
    0 10px 20px rgba(0, 0, 0, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.welcome-content p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.welcome-features {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.welcome-feature {
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.welcome-close-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.welcome-close-btn:hover {
  transform: scale(1.05);
}

/* =====================================================
   Modern Mic Icon for Speak Button
   ===================================================== */

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.mic-icon {
  transition: transform 0.2s, stroke 0.2s;
}

.btn-accent:hover .mic-icon {
  transform: scale(1.1);
}

.btn-accent.listening .mic-icon {
  animation: micPulse 1s ease-in-out infinite;
  stroke: #22c55e;
}

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

.btn-accent.listening .speak-text {
  animation: textBlink 1s ease-in-out infinite;
}

@keyframes textBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* =====================================================
   AI TOOLS TOOLBAR
   ===================================================== */

.ai-tools-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.ai-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-tool-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.ai-tool-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.ai-tool-icon {
  font-size: 1rem;
}

/* =====================================================
   TTS BUTTON
   ===================================================== */

.tts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1.2rem;
}

.tts-btn:hover {
  background: var(--accent-dark);
  transform: scale(1.1);
}

.tts-btn.playing {
  animation: ttsPlaying 1s ease-in-out infinite;
}

@keyframes ttsPlaying {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* =====================================================
   AI WRITING ASSISTANT PANEL
   ===================================================== */

.ai-panel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 4px 12px var(--shadow);
}

.ai-panel.active {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.ai-panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-panel-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.ai-panel-content {
  min-height: 100px;
}

/* Grammar Check Results */
.grammar-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.grammar-score {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.score-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
}

.score-circle.excellent { background: #22c55e; }
.score-circle.good { background: #84cc16; }
.score-circle.fair { background: #eab308; }
.score-circle.poor { background: #ef4444; }

.corrected-text {
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  font-size: 1.1rem;
  line-height: 1.8;
}

.grammar-issue {
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  border-left: 3px solid #ef4444;
}

.grammar-issue .issue-type {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #ef4444;
  font-weight: 600;
}

/* Tone Selector */
.tone-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tone-btn {
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.tone-btn:hover, .tone-btn.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.tone-btn-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.25rem;
}

.tone-btn-label {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Suggestions/Completions */
.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.suggestion-item {
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.suggestion-item:hover {
  border-color: var(--primary);
  transform: translateX(5px);
}

.suggestion-text {
  font-size: 1rem;
  color: var(--text-primary);
}

.suggestion-transliteration {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.25rem;
}

/* =====================================================
   TRANSLATION HUB
   ===================================================== */

.translation-hub {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.translation-hub-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.translation-hub-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.translation-hub-icon {
  font-size: 1.5rem;
}

.translation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .translation-grid {
    grid-template-columns: 1fr;
  }
}

.translation-input-area, .translation-output-area {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.translation-textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  resize: vertical;
}

.translation-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.lang-select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
}

.translation-result {
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  min-height: 120px;
  border: 1px solid var(--border);
}

.translation-result-text {
  font-size: 1.1rem;
  line-height: 1.8;
}

.translation-result-transliteration {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}

.translate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.translate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-lg);
}

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

.multi-lang-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.multi-lang-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  background: var(--primary);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
}

.multi-lang-tag button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

/* =====================================================
   LEARN MODE
   ===================================================== */

.learn-section {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
}

.learn-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.learn-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.learn-stats {
  display: flex;
  gap: 1.5rem;
}

.learn-stat {
  text-align: center;
}

.learn-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.learn-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.learn-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.learn-tab {
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 8px 8px 0 0;
}

.learn-tab:hover, .learn-tab.active {
  color: var(--primary);
  background: var(--bg-card);
}

.learn-tab.active {
  font-weight: 600;
  border-bottom: 2px solid var(--primary);
  margin-bottom: -2px;
}

.learn-content {
  min-height: 200px;
}

/* Challenge Card */
.challenge-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px var(--shadow);
}

.challenge-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.challenge-question {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.challenge-hint {
  padding: 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.challenge-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.challenge-input:focus {
  outline: none;
  border-color: var(--primary);
}

.challenge-submit {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.challenge-points {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Quiz Styles */
.quiz-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quiz-question-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.quiz-question-num {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.quiz-question-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-option {
  padding: 1rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.quiz-option:hover {
  border-color: var(--primary);
}

.quiz-option.selected {
  border-color: var(--primary);
  background: rgba(45, 106, 79, 0.1);
}

.quiz-option.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.quiz-option.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Flashcards */
.flashcard {
  perspective: 1000px;
  height: 250px;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px var(--shadow);
}

.flashcard-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.flashcard-text {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
}

.flashcard-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.flashcard-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.flashcard-nav {
  padding: 0.75rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.flashcard-nav:hover {
  background: var(--primary);
  color: white;
}

/* Vocabulary Grid */
.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.vocab-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.vocab-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow);
}

.vocab-word {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.vocab-transliteration {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.vocab-meaning {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.vocab-example {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.5rem;
  background: var(--bg-secondary);
  border-radius: 6px;
}

.vocab-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.vocab-tag {
  padding: 0.15rem 0.5rem;
  background: var(--accent);
  color: white;
  border-radius: 12px;
  font-size: 0.7rem;
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

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

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

/* Category Pills */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.category-pill {
  padding: 0.4rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.category-pill:hover, .category-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============================================
   DONATION MODAL STYLES
   ============================================ */

.donation-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

.donation-modal.open {
  opacity: 1;
  visibility: visible;
}

.donation-content {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  animation: modalSlideUp 0.4s ease;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.donation-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-secondary);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.donation-close:hover {
  background: var(--error);
  color: white;
}

.donation-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.donation-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f472b6, #ec4899);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  animation: heartPulse 1.5s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.heart-icon {
  font-size: 2.5rem;
  color: white;
}

.donation-header h2 {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.donation-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.donation-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.donation-stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.donation-amounts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.amount-btn {
  padding: 0.75rem 0.5rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
}

.amount-btn:hover {
  border-color: var(--primary);
  background: rgba(45, 106, 79, 0.1);
}

.amount-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.custom-amount {
  margin-bottom: 1.5rem;
}

.custom-amount label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.custom-amount-input-wrapper {
  position: relative;
}

.currency-symbol {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.custom-amount input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.custom-amount input:focus {
  outline: none;
  border-color: var(--primary);
}

.donation-impact {
  margin-bottom: 1.5rem;
}

.impact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.impact-icon {
  font-size: 1.25rem;
}

.donate-stripe-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #635bff, #0a2540);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s;
}

.donate-stripe-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 91, 255, 0.4);
}

.donate-stripe-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.donation-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.donation-alternatives {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.donation-alternatives p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.alt-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.alt-btn {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.2s;
}

.subscribe-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border: none;
}

.share-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.alt-btn:hover {
  transform: translateY(-2px);
}

/* Thank You Modal */
.thank-you-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.thank-you-modal.open {
  opacity: 1;
  visibility: visible;
}

.thank-you-content {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 400px;
  animation: thankYouPop 0.5s ease;
}

@keyframes thankYouPop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.thank-you-animation {
  position: relative;
  height: 100px;
  margin-bottom: 1rem;
}

.heart-burst {
  font-size: 4rem;
  animation: heartBurst 0.6s ease;
}

@keyframes heartBurst {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.thank-you-content h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.thank-you-geez {
  font-size: 1.5rem;
  color: var(--accent);
  margin: 1rem 0;
}

/* Payment Methods Badge */
.payment-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.payment-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stripe-logo {
  color: var(--text-secondary);
}

.secure-badge {
  font-size: 0.75rem;
  color: var(--success);
}

/* Chatbot Donation Prompt */
.dict-donation-prompt {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.1), rgba(236, 72, 153, 0.1));
  border: 1px solid rgba(244, 114, 182, 0.3);
  border-radius: 12px;
  padding: 1rem;
  margin: 0.5rem 0;
}

.dict-donation-prompt h4 {
  color: #ec4899;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dict-donation-prompt p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.dict-donate-btn {
  background: linear-gradient(135deg, #f472b6, #ec4899);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.dict-donate-btn:hover {
  transform: scale(1.05);
}

/* Word Prediction/Autocomplete */
.autocomplete-container {
  position: relative;
}

.autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.autocomplete-suggestions.show {
  display: block;
}

.suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: var(--bg-secondary);
}

.suggestion-geez {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
}

.suggestion-latin {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Typing History */
.history-section {
  margin-top: 2rem;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.history-header h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.clear-history-btn {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.history-item:hover {
  background: var(--primary);
  color: white;
}

.history-geez {
  font-weight: 600;
}

.history-time {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Install PWA Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.pwa-install-banner.show {
  transform: translateY(0);
}

.pwa-install-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pwa-icon {
  font-size: 2rem;
}

.pwa-text h4 {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.pwa-text p {
  font-size: 0.85rem;
  opacity: 0.9;
}

.pwa-install-btn {
  background: white;
  color: var(--primary);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.pwa-dismiss {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.7;
}

@media (max-width: 600px) {
  .donation-amounts {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .donation-content {
    padding: 1.5rem;
  }
  
  .donation-stats {
    gap: 1rem;
  }
  
  .stat-number {
    font-size: 1.25rem;
  }
}

/* ============================================
   LANGUAGE LANDING PAGE STYLES
   ============================================ */

.lang-hero {
  padding: 3rem 0;
  text-align: center;
}

.lang-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lang-features {
  padding: 3rem 0;
}

.lang-features h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.75rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px var(--shadow-lg);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.lang-examples {
  padding: 3rem 0;
  background: var(--bg-secondary);
  border-radius: 24px;
  margin: 2rem 0;
}

.lang-examples h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.75rem;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 0 1.5rem;
}

.example-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
}

.example-geez {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.example-latin {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.25rem;
}

.example-meaning {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.lang-info {
  padding: 2rem 0;
}

.lang-info h2 {
  margin-bottom: 1rem;
}

.info-content {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1.5rem;
}

.info-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.lang-cta {
  padding: 3rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 24px;
  color: white;
  margin: 2rem 0;
}

.lang-cta h2 {
  color: white;
  margin-bottom: 0.5rem;
}

.lang-cta p {
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.lang-cta .btn-primary {
  background: white;
  color: var(--primary);
}

.lang-cta .btn-primary:hover {
  background: rgba(255,255,255,0.9);
}

.lang-faq {
  padding: 3rem 0;
}

.lang-faq h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.75rem;
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
}

.faq-item[open] summary::after {
  content: '-';
}

.faq-item p {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Blog Section Styles */
.blog-section {
  padding: 3rem 0;
}

.blog-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.75rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px var(--shadow-lg);
}

.blog-image {
  height: 160px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
}

.blog-content {
  padding: 1.5rem;
}

.blog-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.blog-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.blog-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.blog-meta {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Blog Article Page */
.blog-hero {
  padding: 3rem 0;
  text-align: center;
}

.blog-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-cta {
  padding: 3rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 24px;
  color: white;
  margin: 2rem 0;
}

.blog-cta h2 {
  color: white;
  margin-bottom: 0.5rem;
}

.blog-cta p {
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.blog-cta .btn-primary {
  background: white;
  color: var(--primary);
}

.blog-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.article-header {
  margin-bottom: 2rem;
}

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.back-link::before {
  content: '\2190';
}

.back-link:hover {
  color: var(--primary);
}

.article-header h1 {
  font-size: 2.25rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.article-content {
  line-height: 1.8;
}

.article-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.article-content .intro {
  font-size: 1.15rem;
  color: var(--text-primary);
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin-bottom: 2rem;
}

.example-box {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.example-box h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.example-box p {
  margin-bottom: 0.5rem;
}

.example-box code {
  background: var(--bg-card);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  color: var(--primary);
}

.geez-table {
  width: 100%;
  border-collapse: collapse;
}

.geez-table th, .geez-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.geez-table th {
  font-weight: 600;
  color: var(--text-primary);
}

.article-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.article-content li {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.cta-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  color: white;
  margin: 2rem 0;
}

.cta-box h3 {
  color: white;
  margin-bottom: 0.5rem;
}

.cta-box p {
  color: rgba(255,255,255,0.9);
  margin-bottom: 1rem;
}

.cta-box .btn-primary {
  background: white;
  color: var(--primary);
}

/* Blog Article Extended Styles */
.article-section {
  margin: 2.5rem 0;
}

.article-section h2 {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.article-section h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem;
}

.article-section p {
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.article-section ul, .article-section ol {
  margin: 1rem 0 1.5rem 1.5rem;
  line-height: 1.8;
}

.article-section li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.vocab-item {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.vocab-item .tigre {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 600;
}

.vocab-item .transliteration {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.vocab-item .english {
  color: var(--text-primary);
  font-weight: 500;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: var(--bg-secondary);
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.blog-sidebar {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.sidebar-widget {
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
}

.sidebar-widget li {
  margin-bottom: 0.5rem;
}

.sidebar-widget a {
  color: var(--text-secondary);
  text-decoration: none;
}

.sidebar-widget a:hover {
  color: var(--primary);
}

.cta-box {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--border);
}

.example-box ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.example-box li {
  padding: 0.25rem 0;
  color: var(--text-secondary);
}

/* ===============================================
   3D ANIMATED ICONS - Revolutionary Design
   =============================================== */

/* Icon Container Base */
.icon-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* 3D Microphone Icon */
.icon-3d-mic {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border-radius: 16px;
  box-shadow: 
    0 10px 30px rgba(102, 126, 234, 0.4),
    0 4px 12px rgba(118, 75, 162, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: mic3dFloat 3s ease-in-out infinite, mic3dPulse 2s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.icon-3d-mic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 50%);
  border-radius: 16px;
}

.icon-3d-mic::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  animation: iconShine 4s ease-in-out infinite;
}

.icon-3d-mic svg {
  width: 28px;
  height: 28px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  z-index: 1;
  animation: micBounce 1.5s ease-in-out infinite;
}

@keyframes mic3dFloat {
  0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); }
  25% { transform: translateY(-6px) rotateX(5deg) rotateY(-5deg); }
  50% { transform: translateY(-10px) rotateX(0deg) rotateY(0deg); }
  75% { transform: translateY(-6px) rotateX(-5deg) rotateY(5deg); }
}

@keyframes mic3dPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4), 0 4px 12px rgba(118, 75, 162, 0.3); }
  50% { box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6), 0 8px 20px rgba(118, 75, 162, 0.5), 0 0 30px rgba(240, 147, 251, 0.4); }
}

@keyframes micBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* 3D Writing/Pen Icon */
.icon-3d-pen {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ff6b6b 100%);
  border-radius: 16px;
  box-shadow: 
    0 10px 30px rgba(240, 147, 251, 0.4),
    0 4px 12px rgba(245, 87, 108, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: pen3dWrite 4s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.icon-3d-pen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 50%);
  border-radius: 16px;
}

.icon-3d-pen::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  animation: iconShine 4s ease-in-out infinite 1s;
}

.icon-3d-pen svg {
  width: 28px;
  height: 28px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  z-index: 1;
  animation: penWrite 2s ease-in-out infinite;
}

@keyframes pen3dWrite {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-5px) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
  75% { transform: translateY(-5px) rotate(-2deg); }
}

@keyframes penWrite {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  25% { transform: rotate(-5deg) translateX(2px); }
  50% { transform: rotate(5deg) translateX(-2px); }
  75% { transform: rotate(-3deg) translateX(1px); }
}

/* 3D Graduation Hat Icon */
.icon-3d-grad {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #43e97b 100%);
  border-radius: 16px;
  box-shadow: 
    0 10px 30px rgba(79, 172, 254, 0.4),
    0 4px 12px rgba(0, 242, 254, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: grad3dBounce 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.icon-3d-grad::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 50%);
  border-radius: 16px;
}

.icon-3d-grad::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  animation: iconShine 4s ease-in-out infinite 0.5s;
}

.icon-3d-grad svg {
  width: 28px;
  height: 28px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  z-index: 1;
  animation: gradToss 3s ease-in-out infinite;
}

@keyframes grad3dBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.05); }
}

@keyframes gradToss {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-8deg) translateY(-3px); }
  50% { transform: rotate(0deg) translateY(-5px); }
  75% { transform: rotate(8deg) translateY(-3px); }
}

/* 3D Globe/Translation Icon */
.icon-3d-globe {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #ffecd2 100%);
  border-radius: 50%;
  box-shadow: 
    0 10px 30px rgba(168, 237, 234, 0.4),
    0 4px 12px rgba(254, 214, 227, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset -3px -3px 8px rgba(0, 0, 0, 0.05);
  animation: globe3dSpin 8s linear infinite;
  position: relative;
  overflow: hidden;
}

.icon-3d-globe::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 10%;
  width: 30%;
  height: 30%;
  background: radial-gradient(circle, rgba(255,255,255,0.8), transparent);
  border-radius: 50%;
}

.icon-3d-globe svg {
  width: 30px;
  height: 30px;
  color: #2D6A4F;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
  z-index: 1;
  animation: globeRotate 8s linear infinite;
}

@keyframes globe3dSpin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

@keyframes globeRotate {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(-360deg); }
}

/* 3D Keyboard Icon */
.icon-3d-keyboard {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  border-radius: 16px;
  box-shadow: 
    0 10px 30px rgba(250, 112, 154, 0.4),
    0 4px 12px rgba(254, 225, 64, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: keyboard3dType 2s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.icon-3d-keyboard::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 50%);
  border-radius: 16px;
}

.icon-3d-keyboard::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  animation: iconShine 4s ease-in-out infinite 1.5s;
}

.icon-3d-keyboard svg {
  width: 28px;
  height: 28px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  z-index: 1;
  animation: keyboardPress 0.5s ease-in-out infinite;
}

@keyframes keyboard3dType {
  0%, 100% { transform: translateY(0) perspective(500px) rotateX(0deg); }
  50% { transform: translateY(-5px) perspective(500px) rotateX(5deg); }
}

@keyframes keyboardPress {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(2px); }
}

/* Universal Icon Shine Animation */
@keyframes iconShine {
  0%, 100% { transform: translateX(-100%) rotate(45deg); }
  50% { transform: translateX(100%) rotate(45deg); }
}

/* Feature Showcase Section with 3D Icons */
.features-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
  margin: 2rem 0;
}

.feature-card-3d {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 20px var(--shadow);
}

.feature-card-3d:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px var(--shadow-lg);
}

.feature-card-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #f093fb, #4facfe, #fa709a);
  background-size: 300% 100%;
  animation: gradientFlow 4s ease infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.feature-icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-card-3d h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.feature-card-3d p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Speak Now Button with 3D Icon */
.btn-speak-3d {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-speak-3d:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.btn-speak-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnShine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.btn-speak-3d .mic-3d-icon {
  width: 24px;
  height: 24px;
  animation: micPulse 1.5s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Hero Section Enhanced with 3D Elements */
.hero-3d-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.hero-3d-icons .icon-3d-mic,
.hero-3d-icons .icon-3d-pen,
.hero-3d-icons .icon-3d-grad,
.hero-3d-icons .icon-3d-globe,
.hero-3d-icons .icon-3d-keyboard {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.hero-3d-icons .icon-3d-mic:hover,
.hero-3d-icons .icon-3d-pen:hover,
.hero-3d-icons .icon-3d-grad:hover,
.hero-3d-icons .icon-3d-globe:hover,
.hero-3d-icons .icon-3d-keyboard:hover {
  transform: scale(1.15) translateY(-5px);
}

/* Particles/Sparkle Effect for Premium Feel */
.sparkle-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: linear-gradient(45deg, #ffd700, #fff);
  border-radius: 50%;
  animation: sparkleFloat 3s ease-in-out infinite;
}

@keyframes sparkleFloat {
  0%, 100% { 
    opacity: 0;
    transform: translateY(0) scale(0);
  }
  50% { 
    opacity: 1;
    transform: translateY(-20px) scale(1);
  }
}

/* 3D Badge for Premium Features */
.badge-3d {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  animation: badge3dGlow 2s ease-in-out infinite;
}

@keyframes badge3dGlow {
  0%, 100% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }
  50% { box-shadow: 0 4px 25px rgba(102, 126, 234, 0.6), 0 0 20px rgba(118, 75, 162, 0.3); }
}

/* ========== TIGRE DICTIONARY SECTION ========== */
.dictionary-section {
  padding: 5rem 2rem;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.dictionary-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.dictionary-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.dictionary-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
  color: #667eea;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.dictionary-section h2 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.dictionary-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.dictionary-mission {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.mission-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.mission-item svg {
  width: 16px;
  height: 16px;
  color: #22c55e;
}

/* Stats Cards */
.dictionary-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* Arabic Diacritics Guide */
.diacritics-guide {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.diacritics-guide h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.diacritics-guide .guide-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.diacritics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.diacritic-item {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
}

.diacritic-mark {
  display: block;
  font-size: 2rem;
  font-family: 'Amiri', 'Traditional Arabic', serif;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.diacritic-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.diacritic-sound {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-card {
  background: var(--bg-card);
  padding: 1.5rem 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
  min-width: 140px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px var(--shadow-lg);
}

.stat-card:nth-child(1) .stat-icon { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-card:nth-child(2) .stat-icon { background: linear-gradient(135deg, #f093fb, #f5576c); }
.stat-card:nth-child(3) .stat-icon { background: linear-gradient(135deg, #4facfe, #00f2fe); }

/* Category Filter Tabs */
.category-filter {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.category-tab {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.category-tab:hover {
  border-color: #667eea;
  color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.category-tab.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.category-tab .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  font-size: 0.75rem;
  margin-left: 0.4rem;
}

.category-tab.active .tab-count {
  background: rgba(255,255,255,0.3);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Dictionary Highlights - Word of Day & Leaderboard */
.dictionary-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  .dictionary-highlights {
    grid-template-columns: 1fr;
  }
}

/* Word of the Day Card */
.word-of-day-card {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 16px;
  padding: 1.5rem;
  color: white;
  box-shadow: 0 8px 24px rgba(183, 115, 51, 0.3);
}

.wod-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.wod-label {
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.wod-date {
  font-size: 0.85rem;
  opacity: 0.9;
}

.wod-tigre {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.wod-pronunciation {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.wod-english {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.wod-arabic {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.wod-category {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* Leaderboard */
.leaderboard-container {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

.leaderboard-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.leaderboard-title::before {
  content: "";
  font-size: 1.25rem;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.leaderboard-entry {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.leaderboard-entry:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.leaderboard-rank {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-color);
  min-width: 28px;
}

.leaderboard-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.leaderboard-name {
  font-weight: 600;
  color: var(--text-primary);
}

.contributor-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 50px;
  font-size: 0.7rem;
  color: white;
  font-weight: 600;
  width: fit-content;
}

.leaderboard-contributions {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Word Link and Report Buttons */
.word-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  background: transparent;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
  margin-left: auto;
}

.word-link-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
  color: #667eea;
}

.report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  background: transparent;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.report-btn:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #ef4444;
}

.report-btn svg,
.word-link-btn svg,
.speak-btn svg {
  flex-shrink: 0;
}

/* Speak/Pronunciation Button */
.speak-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--primary);
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.3);
}

.speak-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.4);
}

.speak-btn.speaking {
  animation: speakPulse 0.8s ease-in-out infinite;
  background: linear-gradient(135deg, var(--accent), #E5B894);
}

@keyframes speakPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(184, 115, 51, 0.4);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(184, 115, 51, 0.6);
  }
}

/* Dictionary Container */
.dictionary-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .dictionary-container {
    grid-template-columns: 1fr;
  }
}

/* Add Word Card */
.add-word-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
}

.add-word-card h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.add-word-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group input,
.form-group select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.submit-word-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 0.5rem;
}

.submit-word-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-word-btn:active {
  transform: translateY(0);
}

/* Word List Card */
.word-list-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.word-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.word-list-header h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  width: 200px;
  transition: border-color 0.2s ease, width 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #667eea;
  width: 240px;
}

.search-box svg {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
}

.word-list {
  flex: 1;
  overflow-y: auto;
  max-height: 500px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.loading-words {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

.word-entry {
  background: var(--bg-card);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.word-entry::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #667eea, #764ba2);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.word-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow);
  border-color: rgba(102, 126, 234, 0.3);
}

.word-entry:hover::before {
  transform: scaleY(1);
}

.word-entry.verified {
  border-color: rgba(34, 197, 94, 0.3);
}

.word-entry.verified::before {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.word-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.word-tigre {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.word-script {
  font-size: 1.4rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.word-pronunciation {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-secondary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.verified-badge svg {
  width: 12px;
  height: 12px;
}

.word-votes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.vote-btn:hover {
  background: var(--bg-primary);
}

.vote-btn svg {
  width: 18px;
  height: 18px;
}

.vote-btn.upvote svg {
  color: #22c55e;
}

.vote-btn.downvote svg {
  color: #ef4444;
}

.vote-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 24px;
  text-align: center;
}

.word-meaning {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.word-arabic {
  color: var(--text-muted);
  font-size: 0.9rem;
  direction: rtl;
}

.word-arabic-container {
  margin: 0.5rem 0;
}

.word-diacritics {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.1), rgba(212, 165, 116, 0.05));
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.diacritics-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.diacritics-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent);
  direction: rtl;
  font-family: 'Amiri', 'Traditional Arabic', serif;
}

.word-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.word-category {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  color: #667eea;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.word-contributor {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.empty-dictionary {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-dictionary svg {
  width: 60px;
  height: 60px;
  opacity: 0.3;
  margin-bottom: 1rem;
}

.empty-dictionary h4 {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* Toast notification */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  z-index: 10000;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-notification.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Individual Word Page Styles */
.word-page {
  padding-top: 2rem;
  max-width: 800px;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--accent-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.word-detail-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.word-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.word-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.word-latin {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

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

.word-meanings {
  margin-bottom: 1.5rem;
}

.meaning-row {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.meaning-label {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 80px;
}

.meaning-value {
  color: var(--text-primary);
  font-size: 1.1rem;
}

.meaning-value.rtl {
  direction: rtl;
}

.word-meta-info {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.pos-tag, .category-tag, .verified-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
}

.pos-tag {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.category-tag {
  background: rgba(183, 115, 51, 0.1);
  color: var(--accent-color);
  text-transform: capitalize;
}

.verified-tag {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.word-example {
  background: var(--bg-tertiary);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--accent-color);
}

.word-votes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.vote-count {
  font-weight: 600;
}

.contributor {
  font-style: italic;
}

.related-words-section {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.related-words-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.related-words-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-word {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s;
}

.related-word:hover {
  background: rgba(183, 115, 51, 0.1);
  transform: translateX(4px);
}

.cta-section {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  color: white;
  margin-bottom: 2rem;
}

.cta-section h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.cta-section p {
  margin-bottom: 1.25rem;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: white;
  color: var(--primary-color);
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--accent-color);
}

/* ========== SUBSCRIPTION MODAL ========== */
.subscription-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.subscription-overlay.active {
  opacity: 1;
  visibility: visible;
}

.subscription-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 95%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.subscription-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.subscription-modal-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.subscription-modal-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.subscription-modal-header h2 {
  color: white;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.subscription-modal-header p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

.subscription-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}

.subscription-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.subscription-modal-body {
  padding: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

.subscription-plans {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.subscription-plan {
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.subscription-plan::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}

.subscription-plan:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-lg);
}

.subscription-plan.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(45, 106, 79, 0.1), rgba(212, 165, 116, 0.1));
}

.subscription-plan.popular {
  border-color: var(--accent);
}

.popular-badge {
  position: absolute;
  top: -1px;
  right: -1px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 0 14px 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.plan-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.plan-price {
  text-align: right;
}

.plan-price .amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.plan-price .period {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.plan-price .original {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.plan-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.plan-feature {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.payment-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.payment-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-align: center;
}

#apple-pay-button-container {
  margin-bottom: 1rem;
}

.apple-pay-button {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  background: #000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
}

.apple-pay-button:hover {
  background: #1a1a1a;
  transform: scale(1.02);
}

.apple-pay-button svg {
  width: 24px;
  height: 24px;
}

.apple-pay-section {
  margin-bottom: 1rem;
}

.apple-pay-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.apple-pay-label svg {
  color: var(--text-primary);
}

.payment-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.payment-divider::before,
.payment-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.stripe-checkout-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.stripe-checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 106, 79, 0.4);
}

.stripe-checkout-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.payment-methods {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.payment-method-icon {
  width: 40px;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
}

.subscription-benefits {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.subscription-benefits h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.benefit-item .check {
  color: var(--success);
  font-weight: bold;
}

/* Floating Subscribe Button */
.floating-subscribe-btn {
  position: fixed;
  bottom: 170px;
  right: 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(45, 106, 79, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: floatBounce 3s ease-in-out infinite, pulseGlow 2s ease-in-out infinite;
  transition: all 0.3s;
}

.floating-subscribe-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(45, 106, 79, 0.5);
}

/* When AI Dictionary is open, move subscribe button next to dictionary FAB */
.floating-subscribe-btn.dictionary-open {
  bottom: 25px;
  right: 90px;
  padding: 0.8rem 1.2rem;
  font-size: 0.9rem;
  animation: none;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 8px 32px rgba(45, 106, 79, 0.4); }
  50% { box-shadow: 0 8px 48px rgba(45, 106, 79, 0.6), 0 0 20px rgba(212, 165, 116, 0.3); }
}

.floating-subscribe-btn .icon {
  font-size: 1.25rem;
}

/* Slide-in animation for first visit */
.floating-subscribe-btn.slide-in {
  animation: slideInRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, floatBounce 3s ease-in-out infinite 0.6s, pulseGlow 2s ease-in-out infinite 0.6s;
}

@keyframes slideInRight {
  from {
    transform: translateX(200px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .subscription-modal {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 24px 24px 0 0;
    top: auto;
    bottom: 0;
    transform: translate(-50%, 100%);
  }
  
  .subscription-modal.active {
    transform: translate(-50%, 0);
  }
  
  .floating-subscribe-btn {
    bottom: 150px;
    right: 16px;
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* ========== RANDOM WORD MODAL ========== */
.random-word-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  display: none;
}

.random-word-modal.active {
  display: block;
}

.random-word-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.random-word-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-card);
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes scaleIn {
  from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.random-word-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s;
}

.random-word-close:hover {
  transform: scale(1.1);
}

.random-word-header {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  padding: 2rem;
  text-align: center;
  color: white;
}

.random-label {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.random-tigre {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.random-pronunciation {
  opacity: 0.9;
  font-size: 1rem;
}

.random-word-body {
  padding: 1.5rem;
}

.random-meaning {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.random-diacritics {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  margin: 0.5rem 0;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.15), rgba(212, 165, 116, 0.05));
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}

.random-diacritics .diacritics-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.random-diacritics .diacritics-text {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--accent);
  font-family: 'Amiri', 'Traditional Arabic', serif;
}

.random-example {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 12px;
  margin: 1rem 0;
}

.example-translation {
  color: var(--text-secondary);
  font-style: italic;
  margin-top: 0.5rem;
}

.random-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.random-category,
.random-pos {
  display: inline-block;
  background: var(--bg-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.random-word-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem;
}

.random-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  border-radius: 12px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.random-action-btn.share {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.random-action-btn.share:hover {
  background: var(--border);
}

.random-action-btn.another {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.random-action-btn.another:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(45, 106, 79, 0.4);
}

.random-action-btn.speak {
  background: linear-gradient(135deg, #4a90d9, #357abd);
  color: white;
}

.random-action-btn.speak:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(74, 144, 217, 0.4);
}

.random-action-btn.speak.speaking {
  background: linear-gradient(135deg, #e91e63, #c2185b);
  animation: pulse-speak 0.8s ease-in-out infinite;
}

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

/* Random Word Button */
.random-word-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(212, 165, 116, 0.3);
}

.random-word-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 165, 116, 0.4);
}

/* ========== SHARE POPUP ========== */
.share-options-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10002;
}

.share-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
}

.share-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  padding: 1.5rem;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.share-content h3 {
  text-align: center;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.share-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  border-radius: 12px;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s;
}

.share-btn:hover {
  transform: scale(1.02);
}

.share-btn.twitter {
  background: #000;
  color: white;
}

.share-btn.facebook {
  background: #1877f2;
  color: white;
}

.share-btn.whatsapp {
  background: #25d366;
  color: white;
}

.share-btn.copy {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.share-close {
  width: 100%;
  margin-top: 1rem;
  padding: 0.875rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
}
