/* Dreamcatchers NA - Recovery Website */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Prevent horizontal overflow on mobile */
html,
body {
  width: 100%;
  height: 100%;
  font-family: var(--ui-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ===== DESIGN SYSTEM ===== */

/* Typography */

:root {
  --ui-font:
    "Plus Jakarta Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --prose-font:
    "Source Serif 4", Georgia, "Times New Roman", serif;
  --ui-heading-weight: 400;
  --ui-heading-spacing: 0.5px;
//  --ui-heading-transform: uppercase;
}

/* Color System - Warm Night Palette */
:root {
  /* Primary Colors - Sage/Teal (welcoming, not clinical) */
  --primary: #1e77bc;
  --primary-rgb: 30, 119, 188;
  --primary-light: #4a90d9;
  --primary-dark: #17446b;
  --primary-hover: #155a8a;

  /* Secondary Colors - Deep Blue */
  --secondary: #17446b;
  --secondary-light: #12304a;
  --secondary-dark: #0d1b2a;

  /* Accent - Deep Blue for CTAs */
  --accent-warm: #17446b;
  --accent-warm-hover: #12304a;

  /* Dark Theme - Warm Night (warm undertones) */
  --dark-bg: #1a1d21;
  --dark-bg-elevated: #242830;
  --dark-panel: #242830;
  --dark-surface: #2d323b;
  --dark-surface-hover: #3d4451;
  --dark-text: #e8e6e3;
  --dark-text-secondary: #9ca3af;
  --dark-text-muted: #6b7280;
  --dark-border: #3d4451;
  --dark-border-subtle: #2d323b;

  /* Light Theme - Warm Day (warm whites) */
  --light-bg: #f8f7f4;
  --light-bg-elevated: #ffffff;
  --light-panel: #ffffff;
  --light-surface: #f0ede8;
  --light-surface-hover: #e8e5e0;
  --light-text: #1a1a1a;
  --light-text-secondary: #6b7280;
  --light-text-muted: #9ca3af;
  --light-border: #d4d0c8;
  --light-border-subtle: #e8e5e0;

  /* Semantic Colors - Warm Night palette */
  --success: #6ee7a8;
  --warning: #fbbf24;
  --error: #f87171;
  --info: #60a5fa;
  --danger: #f87171;

  /* Dictionary/Vocabulary Colors */
  --synonym-color-light: #1b5e20;
  --synonym-color-dark: #81c784;
  --antonym-color-light: #b71c1c;
  --antonym-color-dark: #ef9a9a;

  /* Spacing System (8px base) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== THEME CLASSES ===== */

.dark-theme {
  --bg: var(--dark-bg);
  --bg-elevated: var(--dark-bg-elevated);
  --panel: var(--dark-panel);
  --surface: var(--dark-surface);
  --surface-hover: var(--dark-surface-hover);
  --text: var(--dark-text);
  --text-secondary: var(--dark-text-secondary);
  --text-muted: var(--dark-text-muted);
  --border: var(--dark-border);
  --border-subtle: var(--dark-border-subtle);
  --accent: var(--primary);
  --accent-hover: var(--primary-hover);
  --synonym-color: var(--synonym-color-dark);
  --antonym-color: var(--antonym-color-dark);
}

.light-theme {
  --bg: var(--light-bg);
  --bg-elevated: var(--light-bg-elevated);
  --panel: var(--light-panel);
  --surface: var(--light-surface);
  --surface-hover: var(--light-surface-hover);
  --text: var(--light-text);
  --text-secondary: var(--light-text-secondary);
  --text-muted: var(--light-text-muted);
  --border: var(--light-border);
  --border-subtle: var(--light-border-subtle);
  --accent: var(--primary);
  --accent-hover: var(--primary-hover);
  --synonym-color: var(--synonym-color-light);
  --antonym-color: var(--antonym-color-light);
}

/* ===== BASE STYLES ===== */

body {
  background: var(--bg, #1a1a1a);
  color: var(--text, #f5f5f5);
  transition:
    background-color var(--transition-base),
    color var(--transition-base);
  font-size: 18px;
  line-height: 1.2;
}

.dark-theme,
.light-theme {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ===== HEADER ===== */

.app-header {
  display: flex;
  justify-content: space-between;
  /* top align header children (logo, title, actions) */
  align-items: flex-start;
  /* keep generous bottom space for nav but allow page-specific overrides for top padding */
  padding: calc(var(--space-sm) + 1.75rem) var(--space-md);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  gap: var(--space-md);
  width: 100%;
  box-sizing: border-box;
}

/* Index page: pull header to the top of the viewport with only 8px top padding */
.index-page .app-header {
  padding: 4px var(--space-md) calc(var(--space-md) + 1.25rem);
}

/* Index page uses mobile-scoped layout rules defined inside the mobile media query */

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-width: 0; /* Allow flex shrinking */
}

.header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo .logo-image {
  align-self: center;
}

.header-title {
  align-self: center;
}

.header-nav {
  position: absolute;
  left: 50%;
  /* move the nav row down slightly so it sits below the title */
  /* nudged further down per request */
  transform: translate(-50%, 2rem);
  display: flex;
  justify-content: center;
  align-items: center;
  }

.quick-access-bar.inline-nav {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* Responsive Header adjustments */
@media (max-width: 1024px) {
  .header-title p {
    display: none;
  }

  .nav-links {
    gap: var(--space-md);
  }

  .nav-link {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* increase vertical padding on mobile to match header growth */
    padding: calc(var(--space-sm) + 1.75rem) var(--space-md);
    gap: var(--space-sm);
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
    min-width: 0; /* Allow shrinking */
    overflow: hidden;
  }

  /* Index-only: top-align header elements (icon, h1, theme toggle) on mobile */
  .index-page .app-header {
    align-items: flex-start;
  }

  .index-page .header-left {
    align-items: flex-start;
  }

  /* Index-specific mobile layout: stack into two rows using flex (no grid) */
  .index-page .app-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: stretch;
  }

  .index-page .header-left {
    order: 1;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    width: 100%;
  }

  .index-page .header-right {
    order: 2;
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    width: 100%;
    align-items: center;
  }

  .index-page .hamburger-btn {
    order: 2;
  }

  /* Reduce vertical spacing on mobile so actions row sits tight under the title */
  .index-page .app-header {
    padding-top: 8px; /* keep a small top gap */
    padding-bottom: 8px; /* reduce bottom space under actions */
    gap: var(--space-xs);
  }

  .index-page .header-right {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .header-title {
    display: block;
    flex: 1;
    min-width: 0; /* Allow shrinking */
    overflow: hidden;
  }

  .header-title h1 {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Mobile/index: allow the site title to wrap and not be clipped by the grid column */
  .index-page .header-title h1 {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  /* Recoverly badge on mobile */
  .header-recoverly-link {
    margin-top: 4px;
    padding: 3px 8px 3px 3px;
    gap: 5px;
  }

  .header-recoverly-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
  }

  .header-recoverly-name {
    font-size: 11px;
  }

  .header-recoverly-sub {
    font-size: 9px;
  }

  .header-logo {
    flex-shrink: 0;
  }

  .header-logo .logo-image {
    height: 36px;
  }

  /* Hide desktop nav on mobile */
  .header-nav.desktop-nav {
    display: none;
  }

  /* Show hamburger button on mobile */
  .hamburger-btn {
    display: flex !important;
    flex-shrink: 0;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .theme-toggle {
    position: relative;
    z-index: 10;
  }

  .scroll-arrow {
    display: none !important;
  }
}

/* Extra small screens - show two-line title */
@media (max-width: 420px) {
  .header-title h1 {
    font-size: 13px;
    white-space: normal;
    line-height: 1.2;
    overflow: visible;
    text-overflow: clip;
  }

  .header-recoverly-sub {
    display: none;
  }

  .header-recoverly-name {
    font-size: 10px;
  }

  .header-logo .logo-image {
    height: 32px;
  }

  .hamburger-btn {
    padding: var(--space-xs);
    min-width: 40px;
    min-height: 40px;
  }

  .theme-toggle {
    min-width: 40px;
    min-height: 40px;
    padding: var(--space-xs);
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .header-title h1 {
    font-size: 12px;
  }

  .header-recoverly-label {
    display: none;
  }

  .header-recoverly-play-icon {
    display: none;
  }

  .header-recoverly-link {
    padding: 3px;
    border-radius: 8px;
  }

  .header-recoverly-icon {
    width: 20px;
    height: 20px;
    border-radius: 5px;
  }

  .header-logo .logo-image {
    height: 28px;
  }
}

.header-logo {
  display: flex;
  align-items: center;
  transition: transform var(--transition-base);
}

.header-logo .logo-image {
  height: 48px;
  width: auto;
  transition: transform var(--transition-base);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.header-logo:hover {
  transform: scale(1.05);
}

.header-title h1 {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: var(--ui-heading-transform);
  margin: 0;
  color: var(--text);
}

.header-title p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 500;
}

/* Recoverly app badge in header nav */
.header-recoverly-link {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  margin-left: 8px;
  margin-top: -10px;
  padding: 6px 12px 6px 6px;
  border-radius: 12px;
  background: var(--surface-2, rgba(128,128,128,0.12));
  border: 1px solid var(--border, rgba(128,128,128,0.2));
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  max-width: fit-content;
  flex-shrink: 0;
  align-self: center;
}

.header-recoverly-link:hover {
  background: var(--accent-subtle, rgba(99,102,241,0.15));
  border-color: var(--accent, #6366f1);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.header-recoverly-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.header-recoverly-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}

.header-recoverly-label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-recoverly-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.header-recoverly-sub {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 400;
}

.header-recoverly-play-icon {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 2px;
}

.header-recoverly-desc {
  font-size: 10px;
  color: var(--text-secondary);
  padding-left: 33px;
  white-space: nowrap;
}

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) 14px;
  cursor: pointer;
  transition: all var(--transition-base);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  z-index: 10;
}

.theme-toggle:hover,
.theme-toggle:active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ===== FONT PAIRING TOGGLE ===== */

.font-pairing-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) 10px;
  cursor: pointer;
  transition: all var(--transition-base);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  z-index: 10;
}

.font-pairing-toggle:hover,
.font-pairing-toggle:active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ===== HAMBURGER MENU BUTTON ===== */

.hamburger-btn {
  display: none; /* Hidden on desktop, shown on mobile */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 0;
  margin: 0;
  z-index: 1100;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.hamburger-btn:active {
  background: var(--surface-hover);
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  position: relative;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition-base);
  transform-origin: center;
}

/* Hamburger to X animation */
.hamburger-icon.open .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-icon.open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-icon.open .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ===== MOBILE MENU OVERLAY ===== */

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--transition-base),
    visibility var(--transition-base);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ===== MOBILE SLIDE-OUT MENU ===== */

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: var(--panel);
  z-index: 1050;
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
  flex-direction: column;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.mobile-menu-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.mobile-menu-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--text-secondary);
  font-size: 20px;
  transition: color var(--transition-fast);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-close:hover {
  color: var(--text);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  padding: var(--space-md) 0;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.mobile-menu-link:hover {
  background: var(--surface);
  border-left-color: var(--accent);
}

.mobile-menu-link.active {
  background: var(--surface);
  border-left-color: var(--accent);
  color: var(--accent);
}

.mobile-menu-emoji {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.mobile-menu-label {
  flex: 1;
}

.mobile-menu-external {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

/* Recoverly entry in mobile menu */
.mobile-menu-recoverly-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  text-decoration: none;
  border-top: 1px solid var(--border, rgba(128,128,128,0.15));
  margin-top: 8px;
  transition: background 0.15s ease;
}

.mobile-menu-recoverly-link:hover,
.mobile-menu-recoverly-link:active {
  background: var(--accent-subtle, rgba(99,102,241,0.1));
}

.mobile-menu-recoverly-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: block;
}

.mobile-menu-recoverly-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.mobile-menu-recoverly-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.mobile-menu-recoverly-desc {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-menu-recoverly-sub {
  font-size: 11px;
  color: var(--accent, #6366f1);
  font-weight: 500;
}

/* Show mobile menu elements on mobile */
@media (max-width: 768px) {
  .mobile-menu {
    display: flex;
  }
}

/* ===== QUICK ACCESS BAR ===== */

.quick-access-bar {
  background: var(--bg);
  border-bottom: none;
  padding: var(--space-md) var(--space-xl);
  overflow-x: auto;
  overflow-y: visible;
  position: relative;
  scroll-behavior: smooth;
  z-index: 100;
}

/* Hide scrollbar for cleaner look */
.quick-access-bar {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.quick-access-bar::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.quick-access-items {
  display: flex;
  gap: var(--space-sm);
  min-width: min-content;
  justify-content: center; /* Center on desktop */
}

/* Left-justify nav items on mobile */
@media (max-width: 768px) {
  .quick-access-items {
    justify-content: flex-start;
  }
}

/* Scroll arrow buttons for mobile */
.scroll-arrow {
  display: none; /* Hidden by default */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  z-index: 20;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 16px;
}

.scroll-arrow:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-lg);
}

.scroll-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.scroll-arrow-left {
  left: var(--space-md);
}

.scroll-arrow-right {
  right: var(--space-md);
}

/* Show arrows on mobile */
@media (max-width: 768px) {
  .scroll-arrow {
    display: flex;
  }

  .scroll-arrow.hidden {
    opacity: 0;
    pointer-events: none;
  }
}

/* Traditional Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
  padding: var(--space-sm) 0;
  white-space: nowrap;
  transition: color var(--transition-base);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: #e8f9ff;
  text-shadow:
    0 0 2px #ffffff,
    0 0 5px #a8edff,
    0 0 10px #5cd6ff;
  filter: drop-shadow(0 0 4px rgba(92, 214, 255, 0.7));
  animation: ice-fire 2.5s ease-in-out infinite alternate;
}

/* Light theme: swap ice-white for deep ocean blue so it's legible */
.light-theme .nav-link.active {
  color: #0066aa;
  text-shadow:
    0 0 2px rgba(0, 102, 170, 0.4),
    0 0 5px rgba(0, 160, 220, 0.5),
    0 0 10px rgba(0, 190, 255, 0.35);
  filter: drop-shadow(0 0 3px rgba(0, 160, 220, 0.5));
  animation: ice-fire-light 2.5s ease-in-out infinite alternate;
}

.nav-link.active::after {
  width: 100%;
  background: linear-gradient(90deg, #5cd6ff, #a8edff, #5cd6ff);
  box-shadow: 0 0 5px #5cd6ff, 0 0 10px rgba(92, 214, 255, 0.5);
  height: 2px;
}

@keyframes ice-fire {
  0% {
    color: #e8f9ff;
    text-shadow: 0 0 2px #fff, 0 0 5px #a8edff, 0 0 10px #5cd6ff;
    filter: drop-shadow(0 0 3px rgba(92, 214, 255, 0.6));
  }
  33% {
    color: #ffffff;
    text-shadow: 0 0 2px #fff, 0 0 7px #c8f4ff, 0 0 13px #1ab8ff;
    filter: drop-shadow(0 0 6px rgba(26, 184, 255, 0.8));
  }
  66% {
    color: #cdf2ff;
    text-shadow: 0 0 2px #fff, 0 0 4px #a8edff, 0 0 9px #5cd6ff;
    filter: drop-shadow(0 0 3px rgba(92, 214, 255, 0.5));
  }
  100% {
    color: #e8f9ff;
    text-shadow: 0 0 2px #fff, 0 0 6px #7de8ff, 0 0 12px #1ab8ff;
    filter: drop-shadow(0 0 5px rgba(26, 184, 255, 0.75));
  }
}

@keyframes ice-fire-light {
  0% {
    color: #0066aa;
    text-shadow: 0 0 2px rgba(0,102,170,0.4), 0 0 5px rgba(0,160,220,0.5), 0 0 10px rgba(0,190,255,0.35);
    filter: drop-shadow(0 0 3px rgba(0,160,220,0.5));
  }
  33% {
    color: #0055cc;
    text-shadow: 0 0 2px rgba(0,85,204,0.5), 0 0 7px rgba(0,140,240,0.55), 0 0 13px rgba(0,190,255,0.4);
    filter: drop-shadow(0 0 5px rgba(0,140,240,0.65));
  }
  66% {
    color: #0077bb;
    text-shadow: 0 0 2px rgba(0,119,187,0.35), 0 0 4px rgba(0,160,220,0.4), 0 0 8px rgba(0,190,255,0.3);
    filter: drop-shadow(0 0 3px rgba(0,160,220,0.45));
  }
  100% {
    color: #0066aa;
    text-shadow: 0 0 2px rgba(0,102,170,0.4), 0 0 6px rgba(0,160,220,0.5), 0 0 11px rgba(0,190,255,0.35);
    filter: drop-shadow(0 0 4px rgba(0,160,220,0.55));
  }
}

/* Legacy quick-access-item styles (kept for compatibility) */
.quick-access-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: 12px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-base);
  font-weight: 400;
  letter-spacing: 0px;
  font-size: 14px;
  color: var(--text);
}

.quick-access-emoji {
  font-size: 24px;
  transition: transform var(--transition-base);
}

.quick-access-label {
  line-height: 1;
  margin: 0;
  padding: 0;
}

.quick-access-item:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-access-item:hover .quick-access-emoji {
  transform: scale(1.15);
}

.quick-access-item.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===== CONTENT PANEL ===== */

.content-panel {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-xl);
  background: var(--bg);
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ===== CONTENT HEADER ===== */

.content-header {
  margin-bottom: var(--space-2xl);
  text-align: center;
}

.content-header h1 {
  font-size: 42px;
  font-weight: var(--ui-heading-weight);
  letter-spacing: var(--ui-heading-spacing);
  text-transform: var(--ui-heading-transform);
  margin-bottom: var(--space-md);
  color: var(--text);
}

.content-header p {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 500;
}

.reading-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-base);
}

.reading-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.section-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ===== HERO SECTION ===== */

.hero {
  text-align: center;
  padding: 6px 0;
  background: linear-gradient(
    135deg,
    rgba(38, 166, 154, 0.05) 0%,
    rgba(126, 87, 194, 0.05) 100%
  );
  border-radius: var(--radius-xl);
  margin-bottom: 6px;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.hero-logo {
  margin-bottom: var(--space-lg);
  display: flex;
  justify-content: center;
}

.logo-icon {
  height: 120px;
  width: auto;
  animation: pulse 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(38, 166, 154, 0.3));
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  line-height: 1.2;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.8;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-meeting-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-bottom: 6px;
}

.meeting-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.meeting-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.meeting-card h3 {
  font-size: 22px;
  margin-bottom: var(--space-md);
  color: var(--text);
  font-weight: 600;
}

.meeting-time {
  font-size: 16px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.key-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.info-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
}

.info-item:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateX(4px);
}

.info-item i {
  font-size: 28px;
  color: var(--accent);
}

.info-item p {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0;
}

/* ===== FEATURE SECTION ===== */

.feature-section {
  margin: 24px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  border-radius: var(--radius-lg);
  color: white;
  font-size: 28px;
  transition: transform var(--transition-base);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: var(--space-md);
  color: var(--text);
  font-weight: 600;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 15px;
}

/* ===== CTA SECTION ===== */

.cta-section {
  text-align: center;
  padding: var(--space-3xl);
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  border-radius: var(--radius-xl);
  margin: var(--space-2xl) 0;
  color: white;
  box-shadow: var(--shadow-lg);
}

.cta-section h2 {
  font-size: 36px;
  margin-bottom: var(--space-md);
  font-weight: 700;
}

.cta-section p {
  font-size: 18px;
  margin-bottom: var(--space-xl);
  opacity: 0.95;
}

/* ===== BUTTONS ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0px;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  font-family: var(--ui-font);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(
    135deg,
    var(--primary-hover),
    var(--secondary-light)
  );
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #2de070, #1aab97);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-large {
  padding: 18px 36px;
  font-size: 17px;
}

.cta-section .btn-primary {
  background: white;
  color: var(--accent);
}

.cta-section .btn-primary:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-3px) scale(1.02);
}

/* ===== MEETINGS PAGE ===== */

.meeting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.meeting-card-large {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.meeting-card-large:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.card-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--border);
}

.card-header h2 {
  font-size: 24px;
  font-weight: var(--ui-heading-weight);
  letter-spacing: var(--ui-heading-spacing);
  text-transform: var(--ui-heading-transform);
  margin-bottom: var(--space-sm);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.card-header h2 i {
  color: var(--accent);
}

.card-header p {
  color: var(--text-secondary);
  font-size: 15px;
  font-family: var(--prose-font);
}

.zoom-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent);
  font-weight: 600;
}

.meeting-times-list {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0 var(--space-xl) 0;
}

.meeting-times-list li {
  padding: var(--space-md) 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  border-bottom: 1px solid var(--border-subtle);
}

.meeting-times-list li:last-child {
  border-bottom: none;
}

.meeting-times-list li strong {
  color: var(--text);
  font-weight: 600;
}

.action-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-lg);
}

