/* ==========================================================================
   ARABIC WEB NOVEL READER - STYLES
   Tailored for Mobile-first, Dark Mode, RTL, High Legibility
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cairo:wght@400;600;700;800;900&family=Tajawal:wght@400;500;700&display=swap');

:root {
  /* Theme: Dark Night (matches user screenshots) */
  --bg-primary: #0a0d14;
  --bg-secondary: #101522;
  --bg-card: #131a29;
  --bg-card-hover: #182236;
  --border-color: #212c42;
  --border-light: #2b3954;
  
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #c084fc;
  
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-glow: rgba(139, 92, 246, 0.4);
  --primary-bg: rgba(139, 92, 246, 0.12);
  
  --accent-gold: #fbbf24;
  --danger: #ef4444;
  --success: #10b981;
  
  /* Reading Preferences (dynamic via JS) */
  --reader-font-size: 19px;
  --reader-line-height: 2.0;
  --reader-font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  --reader-letter-spacing: 0.2px;
  --reader-paragraph-gap: 1.35rem;

  --safe-bottom: env(safe-area-inset-bottom, 16px);
  --safe-top: env(safe-area-inset-top, 16px);
}

/* AMOLED Pitch Black Theme */
[data-theme="amoled"] {
  --bg-primary: #000000;
  --bg-secondary: #080808;
  --bg-card: #0d0d0d;
  --bg-card-hover: #141414;
  --border-color: #1a1a1a;
  --border-light: #262626;
  --text-primary: #ededed;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --text-accent: #c084fc;
  --primary: #9333ea;
  --primary-glow: rgba(147, 51, 234, 0.35);
  --primary-bg: rgba(147, 51, 234, 0.15);
}

/* Sepia Paper Theme */
[data-theme="sepia"] {
  --bg-primary: #f5eedb;
  --bg-secondary: #ede3cc;
  --bg-card: #e4d7bd;
  --bg-card-hover: #dcceb1;
  --border-color: #d1be9c;
  --border-light: #c2aa82;
  --text-primary: #2d2417;
  --text-secondary: #574630;
  --text-muted: #826e54;
  --text-accent: #854d0e;
  --primary: #b45309;
  --primary-hover: #92400e;
  --primary-glow: rgba(180, 83, 9, 0.25);
  --primary-bg: rgba(180, 83, 9, 0.1);
}

/* Modern Light Theme */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-accent: #7c3aed;
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-glow: rgba(124, 58, 237, 0.2);
  --primary-bg: rgba(124, 58, 237, 0.08);
}

/* Base Reset & Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: var(--reader-font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  min-height: 100%;
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
  padding-bottom: calc(75px + var(--safe-bottom));
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Top Progress Bar for Screen Scroll */
#scroll-progress-line {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #c084fc, #8b5cf6, #3b82f6);
  z-index: 1000;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--primary-glow);
}

/* Main Container */
.app-container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 14px;
}

/* View Sections */
.view-section {
  display: none;
  animation: fadeIn 0.25s ease;
}

.view-section.active {
  display: block;
}

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

/* ==========================================================================
   HEADER COMPONENT (Matching User Screenshot 1)
   ========================================================================== */
.chapter-header-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 18px 14px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

/* Top Navigation Pills */
.nav-pills-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.pill-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  user-select: none;
}

.pill-btn:active, .pill-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.pill-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.pill-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* Action Icons Row */
.action-icons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.action-icon-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.action-icon-btn:hover, .action-icon-btn:active {
  color: var(--text-primary);
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: scale(1.05);
}

.action-icon-btn.active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.action-icon-btn svg {
  width: 20px;
  height: 20px;
}

/* Volume Badge */
.volume-badge-wrap {
  text-align: center;
  margin-bottom: 12px;
}

.volume-badge {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 18px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

/* Chapter Title */
.chapter-main-title {
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-primary);
  line-height: 1.45;
  margin: 0 4px 16px 4px;
}

/* Diamond Divider */
.diamond-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 18px 0;
  color: var(--border-light);
  gap: 14px;
}

.diamond-divider::before, .diamond-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

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

/* Meta Info Card (3 columns) */
.chapter-meta-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 8px;
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: center;
  text-align: center;
  gap: 4px;
  margin-bottom: 16px;
}

.meta-column {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.meta-column:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: var(--border-color);
}

.meta-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
}

.meta-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.translator-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Chapter Progress Bar */
.chapter-progress-wrap {
  text-align: center;
  margin-top: 10px;
}

.chapter-progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 7px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  border-radius: 999px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ==========================================================================
   CHAPTER CONTENT (Matching User Screenshot 2)
   ========================================================================== */
.chapter-body-container {
  padding: 6px 4px 30px 4px;
}

.chapter-first-header {
  font-size: calc(var(--reader-font-size) * 1.12);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  text-align: right;
}

