/* ═══════════════════════════════════════════════════════════
   VISUAL POLISH – cleaner animations, better depth,
   more refined interactions (student screens)
   ═══════════════════════════════════════════════════════════ */

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Unit cards – more glass-like, stronger hover */
.unit-card {
  background: rgba(255,255,255,0.07) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
              background 0.25s ease,
              border-color 0.25s ease,
              box-shadow 0.35s ease !important;
}
.unit-card:hover {
  transform: translateY(-6px) scale(1.015) !important;
  background: rgba(255,255,255,0.11) !important;
  border-color: rgba(255,255,255,0.22) !important;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35) !important;
}
.unit-card:active {
  transform: translateY(-2px) scale(0.99) !important;
  transition-duration: 0.1s !important;
}

/* Logo */
.logo {
  letter-spacing: -0.02em;
  text-shadow: 0 2px 30px rgba(122,58,238,0.35);
}

/* Home action buttons */
.home-lb-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
              background 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.25s ease;
  backdrop-filter: blur(8px);
}
.home-lb-btn:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.home-lb-btn:active {
  transform: scale(0.96);
}

/* Announcement */
.home-announcement {
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}

/* Header glass effect */
.main-header {
  background: color-mix(in srgb, var(--body-bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
}

/* Icon buttons */
.back-btn:hover, .settings-btn:hover, .theme-toggle:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.back-btn:active, .settings-btn:active, .theme-toggle:active {
  transform: scale(0.9) !important;
}

/* Difficulty & tabs */
.diff-btn:hover:not(.active) {
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.diff-btn.active {
  box-shadow: 0 4px 14px rgba(26,77,232,0.35);
}
.tab-btn.active {
  box-shadow: 0 3px 12px rgba(26,77,232,0.4) !important;
}

/* Choice buttons */
.choice-btn:hover:not(:disabled) {
  transform: translateX(6px) !important;
  box-shadow: 0 4px 16px rgba(26,77,232,0.15);
}

/* Next button */
.next-btn {
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(26,77,232,0.25);
}
.next-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 28px rgba(26,77,232,0.4) !important;
}
.next-btn:active {
  transform: scale(0.97) !important;
}

/* Cards depth */
.card, .word-display-card {
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
[data-mode="dark"] .card,
[data-mode="dark"] .word-display-card {
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}

/* Modals */
.modal {
  border-radius: 20px !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28) !important;
  animation: polishModalIn 0.35s cubic-bezier(0.16,1,0.3,1);
}
@keyframes polishModalIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.modal-overlay {
  backdrop-filter: blur(6px);
  animation: polishOverlayIn 0.25s ease;
}
@keyframes polishOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Score emoji pop */
.score-end .big-emoji {
  animation: polishScoreEmoji 0.6s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes polishScoreEmoji {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* Focus rings for accessibility */
button:focus-visible,
.choice-btn:focus-visible,
.tab-btn:focus-visible,
.diff-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Smoother theme switching */
body, .card, .word-display-card, .main-header, .tab-bar-wrapper, .difficulty-bar {
  transition: background 0.4s ease, color 0.35s ease, border-color 0.35s ease !important;
}