.meeting-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.meeting-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition-base);
  cursor: pointer;
}

.meeting-link:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

.link-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: white;
  border-radius: var(--radius-md);
  font-size: 22px;
  flex-shrink: 0;
}

.link-info {
  flex: 1;
}

.link-info h4 {
  font-size: 17px;
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 600;
}

.link-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.meeting-link > i:last-child {
  color: var(--accent);
  font-size: 18px;
  transition: transform var(--transition-base);
}

.meeting-link:hover > i:last-child {
  transform: translateX(4px);
}

.meeting-info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.info-card {
  text-align: center;
  padding: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.info-card i {
  font-size: 36px;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.info-card h4 {
  font-size: 18px;
  margin-bottom: var(--space-sm);
  color: var(--text);
  font-weight: 600;
}

.info-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.helpline-section {
  background: var(--panel);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.helpline-section h3 {
  font-size: 24px;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  font-weight: 600;
}

.helpline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.helpline-card {
  padding: var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent);
  text-align: center;
  transition: all var(--transition-base);
}

.helpline-card:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.helpline-card strong {
  display: block;
  color: var(--text);
  margin-bottom: var(--space-sm);
  font-size: 15px;
  font-weight: 600;
}

.helpline-card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: color var(--transition-fast);
}

.helpline-card a:hover {
  color: var(--accent-hover);
}

/* ===== LITERATURE PAGE ===== */

/* View Mode Selector */
.view-mode-selector {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin: var(--space-xl) auto var(--space-lg);
  max-width: 600px;
  padding: var(--space-xs);
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.view-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
}

.view-mode-btn:hover {
  background: var(--panel);
  color: var(--text);
}

.view-mode-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: white;
  box-shadow: var(--shadow-sm);
}