.chapter-paragraph {
  font-size: var(--reader-font-size);
  line-height: var(--reader-line-height);
  letter-spacing: var(--reader-letter-spacing);
  margin-bottom: var(--reader-paragraph-gap);
  color: var(--text-primary);
  text-align: justify;
  text-justify: inter-word;
  transition: background-color 0.2s ease;
  border-radius: 6px;
  padding: 2px 4px;
}

/* Speaking highlight when TTS audio is active */
.chapter-paragraph.speaking-now {
  background: var(--primary-bg);
  border-right: 3px solid var(--primary);
  padding-right: 8px;
}

/* Quote Dialogues */
.chapter-paragraph.dialogue {
  color: var(--text-primary);
}

/* Footnote Link In Text */
.footnote-ref {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-accent);
  background: var(--primary-bg);
  border: 1px solid rgba(192, 132, 252, 0.3);
  font-size: 0.72em;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  margin: 0 3px;
  cursor: pointer;
  vertical-align: baseline;
  position: relative;
  top: -0.3em;
  transition: all 0.15s ease;
}

.footnote-ref:hover, .footnote-ref:active {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
}

/* Footnotes Section at End of Chapter */
.footnotes-end-section {
  margin-top: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 16px;
}

.footnotes-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footnote-item {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.footnote-item-num {
  font-weight: 800;
  color: var(--primary);
  min-width: 28px;
}

/* Bottom Chapter Navigation */
.chapter-bottom-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 30px 0 20px 0;
}

.nav-large-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.nav-large-btn:hover, .nav-large-btn:active {
  background: var(--bg-card-hover);
  border-color: var(--primary);
}

.nav-large-btn .btn-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   NOVEL HOMEPAGE & INDEX VIEW
   ========================================================================== */
.novel-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.novel-hero-layout {
  display: flex;
  gap: 16px;
  align-items: center;
}

.novel-cover-img {
  width: 120px;
  height: 165px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.novel-hero-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.novel-hero-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.3;
}

.novel-hero-en {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: system-ui, sans-serif;
  direction: ltr;
  text-align: right;
}

.novel-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.novel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.novel-tag {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--text-secondary);
}

/* Continue Reading Banner */
.continue-reading-banner {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.continue-reading-banner:active, .continue-reading-banner:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.continue-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.continue-label {
  font-size: 0.78rem;
  color: var(--text-accent);
  font-weight: 700;
}

.continue-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

.continue-btn {
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Stats Counter Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

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

/* Chapter Search & Filters */
.chapter-search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.search-input-wrap {
  flex: 1;
  position: relative;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 38px 12px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}

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

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.sort-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

/* Chapter List Grid */
.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-item-link {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.chapter-item-link:active, .chapter-item-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateX(-3px);
}

.chapter-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chapter-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chapter-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

.chapter-item-arrow {
  color: var(--text-muted);
}

/* ==========================================================================
   FIXED MOBILE BOTTOM BAR (Kindle/Reader Style)
   ========================================================================== */
.fixed-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(16, 21, 34, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  padding: 8px 16px calc(8px + var(--safe-bottom)) 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  transition: transform 0.3s ease;
}

.bottom-bar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.bottom-bar-btn svg {
  width: 22px;
  height: 22px;
}

.bottom-bar-btn:active, .bottom-bar-btn:hover {
  color: var(--primary);
}

.bottom-scroll-percent {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* ==========================================================================
   MODALS, DRAWERS & BOTTOM SHEETS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.bottom-sheet {
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 20px 18px calc(24px + var(--safe-bottom)) 18px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .bottom-sheet {
  transform: translateY(0);
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sheet-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.sheet-close-btn {
  color: var(--text-muted);
  padding: 6px;
  border-radius: 8px;
}

/* Settings Controls Inside Sheet */
.setting-row {
  margin-bottom: 18px;
}

.setting-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}

.setting-btn-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.setting-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 4px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.82rem;
  text-align: center;
}

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

.font-size-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 12px;
}

.font-size-btn {
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.font-size-val {
  flex: 1;
  text-align: center;
  font-weight: 700;
  color: var(--primary);
}

/* TTS Floating Audio Bar */
.tts-player-bar {
  position: fixed;
  bottom: calc(64px + var(--safe-bottom));
  left: 12px;
  right: 12px;
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: 16px;
  padding: 10px 14px;
  display: none;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 12px var(--primary-glow);
  z-index: 99;
  animation: slideUp 0.25s ease;
}

.tts-player-bar.active {
  display: flex;
}

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

.tts-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tts-wave {
  width: 18px;
  height: 18px;
  color: var(--primary);
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  from { transform: scale(0.9); opacity: 0.6; }
  to { transform: scale(1.1); opacity: 1; }
}

.tts-title {
  font-size: 0.85rem;
  font-weight: 700;
}

.tts-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tts-ctrl-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

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

/* Toast Message */
.toast-msg {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: var(--bg-card);
  border: 1px solid var(--primary);
  color: var(--text-primary);
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}

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

/* Loading Spinner */
.spinner-wrap {
  text-align: center;
  padding: 40px 0;
}

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

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