.view-mode-btn i {
  font-size: 16px;
}

/* Literature Categories */
.literature-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.literature-category {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.category-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--border);
}

.category-title i {
  color: var(--accent);
  font-size: 22px;
}

.literature-grid {
  display: grid;
  gap: var(--space-sm);
  max-width: 900px;
  margin: 0 auto;
}

.literature-item {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition-base);
  gap: var(--space-md);
}

.literature-item:hover {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.literature-number {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.3px;
  text-align: center;
  line-height: 1.2;
  flex-shrink: 0;
}

.literature-details h3 {
  font-size: 15px;
  margin-bottom: 2px;
  color: var(--text);
  font-weight: 600;
}

.literature-details p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.more-literature-note {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--info);
}

.more-literature-note p {
  margin: 0;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.more-literature-note i {
  color: var(--info);
  font-size: 18px;
}

.more-literature-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.more-literature-note a:hover {
  text-decoration: underline;
}

/* Purchase Button in Header */
.purchase-button-header {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-md);
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid var(--accent);
  transition: all 0.3s ease;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow:
      0 0 10px rgba(0, 123, 255, 0.5),
      0 0 20px rgba(0, 123, 255, 0.3);
  }
  50% {
    box-shadow:
      0 0 20px rgba(0, 123, 255, 0.7),
      0 0 40px rgba(0, 123, 255, 0.5);
  }
}

.purchase-button-header:hover {
  background: linear-gradient(
    135deg,
    var(--primary-hover),
    var(--secondary-light)
  );
  transform: translateY(-2px);
  box-shadow:
    0 0 25px rgba(0, 123, 255, 0.9),
    0 0 50px rgba(0, 123, 255, 0.6);
}

.purchase-button-header i {
  font-size: 1.2rem;
}

/* ===== DICTIONARY FEATURE ===== */

/* Dictionary Toggle Button */
.dictionary-toggle {
  position: relative;
  transition: all 0.3s ease;
}

.dictionary-toggle.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 0 10px rgba(38, 166, 154, 0.4);
}

.dictionary-toggle.active::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  border: 2px solid var(--panel);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* Dictionary hint box */
.dictionary-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  background: rgba(93, 173, 226, 0.1);
  border: 1px solid rgba(93, 173, 226, 0.3);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text);
}

.hint-text {
  flex: 1;
  line-height: 1.4;
}

.hint-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--space-xs);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.hint-close:hover {
  background: rgba(93, 173, 226, 0.2);
  color: var(--primary);
}

.hint-close i {
  font-size: 0.875rem;
}

/* Dictionary-enabled reading text */
.reading-text.dictionary-enabled {
  cursor: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.reading-text.dictionary-enabled::selection {
  background: var(--primary-light);
  color: white;
}

/* Long press visual feedback for mobile */
.long-press-active {
  background: rgba(var(--primary-rgb), 0.15) !important;
  border-radius: 3px;
  transition: background 0.1s ease;
}

/* Dictionary Modal */
.dictionary-modal {
  z-index: 10000;
}

.dictionary-modal .modal-content {
  max-width: 550px;
  max-height: 75vh;
  overflow-y: auto;
}

.dictionary-modal-body {
  padding: var(--space-md) var(--space-lg);
  font-family: "Merriweather", Georgia, serif;
}

.dictionary-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  gap: var(--space-lg);
}

.dictionary-loading .spinner {
  width: 40px;
  height: 40px;
}

.dictionary-definition {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  font-family: "Merriweather", Georgia, serif;
}

.dictionary-word-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--primary);
  margin-bottom: var(--space-md);
}

.dictionary-word-header h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  text-transform: capitalize;
  margin: 0;
  font-family: "Open Sans", sans-serif;
}

.phonetic {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
}

.dictionary-origin {
  background: var(--surface);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 0.85rem;
  line-height: 1.5;
  border-left: 3px solid var(--secondary);
  font-family: "Lora", Georgia, serif;
}

.origin-label {
  font-weight: 600;
  color: var(--secondary);
}

.origin-label i {
  margin-right: var(--space-xs);
}

.origin-text {
  color: var(--text);
}

.meaning-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.part-of-speech {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--secondary);
  font-style: italic;
  margin-bottom: var(--space-xs);
  text-transform: lowercase;
}

.definition-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-left: var(--space-md);
}

.definition-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
  font-family: "Merriweather", Georgia, serif;
}

.example-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-left: var(--space-lg);
  padding: var(--space-xs) var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-sm);
  line-height: 1.5;
  font-style: italic;
  font-family: "Merriweather", Georgia, serif;
}

.example-text i {
  font-size: 0.7rem;
  opacity: 0.6;
  margin-right: var(--space-xs);
}

.synonyms-inline {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-left: var(--space-lg);
  margin-top: var(--space-xs);
}

.synonym-label {
  font-weight: 600;
  color: var(--primary);
}

.related-words {
  margin-top: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: baseline;
}

.related-words.synonyms {
  border-left: 3px solid var(--synonym-color);
}

.related-words.antonyms {
  border-left: 3px solid var(--antonym-color);
}

.related-label {
  font-weight: 600;
  white-space: nowrap;
}

.related-words.synonyms .related-label {
  color: var(--synonym-color);
}

.related-words.antonyms .related-label {
  color: var(--antonym-color);
}

.related-label i {
  font-size: 0.8rem;
  margin-right: var(--space-xs);
}

.related-list {
  color: var(--text-secondary);
  line-height: 1.5;
}

.dictionary-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.dictionary-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.dictionary-source {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.dictionary-source a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.dictionary-source a:hover {
  color: var(--primary);
}

.vocabulary-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.vocabulary-link:hover {
  color: var(--primary-dark);
}

.dictionary-action-buttons {
  display: flex;
  gap: var(--space-md);
}

.btn-save {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-save:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(38, 166, 154, 0.3);
}

.btn-save:disabled {
  background: var(--surface);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  border: 1px solid var(--border);
}

.btn-save.saved {
  background: var(--surface);
  color: var(--text-secondary);
  opacity: 0.6;
}

.btn-close-modal {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-close-modal:hover {
  background: var(--surface-hover);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

/* ===== VOCABULARY PAGE ===== */

.vocabulary-page {
  max-width: 1200px;
  margin: 0 auto;
}

.vocabulary-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.vocabulary-controls .search-box {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.vocabulary-controls .search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.1);
}

.vocabulary-controls .search-box i {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.vocabulary-controls .search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--text);
  outline: none;
}

.vocabulary-controls .search-box input::placeholder {
  color: var(--text-muted);
}

.vocabulary-controls .search-box-with-button {
  padding-right: var(--space-sm);
}

.vocabulary-controls .search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border: none;
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.vocabulary-controls .search-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(94, 173, 164, 0.4);
}

.vocabulary-controls .search-btn:active {
  transform: scale(0.95);
}

.vocabulary-controls .search-btn i {
  color: white;
  font-size: 0.9rem;
}

.search-box-wrapper {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.dictionary-source-vocab {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding-left: var(--space-lg);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.dictionary-source-vocab a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.dictionary-source-vocab a:hover {
  color: var(--primary);
}

.vocabulary-stats {
  display: flex;
  gap: var(--space-md);
}

.stat-badge {
  padding: var(--space-sm) var(--space-lg);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
}

.vocabulary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-xl);
}

.vocabulary-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  height: 500px;
  transition: all 0.3s ease;
  font-family: "Merriweather", Georgia, serif;
}

.vocabulary-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.vocabulary-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--border);
}

.word-title-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.word-title {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  text-transform: capitalize;
  margin: 0;
  font-family: "Open Sans", sans-serif;
}

.word-phonetic {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
}

.remove-btn {
  padding: var(--space-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.remove-btn:hover {
  background: var(--danger);
  color: white;
}

.vocabulary-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  flex: 1;
  overflow-y: auto;
  padding-right: var(--space-xs);
  margin-bottom: var(--space-md);
}

.vocabulary-card-body::-webkit-scrollbar {
  width: 8px;
}

.vocabulary-card-body::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: var(--radius-sm);
}

.vocabulary-card-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-sm);
}

.vocabulary-card-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.vocab-meaning-section {
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.vocab-meaning-section:last-child {
  border-bottom: none;
}

.vocab-part-of-speech-header {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
  font-style: italic;
  margin-bottom: var(--space-sm);
  text-transform: capitalize;
}

.vocab-definition {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
}

.vocab-definition-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

.vocab-example {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  padding: var(--space-xs) var(--space-sm);
  background: var(--surface);
  border-left: 3px solid var(--primary-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
}

.vocab-example i {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.6;
}

.vocab-origin {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border-left: 3px solid var(--secondary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.vocab-origin i {
  color: var(--secondary);
  margin-top: 2px;
  flex-shrink: 0;
}

.vocab-related-words {
  font-size: 0.85rem;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  margin-top: var(--space-xs);
}

.vocab-related-words.synonyms {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

.vocab-related-words.antonyms {
  background: rgba(var(--danger-rgb), 0.1);
  color: var(--danger);
  border-left: 3px solid var(--danger);
}

.vocab-related-words strong {
  font-weight: 600;
}

.vocabulary-card-footer {
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle);
}

.saved-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Card-specific tabs (smaller version for vocabulary cards) */
.card-tabs {
  margin: 0 0 12px 0;
  gap: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.card-tabs .dict-tab {
  padding: 8px 12px;
  font-size: 0.8em;
}

.card-tab-content {
  display: none;
}

.card-tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* Modal footer actions (unified save button) */
.modal-footer-actions {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  text-align: center;
  gap: var(--space-lg);
}

.empty-state i {
  font-size: 4rem;
  color: var(--text-muted);
  opacity: 0.5;
}

/* Mobile responsive styles for vocabulary and dictionary */
@media (max-width: 768px) {
  .vocabulary-page {
    overflow-y: auto;
    max-height: calc(100vh - 120px);
  }

  .vocabulary-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .vocabulary-card {
    height: auto;
    min-height: 300px;
    max-height: none;
  }

  .vocabulary-card-body {
    max-height: none;
    overflow-y: visible;
  }

  /* Compact dictionary modal buttons for mobile */
  .btn-save,
  .btn-close-modal {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
    gap: 4px;
  }

  .btn-save i,
  .btn-close-modal i {
    font-size: 0.75rem;
  }

  .dictionary-action-buttons {
    gap: var(--space-xs);
  }

  .dictionary-links {
    font-size: 0.65rem;
    flex-wrap: wrap;
  }
}

.empty-state h3 {
  font-size: 1.5rem;
  color: var(--text);
  margin: 0;
}

.empty-state p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0;
}

/* ===== RESOURCES PAGE ===== */

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.resource-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-xl);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.resource-card:hover {
  background: var(--surface);
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.resource-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: white;
  border-radius: var(--radius-lg);
  font-size: 32px;
  margin-bottom: var(--space-lg);
  transition: transform var(--transition-base);
}

.resource-card:hover .resource-icon {
  transform: scale(1.1) rotate(-5deg);
}

.resource-card h3 {
  font-size: 19px;
  margin-bottom: var(--space-sm);
  color: var(--text);
  font-weight: 600;
}

.resource-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.recovery-principles {
  background: var(--panel);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.recovery-principles h2 {
  font-size: 32px;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.recovery-principles > p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.principles-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.principle {
  padding: var(--space-xl);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
}

.principle:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.principle h4 {
  font-size: 20px;
  margin-bottom: var(--space-md);
  color: var(--accent);
  font-weight: 600;
}

.principle p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.7;
}

.key-message {
  font-size: 20px;
  color: var(--accent);
  font-weight: 600;
  padding: var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
}

/* ===== CONTACT PAGE ===== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.contact-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.contact-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--accent);
}

.contact-icon {
  font-size: 42px;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.contact-card h3 {
  font-size: 20px;
  margin-bottom: var(--space-md);
  color: var(--text);
  font-weight: 600;
}

.contact-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 16px;
  transition: color var(--transition-fast);
}

.contact-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.helpline-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.helpline-item {
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent);
  transition: all var(--transition-base);
}

.helpline-item:hover {
  background: var(--surface-hover);
  transform: translateX(4px);
}

.helpline-item strong {
  color: var(--text);
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 14px;
  font-weight: 600;
}

.helpline-item a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.helpline-item a:hover {
  text-decoration: underline;
}

.meeting-times {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.meeting-times p {
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-md);
  color: var(--text);
  border-left: 3px solid var(--accent);
  margin: 0;
  transition: all var(--transition-base);
}

.meeting-times p:hover {
  background: var(--surface-hover);
  transform: translateX(4px);
}

.meeting-times strong {
  color: var(--accent);
  font-weight: 600;
}

.welcome-message {
  margin: var(--space-2xl) 0;
}

.message-box {
  background: var(--panel);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.message-box h2 {
  font-size: 28px;
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.message-box p {
  margin-bottom: var(--space-md);
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 16px;
}

.message-box p.emphasis {
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
  font-size: 18px;
}

.support-section {
  margin: var(--space-2xl) 0;
}

.support-section h2 {
  font-size: 28px;
  margin-bottom: var(--space-xl);
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  font-weight: 700;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.support-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.support-item:hover {
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--accent);
}

.support-item i {
  font-size: 38px;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.support-item h4 {
  font-size: 18px;
  margin: var(--space-md) 0;
  color: var(--text);
  font-weight: 600;
}

.support-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.closing-message {
  text-align: center;
  padding: var(--space-2xl);
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  border-radius: var(--radius-xl);
  margin-top: var(--space-2xl);
  color: white;
  box-shadow: var(--shadow-lg);
}

.closing-message p {
  font-size: 22px;
  margin-bottom: var(--space-xl);
  color: white;
  font-weight: 600;
}

.closing-message .btn-primary {
  background: white;
  color: var(--accent);
}

.closing-message .btn-primary:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-3px) scale(1.05);
}

/* ===== SCROLLBARS ===== */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--surface);
  border-radius: 5px;
  transition: background var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  .app-header {
    padding: var(--space-md) var(--space-lg);
  }

  .header-title h1 {
    font-size: 22px;
  }

  .header-title p {
    font-size: 11px;
  }

  .header-logo {
    font-size: 26px;
  }

  .quick-access-bar {
    padding: var(--space-md) var(--space-lg);
  }

  .quick-access-item {
    padding: 10px 18px;
    font-size: 13px;
  }

  .quick-access-emoji {
    font-size: 20px;
  }

  .content-panel {
    padding: var(--space-lg) 0;
    overflow-x: hidden;
  }

  .home-section {
    padding: 1rem 0.25rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  .daily-readings-section {
    padding: 2rem 0.25rem;
    overflow-x: hidden;
  }

  .daily-readings-card {
    max-width: 100%;
    overflow-x: hidden;
  }

  .reading-container {
    max-width: 100%;
    overflow-x: hidden;
  }

  .reading-content {
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
  }

  .content-header h1 {
    font-size: 32px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .contact-grid,
  .support-grid,
  .resources-grid,
  .feature-grid,
  .meeting-grid,
  .hero-meeting-info,
  .key-info {
    grid-template-columns: 1fr;
  }

  .page-container {
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .cta-section h2 {
    font-size: 28px;
  }

  .cta-section p {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: var(--space-xl) 0;
  }

  .hero-title {
    font-size: 28px;
  }

  .btn-large {
    padding: 14px 24px;
    font-size: 15px;
  }

  /* Minimal padding/borders for daily readings on mobile */
  .daily-readings-section {
    padding: 0.5rem 1px;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  .daily-readings-card {
    padding: 0.5rem 1px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .daily-readings-header {
    margin-bottom: 0.75rem;
    padding: 0;
    position: relative;
    width: 100%;
  }

  .daily-readings-header h2 {
    font-size: 24px;
    padding-right: 36px;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
  }

  .readings-subtitle {
    font-size: 0.85rem;
    margin: 0.25rem 0 0 0;
  }

  .reading-container {
    border: none !important;
    padding: 0.5rem 1px !important;
    margin: 0 !important;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .reading-content {
    padding: 0;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  .reading-content * {
    max-width: 100%;
    box-sizing: border-box;
  }

  .reading-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--accent);
  }

  .reading-date {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
  }

  .reading-title {
    font-size: 1.35rem;
    margin: 0.5rem 0;
  }

  .reading-page {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }

  .reading-quote {
    font-size: 1.1rem;
    margin: 1rem 0.5rem;
    padding: 0.75rem;
    padding-left: 0.75rem;
    border-left-width: 3px;
  }

  .reading-buttons {
    gap: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  .reading-btn {
    min-width: 0;
    flex: 1;
    padding: 0.65rem 0.5rem;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .font-selector {
    margin-bottom: 0.75rem;
    padding: 0;
  }

  .font-selector label {
    font-size: 0.85rem;
  }

  .font-selector select {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }

  .close-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    font-size: 0.95rem;
    border-width: 1px;
  }

  .home-section {
    padding: 0.5rem 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .we-learn-carousel {
    margin: 0 0 1rem 0;
    padding: 2rem 0.75rem;
    border-radius: var(--radius-md);
    border: none !important;
  }

  .carousel-phrase {
    font-size: 22px;
    line-height: 1.5;
  }

  .carousel-citation {
    font-size: 14px;
  }
}

/* ========================================
   Social Connect Bar
   ======================================== */

.social-connect-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-md) 0 0 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-md);
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.social-connect-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.social-connect-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.social-connect-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  opacity: 0.6;
}

.social-icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: transform var(--transition-base);
}

.social-icon-link:hover {
  transform: translateY(-2px);
}

.social-icon-link:hover .social-icon-circle {
  box-shadow: var(--shadow-md);
}

.social-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow var(--transition-base);
  flex-shrink: 0;
}

.recoverly-icon-circle {
  background: #1a1a2e;
  border: 2px solid var(--accent);
}

.recoverly-icon-circle .social-icon-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.whatsapp-icon-circle {
  background: #25d366;
  border: 2px solid #128c7e;
  font-size: 24px;
  color: #fff;
}

@media (max-width: 480px) {
  .social-connect-bar {
    gap: var(--space-md);
  }

  .social-connect-label {
    font-size: 12px;
  }

  .social-icon-circle {
    width: 40px;
    height: 40px;
  }

  .recoverly-icon-circle .social-icon-img {
    width: 36px;
    height: 36px;
  }

  .whatsapp-icon-circle {
    font-size: 21px;
  }
}

/* ========================================
   Welcome Card (Welcome Message)
   ======================================== */

.welcome-card {
  max-width: 900px;
  margin: 0 auto var(--space-lg) auto;
  background: var(--panel);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.welcome-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.welcome-header {
  padding: var(--space-md) var(--space-xl) 0 var(--space-xl);
  text-align: center;
}

.welcome-header h2 {
  font-size: 42px;
  font-weight: var(--ui-heading-weight);
  letter-spacing: var(--ui-heading-spacing);
  text-transform: var(--ui-heading-transform);
  color: var(--text);
  margin: 0;
}

.welcome-content {
  padding: var(--space-sm) var(--space-xl) var(--space-xl) var(--space-xl);
  text-align: justify;
}

.welcome-text {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
  text-align:justify;
  font-family: var(--prose-font);
}

.welcome-text:last-of-type {
  margin-bottom: var(--space-md);
}

.welcome-text strong {
  color: var(--text);
}

.welcome-tagline {
  font-size: 18px;
  color: var(--accent);
  font-weight: 400;
  margin: 0;
  padding-bottom: 0;
  text-align: center;
}

/* ========================================
   App Download Badge
   ======================================== */

.app-download-badge {
  padding: 0 var(--space-xl) var(--space-lg) var(--space-xl);
  text-align: center;
}

.badge-content {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.badge-content:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.badge-new {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-inverse);
  background: rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.app-download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-inverse);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.app-download-btn:hover {
  opacity: 0.9;
  text-decoration: underline;
}

.app-download-btn i {
  font-size: 24px;
}

.badge-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

/* ========================================
   Carousel Card (We Learn / We Must)
   ======================================== */

.carousel-card {
  max-width: 900px;
  margin: 0 auto var(--space-xl) auto;
  background: var(--panel);
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.carousel-section {
  padding: var(--space-md);
  background: var(--panel);
}

.carousel-intro {
  font-family: "Lora", Georgia, serif;
  font-size: 20px;
  color: var(--accent);
  font-style: italic;
  text-align: center;
  margin: 0 0 var(--space-xs) 0;
  font-weight: 500;
  padding-bottom: 0;
}

/* Override carousel styles when inside carousel-card */
.carousel-card .we-learn-carousel {
  margin: 0;
  border-radius: var(--radius-md);
  border: none !important;
}

.carousel-card .carousel-controls {
  margin: var(--space-xs) auto 0 auto;
  padding-top: var(--space-md);
}

/* Carousel card styled like meeting-link */
.carousel-meeting-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--space-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: none;
  transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.carousel-meeting-card:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

/* Mobile responsive for welcome card */
@media (max-width: 768px) {
  .welcome-card {
    margin: 0 auto var(--space-xs) auto;
    border-radius: var(--radius-lg);
    padding: var(--space-sm);
  }

  .carousel-card {
    margin: 0 auto var(--space-xs) auto;
    border-radius: var(--radius-lg);
    padding: var(--space-xs);
  }

  .welcome-header {
    /* tighten header padding on mobile to reduce vertical gap */
    padding: var(--space-sm) var(--space-md) var(--space-xs) var(--space-md);
  }

  .welcome-header h2 {
    font-size: 28px;
  }

  .welcome-content {
    /* tighten padding on mobile so content sits closer to following sections */
    padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-sm);
  }

  .welcome-text {
    /* increase mobile welcome text by 2px (14 -> 16) for readability */
    font-size: 18px;
  }

  /* reduce final spacing under the welcome text on mobile */
  .welcome-text:last-of-type {
    margin-bottom: var(--space-xs);
  }

  /* reduce the welcome-card bottom margin to bring following content up */
  .welcome-card {
    margin: 0 auto var(--space-xs) auto;
  }

  .welcome-tagline {
    font-size: 16px;
  }

  .app-download-badge {
    padding: 0 var(--space-sm) var(--space-md) var(--space-sm);
  }

  .badge-content {
    padding: var(--space-sm) var(--space-md);
  }

  .badge-new {
    font-size: 12px;
  }

  .app-download-btn {
    font-size: 16px;
  }

  .app-download-btn i {
    font-size: 20px;
  }

  .badge-subtitle {
    font-size: 12px;
  }

  .carousel-section {
    padding-top: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-radius: var(--radius-lg);
  }

  .carousel-intro {
    font-size: 18px;
    padding: var(--space-xs);
  }
}

/* ========================================
   We Learn Carousel
   ======================================== */

.we-learn-carousel {
  max-width: 900px;
  margin: 0 auto 6px auto;
  padding: 8px var(--space-md);
  text-align: center;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border: none !important;
  box-shadow: none;
    box-shadow: none !important;
  transition: opacity 1.2s ease-in-out;
  opacity: 0;
}

.we-learn-carousel.visible {
  opacity: 1;
}

.we-learn-carousel.hidden {
  opacity: 0;
}

.carousel-content {
  width: 100%;
  margin: 0;
  padding: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.carousel-phrase {
  font-family: Lora, Georgia, "serif";
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  font-style: italic;
  margin: 0 0 4px 0;
  font-weight: 400;
  padding: 0;
}

.carousel-citation {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 400;
  margin: 0;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 8px auto 8px auto;
  padding: 4;
  max-width: 900px;
}

.carousel-control-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.carousel-control-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-control-btn:active {
  transform: scale(0.95);
}

.carousel-control-btn i {
  pointer-events: none;
}

/* ========================================
   Daily Readings Section
   ======================================== */

.daily-readings-section {
  padding: 3rem 2rem;
  background: linear-gradient(
    135deg,
    var(--bg-panel) 0%,
    var(--bg-widget) 100%
  );
}

.daily-readings-card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--border);
}

.daily-readings-header {
  position: relative;
  margin-bottom: 2rem;
}

.daily-readings-header h2 {
  font-size: 42px;
  font-weight: var(--ui-heading-weight);
  letter-spacing: var(--ui-heading-spacing);
  text-transform: var(--ui-heading-transform);
  margin: 0;
  margin-bottom: var(--space-md);
  padding-right: 50px;
  color: var(--text);
}

.readings-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0.5rem 0 0 0;
  font-weight: normal;
  opacity: 0.8;
}

.close-btn {
  background: rgba(var(--primary-color-rgb), 0.1);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.close-btn:hover {
  background: var(--accent);
  color: white;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.close-btn:active {
  transform: rotate(90deg) scale(0.95);
}

.reading-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.reading-btn {
  flex: 1;
  min-width: 200px;
  padding: 1rem 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(100, 150, 180, 0.4),
    rgba(120, 130, 160, 0.4)
  );
  color: var(--text-secondary);
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: var(--ui-heading-weight);
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-family: var(--ui-font);
  opacity: 0.7;
}

.reading-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(100, 150, 180, 0.6),
    rgba(120, 130, 160, 0.6)
  );
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0.85;
}

.reading-btn:active {
  transform: translateY(0);
}

.reading-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: white;
  border: 2px solid var(--accent);
  box-shadow: 0 6px 20px rgba(0, 86, 159, 0.5);
  font-weight: 600;
  opacity: 1;
  transform: translateY(-1px);
}

.reading-container {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--bg-panel);
  border-radius: 10px;
  border: 2px solid var(--accent);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-spinner {
  text-align: center;
  padding: 3rem 1rem;
}

.spinner {
  border: 4px solid rgba(74, 144, 226, 0.2);
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-spinner p {
  color: var(--text);
  font-size: 1.1rem;
}

.reading-content {
  color: var(--text);
}

.reading-content h3 {
  color: var(--text);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
  font-weight: 600;
}

.reading-content #readingText {
  line-height: 1.8;
  font-size: 1.05rem;
}

/* Reading element styles */
.reading-date {
  text-align: center;
  font-size: 1.425rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.reading-title {
  text-align: center;
  font-size: 1.525rem;
  color: var(--text);
  font-weight: 400;
  margin: 1rem 0;
}

.reading-page {
  text-align: center;
  font-size: 1.075rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.reading-book-badge {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(255, 122, 69, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  display: inline-block;
  margin: 0.5rem auto;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reading-quote {
  font-style: italic;
  font-size: 1.225rem;
  font-weight: 300;
  color: var(--text);
  margin: 1.5rem 2rem;
  padding-left: 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(255, 122, 69, 0.05);
  padding: 1rem;
  border-radius: 4px;
}

.reading-source {
  text-align: center;
  font-size: 1.025rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.reading-header-badges {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.book-badge-viewer {
  font-size: 0.85rem;
  font-weight: 600;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: white;
  white-space: nowrap;
}

.bookmark-badge {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
}

.bookmark-badge:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(255, 122, 69, 0.2);
}

.bookmark-badge.bookmarked {
  background: rgba(255, 122, 69, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.bookmark-badge.bookmarked:hover {
  background: rgba(255, 122, 69, 0.15);
}

.bookmark-badge i {
  font-size: 1em;
}

.reading-body {
  margin: 1.5rem 0;
  line-height: 1.7;
}

.reading-body p {
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--text);
  text-align: justify;
}

.reading-body p:not(:last-child) {
  margin-bottom: 1.5rem;
}

.reading-body p:first-of-type {
  margin-top: 0;
}

.reading-thought {
  margin: 2rem 10%;
  padding: 1.5rem;
  font-size: 1.125rem;
  font-weight: 300;
  background: rgba(255, 122, 69, 0.1);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent);
  font-style: italic;
  color: var(--text);
}

.reading-copyright {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.975rem;
  font-weight: 300;
}

/* Font Selector */
.font-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(var(--primary-color-rgb), 0.05);
  border-radius: var(--border-radius);
  margin: 1rem 0;
}

.font-selector label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.font-selector label i {
  color: var(--accent);
}

.font-selector select {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
}

.font-selector select:hover {
  border-color: var(--accent);
}

.font-selector select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

/* Reading Font Families */
.reading-container.font-lora .reading-content {
  font-family: "Lora", Georgia, serif;
}

.reading-container.font-merriweather .reading-content {
  font-family: "Merriweather", Georgia, serif;
}

.reading-container.font-open-sans .reading-content {
  font-family:
    "Open Sans",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

.reading-container.font-system .reading-content {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Default to Lora */
.reading-content {
  font-family: "Lora", Georgia, serif;
}

.error-message {
  color: var(--danger-color);
  background: rgba(220, 53, 69, 0.1);
  border: 2px solid var(--danger-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  font-size: 1.1rem;
}

/* ===== READING CONTROLS ===== */

.reading-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0 0 2px 0;
  border-top: none;
  border-bottom: none;
  align-items: center;
}

/* Top centered Return to Today button */
.today-btn-inline {
  padding: var(--space-xs) var(--space-md);
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-hover) 100%
  );
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
  animation: subtle-pulse 2s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.today-btn-inline:hover {
  background: linear-gradient(
    135deg,
    var(--accent-hover) 0%,
    var(--accent) 100%
  );
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
  animation: none;
}

.today-btn-inline:active {
  transform: translateY(0);
}

/* Mobile: Show button above navigation row */
@media (max-width: 768px) {
  .reading-header-badges {
    flex-direction: column;
    align-items: stretch;
  }

  .book-badge-viewer {
    text-align: center;
  }

  .today-btn-inline {
    order: -1;
    width: 100%;
    justify-content: center;
    margin-bottom: var(--space-sm);
  }

  .bookmark-badge {
    justify-content: center;
  }
}

/* Horizontal Day Navigation with Date in Center */
.day-navigation-horizontal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.nav-btn-side {
  font-family: var(--ui-font);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--primary);
  border: 2px solid var(--primary-dark);
  border-radius: var(--radius-md);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.nav-btn-side:hover {
  background: var(--primary-hover);
  border-color: var(--primary-dark);
  color: white;
  transform: scale(1.05);
}

.nav-btn-side:active {
  transform: scale(0.95);
}

.day-number-center {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  min-width: 200px;
  text-align: center;
}

/* Day Navigation (old layout - keep for compatibility) */
.day-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.nav-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: scale(1.05);
}

.nav-btn:active {
  transform: scale(0.95);
}

.day-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  flex: 1;
}

.day-number {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.today-btn {
  padding: var(--space-sm) var(--space-lg);
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-hover) 100%
  );
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow:
    0 4px 12px rgba(76, 175, 80, 0.3),
    0 0 0 0 rgba(76, 175, 80, 0.4);
  animation: subtle-pulse 2s ease-in-out infinite;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.today-btn:hover {
  background: linear-gradient(
    135deg,
    var(--accent-hover) 0%,
    var(--accent) 100%
  );
  transform: scale(1.08);
  box-shadow:
    0 6px 16px rgba(76, 175, 80, 0.4),
    0 0 0 0 rgba(76, 175, 80, 0.4);
  animation: none;
}

.today-btn:active {
  transform: scale(1.02);
}

@keyframes subtle-pulse {
  0%,
  100% {
    box-shadow:
      0 4px 12px rgba(76, 175, 80, 0.3),
      0 0 0 0 rgba(76, 175, 80, 0.4);
  }
  50% {
    box-shadow:
      0 4px 12px rgba(76, 175, 80, 0.3),
      0 0 0 8px rgba(76, 175, 80, 0);
  }
}

/* Reading Actions */
.reading-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.action-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.action-btn:active {
  transform: translateY(0);
}

.action-btn.bookmarked {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.action-btn.bookmarked:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Inline Font Selector in Reading Content */
.font-selector-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .font-selector-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .font-selector-inline .day-navigation-horizontal {
    order: 2;
    margin-top: var(--space-sm);
  }

  .font-selector-inline label,
  .font-selector-inline select {
    order: 1;
  }
}

.font-selector-inline label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.font-selector-inline select {
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.font-selector-inline select:hover {
  border-color: var(--primary);
}

.font-selector-inline select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* ===== SEARCH PANEL ===== */

/* Container to prevent page jump - always rendered but collapsed when not visible */
.search-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 0;
  margin: 0;
  border: 1px solid transparent;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition:
    max-height 0.3s ease-out,
    padding 0.3s ease-out,
    margin 0.3s ease-out,
    opacity 0.3s ease-out,
    visibility 0.3s ease-out;
}

/* When visible class is added */
.search-panel.visible {
  max-height: 600px;
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  border-color: var(--border);
  opacity: 1;
  visibility: visible;
}

.search-input-group {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.search-input {
  flex: 1;
  padding: var(--space-md);
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  transition: all var(--transition-base);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.1);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  padding: 0;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.search-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.search-btn:active {
  transform: scale(0.95);
}

/* ===== CALENDAR MODAL ===== */

.calendar-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.calendar-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 450px;
  max-width: 90%;
  animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  gap: var(--space-sm);
}

.calendar-header h4 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  text-align: center;
  min-width: 120px;
}

.calendar-nav-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text);
  font-size: 1rem;
}

.calendar-nav-btn:hover {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: white;
  transform: scale(1.05);
}

.calendar-close-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-muted);
  font-size: 1.2rem;
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
}

.calendar-close-btn:hover {
  background: var(--error, #dc3545);
  border-color: var(--error-dark, #c82333);
  color: white;
  transform: scale(1.05);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: var(--space-xs);
  text-transform: uppercase;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-xs);
  min-height: 280px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.calendar-day:hover:not(.empty) {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: scale(1.05);
}

.calendar-day.empty {
  background: transparent;
  border: none;
  cursor: default;
}

.calendar-day.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary-dark);
  font-weight: 700;
}

.calendar-day.today {
  border: 2px solid var(--accent);
  font-weight: 700;
}

.calendar-day.today.selected {
  background: var(--primary);
  border-color: var(--primary-dark);
}

/* ===== HELP MODAL ===== */

.help-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.help-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 600px;
  max-width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideIn 0.3s ease-out;
}

.help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--border);
}

.help-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.help-close-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.help-close-btn:hover {
  background: var(--error, #dc3545);
  border-color: var(--error-dark, #c82333);
  color: white;
  transform: scale(1.05);
}

.help-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.help-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.help-section h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border);
}

.help-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-sm);
  background: var(--panel);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.help-item:hover {
  background: var(--surface-hover);
  transform: translateX(4px);
}

.help-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  font-size: 1.2rem;
}

.help-text {
  flex: 1;
}

.help-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.help-text p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Mobile responsive for help modal */
@media (max-width: 768px) {
  .help-modal {
    width: 95%;
    max-height: 90vh;
    padding: var(--space-lg);
  }

  .help-header h3 {
    font-size: 1.3rem;
  }

  .help-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 1rem;
  }

  .help-text strong {
    font-size: 0.95rem;
  }

  .help-text p {
    font-size: 0.85rem;
  }
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
}

.search-results h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.search-result-item {
  padding: var(--space-md);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.search-result-item:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateX(4px);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xs);
  gap: var(--space-sm);
}

.result-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.result-badges {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.result-book-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: white;
  white-space: nowrap;
}

.result-bookmark-icon {
  color: var(--accent);
  font-size: 0.85rem;
  margin-left: var(--space-xs);
}

.result-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.no-results {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-muted);
  font-style: italic;
}

/* ===== DATE PICKER ===== */

.date-picker-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 0 var(--space-lg);
  margin: 0;
  border: 1px solid transparent;
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease-out,
    padding 0.3s ease-out,
    margin 0.3s ease-out;
}

.date-picker-panel.visible {
  max-height: 300px;
  padding: var(--space-xl);
  margin: var(--space-lg) 0;
  border-color: var(--border);
}

.date-picker-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
}

.date-input {
  padding: var(--space-lg);
  font-size: 1.125rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: transparent;
  transition: all var(--transition-base);
  font-family: inherit;
  width: 100%;
  max-width: 320px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-indent: -9999px;
  position: relative;
}

.date-input::before {
  content: "📅 Select a Date";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--text);
  text-indent: 0;
  font-size: 1.125rem;
  font-weight: 500;
  pointer-events: none;
}

.date-input:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(38, 166, 154, 0.15);
}

.date-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(38, 166, 154, 0.15);
  transform: scale(1.02);
}

/* Style the native date picker calendar icon */
.date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: var(--icon-filter, invert(0.5));
  font-size: 1.25rem;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.date-input::-webkit-calendar-picker-indicator:hover {
  background: rgba(38, 166, 154, 0.1);
  filter: var(--icon-filter-hover, invert(0.3));
}

/* ===== BOOKMARKS PANEL ===== */

.bookmarks-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  border: 1px solid var(--border);
  max-height: 500px;
  overflow-y: auto;
}

.bookmarks-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.bookmarks-panel h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.bookmarks-panel .clear-btn {
  padding: var(--space-xs) var(--space-md);
  background: var(--error, #dc3545);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.bookmarks-panel .clear-btn:hover {
  background: var(--error-dark, #c82333);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.bookmarks-panel .clear-btn i {
  font-size: 0.9em;
}

.bookmark-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.bookmark-item:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateX(4px);
}

.bookmark-type {
  padding: var(--space-xs) var(--space-sm);
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.bookmark-day {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 60px;
}

.bookmark-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.no-bookmarks {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-muted);
  font-style: italic;
}

/* ===== HISTORY PANEL ===== */

.history-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  border: 1px solid var(--border);
  max-height: 500px;
  overflow-y: auto;
}

.history-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.history-panel h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.history-panel .clear-btn {
  padding: var(--space-xs) var(--space-md);
  background: var(--error, #dc3545);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.history-panel .clear-btn:hover {
  background: var(--error-dark, #c82333);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.history-panel .clear-btn i {
  font-size: 0.9em;
}

.history-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: 60px;
}

.history-item:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateX(4px);
}

.history-type {
  padding: var(--space-xs) var(--space-sm);
  background: var(--secondary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.history-day {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 60px;
}

.history-title-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.history-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
}

.history-bookmark-icon {
  color: var(--accent);
  font-size: 0.9rem;
}

.no-history {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-muted);
  font-style: italic;
}

/* ===== READING CONTENT ENHANCEMENTS ===== */

.reading-header {
  margin-bottom: var(--space-lg);
  text-align: center;
}

.reading-content .just-for-today {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  font-style: italic;
}

.reading-content .just-for-today strong {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--accent);
  font-style: normal;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
  .reading-controls {
    padding: 0;
    margin: 0 0 2px 0;
    gap: 4px;
  }

  .day-navigation {
    flex-wrap: wrap;
  }

  .nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .day-number {
    font-size: 1rem;
  }

  .reading-actions {
    flex-wrap: wrap;
  }

  .action-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .search-panel,
  .bookmarks-panel,
  .history-panel {
    padding: var(--space-md);
    margin: var(--space-md) 0;
  }

  .search-input {
    font-size: 0.95rem;
    padding: var(--space-sm);
  }

  .bookmark-item,
  .history-item {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .bookmark-day,
  .history-day {
    min-width: auto;
  }
}

/* ===== SCROLLBAR STYLING ===== */

.search-results::-webkit-scrollbar,
.history-panel::-webkit-scrollbar {
  width: 8px;
}

.search-results::-webkit-scrollbar-track,
.history-panel::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: var(--radius-sm);
}

.search-results::-webkit-scrollbar-thumb,
.history-panel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-sm);
}

/* ========================================
   Seventh Tradition Page
   ======================================== */

.seventh-tradition-section {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xl);
}

.tradition-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.tradition-title {
  font-size: 2rem;
  font-weight: var(--ui-heading-weight);
  letter-spacing: var(--ui-heading-spacing);
  text-transform: var(--ui-heading-transform);
  color: var(--text);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.tradition-emoji {
  font-size: 2.5rem;
}

.tradition-content {
  background: var(--panel);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.tradition-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: var(--space-lg);
}

.tradition-principle {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text);
  border-left: 4px solid var(--accent);
  padding-left: var(--space-lg);
  margin-bottom: var(--space-xl);
  background: var(--surface);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
}

.subsection-title {
  font-size: 1.5rem;
  color: var(--accent);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-lg);
  border-bottom: 2px solid var(--border);
  padding-bottom: var(--space-sm);
}

.tradition-list {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0;
}

.tradition-list li {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
  position: relative;
}

.tradition-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: bold;
}

.tradition-message {
  font-size: 1.15rem;
  padding: var(--space-lg);
  background: var(--surface);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--secondary);
  margin-top: var(--space-xl);
}

.contribution-section {
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 2px solid var(--border);
}

.cashapp-button-container {
  display: flex;
  justify-content: center;
  margin: var(--space-xl) 0;
}

.cashapp-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(135deg, #00d632, #00b828);
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 12px rgba(0, 214, 50, 0.3);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.cashapp-button:hover {
  background: linear-gradient(135deg, #00b828, #009622);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 214, 50, 0.4);
}

.cashapp-button:active {
  transform: translateY(0);
}

.cashapp-button i {
  font-size: 1.4rem;
}

.contribution-note {
  text-align: center;
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Recoverly App Section */
.recoverly-app-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border-color, rgba(255,255,255,0.1));
}

.recoverly-app-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.recoverly-squircle-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 40%, #ef4444 70%, #f97316 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.recoverly-icon-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.recoverly-app-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.recoverly-app-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.recoverly-app-tagline {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.google-play-badge-link {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.google-play-badge-link:hover {
  transform: scale(1.04);
  opacity: 0.9;
}

.google-play-badge-img {
  height: 56px;
  width: auto;
  display: block;
}

/* Modal Overlay and Base Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  margin: var(--space-lg);
  animation: slideUp 0.3s ease-out;
  border: 1px solid var(--border);
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.modal-close:hover {
  color: var(--text);
  background: var(--surface);
}

.modal-body {
  padding: var(--space-xl);
}

.modal-question {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.modal-note {
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  margin: 0;
}

.modal-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.modal-btn {
  padding: var(--space-md) var(--space-xl);
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 140px;
}

.modal-btn-no {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
}

.modal-btn-no:hover {
  background: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-btn-yes {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  color: white;
  border: 2px solid var(--accent);
}

.modal-btn-yes:hover {
  background: linear-gradient(
    135deg,
    var(--primary-hover),
    var(--secondary-light)
  );
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 86, 159, 0.4);
}

/* Thank You Modal */
.thank-you-modal {
  max-width: 450px;
}

.thank-you-content {
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.thank-you-icon {
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: var(--space-lg);
  animation: heartBeat 1s ease-in-out;
}

@keyframes heartBeat {
  0%,
  100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.2);
  }
  50% {
    transform: scale(1);
  }
  75% {
    transform: scale(1.1);
  }
}

.thank-you-content h3 {
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.thank-you-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.redirect-note {
  font-style: italic;
  color: var(--accent);
  margin-top: var(--space-md);
}

/* Declined Modal */
.declined-modal {
  max-width: 500px;
}

.declined-content {
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.declined-icon {
  font-size: 3.5rem;
  color: var(--secondary);
  margin-bottom: var(--space-lg);
}

.declined-content h3 {
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: var(--space-lg);
}

.declined-content p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.declined-content p:last-child {
  margin-bottom: 0;
}

/* Mobile responsive for Seventh Tradition */
@media (max-width: 768px) {
  .seventh-tradition-section {
    padding: var(--space-lg);
  }

  .tradition-title {
    font-size: 1.5rem;
  }

  .tradition-emoji {
    font-size: 2rem;
  }

  .tradition-content {
    padding: var(--space-lg);
  }

  .tradition-content p,
  .tradition-list li {
    font-size: 1rem;
  }

  .cashapp-button {
    font-size: 1rem;
    padding: var(--space-md) var(--space-lg);
  }

  .modal-content {
    margin: var(--space-md);
    max-width: calc(100% - 2rem);
  }

  .modal-question {
    font-size: 1.15rem;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-btn {
    width: 100%;
    min-width: auto;
  }

  .thank-you-icon,
  .declined-icon {
    font-size: 3rem;
  }

  .thank-you-content h3,
  .declined-content h3 {
    font-size: 1.4rem;
  }

  /* Purchase button mobile */
  .purchase-section {
    padding: var(--space-lg);
  }

  .purchase-button {
    font-size: 1.1rem;
    padding: var(--space-md) var(--space-lg);
    flex-direction: column;
    gap: var(--space-sm);
  }

  .purchase-button i {
    font-size: 1.3rem;
  }

  .purchase-note {
    font-size: 0.9rem;
  }
}

.search-results::-webkit-scrollbar-thumb:hover,
.history-panel::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Weekly Meeting Schedule Card */
.schedule-loading,
.schedule-empty {
  color: var(--text-secondary);
  font-size: 14px;
  padding: var(--space-sm) 0;
  font-family: var(--prose-font);
}

.schedule-loading i {
  color: var(--accent);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.3;
}

.schedule-table thead tr {
  border-bottom: 2px solid var(--border);
}

.schedule-table th {
  text-align: left;
  padding: 4px 8px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.schedule-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
}

.schedule-table tbody tr:last-child {
  border-bottom: none;
}

.schedule-table tbody tr:hover {
  background: var(--bg-hover, rgba(255,255,255,0.04));
}

.schedule-table td {
  padding: 4px 8px;
  color: var(--text);
  line-height: 1.3;
  vertical-align: top;
}

.schedule-day {
  font-weight: 600;
  color: var(--accent) !important;
  white-space: nowrap;
}

.schedule-topic {
  font-family: var(--prose-font);
  color: var(--text-secondary) !important;
}

/* Recoverly Promo Card (Home page) */
.recoverly-promo-section {
  padding: 0 var(--space-xl) 2rem var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.recoverly-promo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.recoverly-promo-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.recoverly-promo-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}

.recoverly-promo-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.recoverly-promo-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recoverly-promo-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.recoverly-promo-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.recoverly-promo-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

.recoverly-promo-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.recoverly-promo-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.recoverly-promo-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.recoverly-promo-features li i {
  color: var(--accent);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.recoverly-promo-badge-link {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.recoverly-promo-badge-link:hover {
  transform: scale(1.04);
  opacity: 0.9;
}

.recoverly-promo-play-badge {
  height: 36px;
  width: auto;
  display: block;
}

@media (max-width: 600px) {
  .recoverly-promo-section {
    padding: 0 var(--space-md) 1.5rem var(--space-md);
  }

  .recoverly-promo-card {
    padding: 1.25rem;
    gap: 1rem;
  }

  .recoverly-promo-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
  }

  .recoverly-promo-name {
    font-size: 1.25rem;
  }

  .recoverly-promo-features {
    grid-template-columns: 1fr;
  }

  .recoverly-promo-play-badge {
    height: 30px;
  }
}

/* Universal Footer */
.universal-footer {
  margin-top: 4rem;
  padding: 2rem 0 1rem 0;
  text-align: center;
}

.footer-separator {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 auto 1rem auto;
  max-width: 200px;
}

.universal-footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
  margin: 0;
}

/* ===== FONT PREVIEW DROPDOWN (TEMPORARY) ===== */
.font-preview-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.font-preview-toggle {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition:
    background 0.2s,
    transform 0.2s;
}

.font-preview-toggle:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.font-preview-panel {
  background: var(--dark-panel);
  border: 1px solid var(--dark-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  min-width: 220px;
}

.font-preview-panel h4 {
  color: var(--dark-text);
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
}

.font-preview-panel label {
  display: block;
  color: var(--dark-text-secondary);
  font-size: 12px;
  margin: 12px 0 6px 0;
}

.font-preview-panel label:first-of-type {
  margin-top: 0;
}

.font-preview-panel select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--dark-border);
  background: var(--dark-surface);
  color: var(--dark-text);
  font-size: 14px;
  cursor: pointer;
}

.font-preview-panel select:focus {
  outline: none;
  border-color: var(--primary);
}

.font-preview-panel .checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.font-preview-panel .checkbox-row input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.font-preview-panel .checkbox-row span {
  color: var(--dark-text);
  font-size: 13px;
}

.font-preview-panel .current-font {
  color: var(--dark-text-secondary);
  font-size: 12px;
  margin-top: 8px;
}

.font-preview-panel .note {
  color: var(--dark-text-muted);
  font-size: 11px;
  margin-top: 12px;
  font-style: italic;
}

/* ===== DICTIONARY CONTENT STYLES ===== */
/* Note: Modal wrapper styles are defined with .modal-overlay.dictionary-modal above */

.dictionary-header {
  background: transparent;
  border-bottom: 1px solid rgba(74, 144, 226, 0.12);
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dictionary-header h3 {
  margin: 0;
  color: #4a90e2;
  font-size: 0.85em;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.dictionary-icon {
  font-size: 1.1em;
}

.dictionary-close-btn {
  background: none;
  border: none;
  color: rgba(74, 144, 226, 0.6);
  font-size: 1.8em;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.dictionary-close-btn:hover {
  color: #4a90e2;
  background: rgba(74, 144, 226, 0.1);
}

.dictionary-body {
  padding: 24px;
  max-height: calc(85vh - 65px);
  overflow-y: auto;
  color: #c8c8c8;
}

.dictionary-body::-webkit-scrollbar {
  width: 6px;
}

.dictionary-body::-webkit-scrollbar-track {
  background: transparent;
}

.dictionary-body::-webkit-scrollbar-thumb {
  background: rgba(74, 144, 226, 0.3);
  border-radius: 3px;
}

.dictionary-body::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 144, 226, 0.5);
}

.dictionary-loading {
  text-align: center;
  padding: 50px 20px;
}

.dictionary-loading p {
  color: #666;
  font-size: 0.9em;
  letter-spacing: 1px;
  margin: 0;
}

.dictionary-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(74, 144, 226, 0.15);
  border-top-color: #4a90e2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.dictionary-word-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(74, 144, 226, 0.1);
}

.dictionary-word-header h2 {
  color: #fff;
  margin: 0 0 6px 0;
  font-size: 2em;
  font-weight: 300;
  letter-spacing: 1px;
}

.dictionary-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(74, 144, 226, 0.2);
}

.dict-tab {
  flex: 1;
  padding: 14px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #666;
  font-size: 0.9em;
  font-weight: 400;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.dict-tab:hover {
  color: #999;
  background: rgba(74, 144, 226, 0.03);
}

.dict-tab.active {
  color: #4a90e2;
  border-bottom-color: #4a90e2;
  background: rgba(74, 144, 226, 0.05);
}

.dict-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.dict-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.phonetic {
  display: inline-block;
  color: #4a90e2;
  font-style: italic;
  margin-bottom: 16px;
  font-size: 0.95em;
}

.meaning-section {
  margin-bottom: 24px;
}

.part-of-speech {
  color: #4a90e2;
  font-size: 0.9em;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(74, 144, 226, 0.15);
}

.definition-item {
  margin-bottom: 16px;
}

.definition-text {
  color: #d0d0d0;
  line-height: 1.7;
  margin-bottom: 8px;
}

.example-text {
  color: #888;
  font-style: italic;
  padding-left: 20px;
  margin: 6px 0;
  border-left: 2px solid rgba(74, 144, 226, 0.3);
  font-size: 0.9em;
}

.related-words {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.9em;
}

.related-words.synonyms {
  background: rgba(76, 175, 80, 0.08);
  border-left: 3px solid rgba(76, 175, 80, 0.4);
}

.related-words.antonyms {
  background: rgba(255, 87, 34, 0.08);
  border-left: 3px solid rgba(255, 87, 34, 0.4);
}

.related-label {
  color: #888;
  font-weight: 500;
  margin-right: 6px;
}

.related-list {
  color: #b0b0b0;
}

.dict-suggestions {
  text-align: center;
  padding: 20px;
}

.dict-suggestions p {
  color: #888;
  margin-bottom: 16px;
}

.dict-suggestions ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.dict-suggestions li {
  background: rgba(74, 144, 226, 0.1);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.9em;
}

.dict-suggestions li a,
.dict-suggestion-link {
  color: #4a90e2;
  text-decoration: none;
  transition: color 0.3s ease;
}

.dict-suggestion-link:hover {
  color: #6fb3ff;
  text-decoration: underline;
}

.dict-no-result {
  text-align: center;
  padding: 40px 20px;
}

.dict-no-result p {
  color: #666;
  margin-bottom: 20px;
  font-style: italic;
}

.dictionary-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(74, 144, 226, 0.1);
  text-align: center;
}

.mw-link-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(74, 144, 226, 0.8);
  text-decoration: none;
  font-size: 0.85em;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.mw-link-inline:hover {
  color: #4a90e2;
  background: rgba(74, 144, 226, 0.08);
}

.mw-icon {
  opacity: 0.8;
}

.mw-arrow {
  opacity: 0.6;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.mw-link-inline:hover .mw-arrow {
  transform: translateX(4px);
  opacity: 1;
}

.dictionary-footer .mw-link-inline.small {
  font-size: 0.8em;
  padding: 8px 14px;
  opacity: 0.7;
}

.dictionary-footer .mw-link-inline.small:hover {
  opacity: 1;
}

.dictionary-error {
  text-align: center;
  padding: 40px 20px;
}

.error-message {
  color: #f87171;
  font-size: 1.1em;
  margin-bottom: 12px;
}

.error-hint {
  color: #888;
  font-style: italic;
  margin-bottom: 24px;
}

.mw-inline-link {
  color: #4a90e2 !important;
  text-decoration: none;
  border-bottom: 1px dotted rgba(74, 144, 226, 0.5);
  padding-bottom: 1px;
  transition: all 0.2s ease;
}

.mw-inline-link:hover {
  color: #6fb3ff !important;
  border-bottom-color: #6fb3ff;
  text-decoration: none;
}

/* ===== LIGHT THEME - DICTIONARY MODAL OVERRIDES ===== */
.light-theme .modal-content {
  background: var(--panel);
}

.light-theme .modal-header h3 {
  color: var(--text);
}

.light-theme .dictionary-word-header h2 {
  color: var(--text);
}

.light-theme .dict-tab {
  color: var(--text-secondary);
}

.light-theme .dict-tab:hover {
  color: var(--text);
  background: rgba(74, 144, 226, 0.06);
}

.light-theme .dict-tab.active {
  color: var(--primary);
  background: rgba(74, 144, 226, 0.08);
}

.light-theme .definition-text {
  color: var(--text);
}

.light-theme .example-text {
  color: var(--text-secondary);
}

.light-theme .related-label {
  color: var(--text-secondary);
}

.light-theme .related-list {
  color: var(--text);
}

.light-theme .phonetic {
  color: var(--primary);
}

.light-theme .part-of-speech {
  color: var(--primary);
}

.light-theme .dict-suggestions p {
  color: var(--text-secondary);
}

.light-theme .dict-suggestions li {
  background: rgba(74, 144, 226, 0.1);
  color: var(--text);
}

.light-theme .dict-no-result p {
  color: var(--text-secondary);
}

.light-theme .dictionary-source,
.light-theme .dictionary-source span {
  color: var(--text-secondary);
}

.light-theme .dictionary-loading p {
  color: var(--text-secondary);
}

.light-theme .close-btn {
  color: var(--text-secondary);
}

.light-theme .close-btn:hover {
  color: var(--text);
}

.light-theme .origin-text {
  color: var(--text);
}

.light-theme .dictionary-origin {
  background: var(--surface);
}

.light-theme .related-words.synonyms {
  background: rgba(76, 175, 80, 0.1);
}

.light-theme .related-words.antonyms {
  background: rgba(255, 87, 34, 0.1);
}

.light-theme .error-hint {
  color: var(--text-secondary);
}
