/* Custom Properties / Design Tokens */
:root {
  --bg-deep: #080c14;
  --bg-surface: #101524;
  --bg-panel: rgba(18, 24, 41, 0.65);
  --bg-input: rgba(8, 12, 22, 0.8);
  
  --border-color: rgba(255, 255, 255, 0.07);
  
  --accent-blue: #00d2ff;
  --accent-blue-glow: rgba(0, 210, 255, 0.25);
  --accent-orange: #ff9d00;
  --accent-orange-glow: rgba(255, 157, 0, 0.25);
  
  --text-main: #d1d6e6;
  --text-muted: #8e9bb3;
  --text-highlight: #ffffff;
  
  --danger-color: #ff4a5a;
  
  --sidebar-width: 330px;
  --checklist-width: 310px;
  --header-height: 85px;
  
  --font-family-body: 'Outfit', sans-serif;
  --font-family-title: 'Orbitron', sans-serif;
  
  --shadow-glass: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

/* Global Reset & Base Styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Clip off-canvas drawers (position:fixed) so they never widen the page.
   Fixed elements escape body's overflow:hidden, so we clip at the root. */
html {
  overflow-x: hidden;
}

body {
  font-family: var(--font-family-body);
  background-color: var(--bg-deep);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  line-height: 1.6;
  position: relative;
}

/* Space Nebula Glowing Orbs (Soft, clean backdrops) */
.radial-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.04) 0%, rgba(255, 157, 0, 0.02) 45%, transparent 75%);
  z-index: -1;
  pointer-events: none;
}

/* Custom Scrollbars — only on fine pointers (mouse/trackpad).
   On touch the 4px thumb is unusable, so we fall back to the native scrollbar. */
@media (pointer: fine) {
  ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }
  ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
  }
  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
  }
}

/* App Layout Container */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Header Styling (Clean & Minimalist) */
.app-header {
  height: var(--header-height);
  background: rgba(8, 12, 20, 0.8);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.zohar-icon {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 0 8px var(--accent-orange-glow));
}

.zohar-poly {
  fill: none;
  stroke: var(--accent-orange);
  stroke-width: 2.5;
}

.zohar-inner {
  fill: rgba(255, 157, 0, 0.05);
  stroke: var(--accent-orange);
  stroke-width: 1.2;
}

.zohar-core {
  fill: var(--accent-orange);
  animation: pulse-glow-zohar 3s infinite alternate;
}

@keyframes pulse-glow-zohar {
  0% {
    r: 9px;
    filter: drop-shadow(0 0 2px var(--accent-orange));
  }
  100% {
    r: 12px;
    filter: drop-shadow(0 0 8px var(--accent-orange));
  }
}

.brand-text h1 {
  font-family: var(--font-family-title);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--text-highlight);
}

.brand-text p {
  font-size: 0.7rem;
  color: var(--accent-blue);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: bold;
}

/* Header Controls & Progress */
.header-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.global-progress-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 220px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.progress-info .label {
  color: var(--text-muted);
}

.progress-info .value {
  font-family: var(--font-family-title);
  font-weight: 600;
  color: var(--accent-blue);
}

.progress-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-orange));
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 0 8px var(--accent-blue-glow);
}

.controls-actions {
  display: flex;
  gap: 0.75rem;
}

/* Main Layout: Floating Panels Interface */
.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  padding: 1.5rem;
  gap: 1.25rem;
  background: #080c14;
}

/* Shared Floating Panel Styling */
.sidebar, .content-area, .checklist-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  backdrop-filter: blur(25px);
  box-shadow: var(--shadow-glass);
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
}

.search-container {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

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

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: 0.65rem 2.25rem 0.65rem 2.25rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  font-family: var(--font-family-body);
  font-size: 0.88rem;
  transition: all 0.3s;
}

#search-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.15);
}

.clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
}

.clear-btn:hover {
  color: var(--text-highlight);
}

.filters {
  display: flex;
  gap: 0.4rem;
}

.filter-tag {
  flex: 1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-muted);
  padding: 0.45rem 0;
  font-size: 0.75rem;
  font-family: var(--font-family-body);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-weight: 600;
}

.filter-tag:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.filter-tag.active {
  background: rgba(0, 210, 255, 0.08);
  border-color: var(--accent-blue);
  color: var(--text-highlight);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.1);
}

/* Sidebar Navigation Items */
.nav-menu {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-section-title {
  font-family: var(--font-family-title);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: var(--accent-orange);
  padding: 1rem 0.5rem 0.4rem 0.5rem;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateX(4px);
}

.nav-item.active {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.25);
}

.nav-item.active .nav-title {
  color: var(--text-highlight);
  font-weight: 600;
}

.nav-status {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  background: rgba(0, 0, 0, 0.2);
}

.nav-item.completed .nav-status {
  border-color: var(--accent-blue);
  background-color: var(--accent-blue);
}

.nav-item.completed .nav-status::after {
  content: "";
  width: 3px;
  height: 6px;
  border: solid #000;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  margin-bottom: 1px;
}

.nav-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nav-chapter {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-title {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.nav-item.completed .nav-title {
  opacity: 0.6;
}

/* Center Walkthrough Content Area */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.content-header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  z-index: 2;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.breadcrumbs .cat {
  color: var(--accent-orange);
  font-family: var(--font-family-title);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.breadcrumbs .sep {
  color: var(--text-muted);
  opacity: 0.5;
}

.breadcrumbs .title {
  font-weight: 600;
  color: var(--text-highlight);
  font-family: var(--font-family-title);
  font-size: 0.9rem;
}

/* Walkthrough Body Scrollable */
.walkthrough-body {
  flex: 1;
  overflow-y: auto;
  padding: 2.5rem 3.5rem;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.walkthrough-body h2 {
  font-family: var(--font-family-title);
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text-highlight);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.walkthrough-body p {
  margin-bottom: 1.25rem;
  color: var(--text-main);
  font-size: 0.94rem;
  text-align: justify;
}

.walkthrough-body hr {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 2rem 0;
}

.walkthrough-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.walkthrough-body th, .walkthrough-body td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
}

.walkthrough-body td {
  background-color: rgba(255, 255, 255, 0.02) !important;
  background: rgba(255, 255, 255, 0.02) !important;
  color: var(--text-main) !important;
}

.walkthrough-body th {
  background-color: rgba(0, 210, 255, 0.08) !important;
  background: rgba(0, 210, 255, 0.08) !important;
  font-family: var(--font-family-title);
  font-size: 0.78rem;
  color: var(--accent-blue) !important;
  text-transform: uppercase;
  font-weight: 600;
}

.walkthrough-body td font, .walkthrough-body th font, .walkthrough-body td b, .walkthrough-body th b {
  color: inherit !important;
  font-family: inherit !important;
}

.walkthrough-body tr:last-child td {
  border-bottom: 0;
}

.walkthrough-body tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* Spoilers Blur Reveal */
.spoiler {
  background: rgba(255, 255, 255, 0.08);
  color: transparent !important;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  cursor: pointer;
  filter: blur(5px);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  user-select: none;
}

.spoiler:hover {
  background: rgba(255, 255, 255, 0.12);
}

.spoiler.revealed {
  filter: blur(0);
  background: rgba(255, 157, 0, 0.08);
  color: var(--accent-orange) !important;
  user-select: text;
}

body.reveal-spoilers-active .spoiler {
  filter: blur(0);
  background: transparent;
  color: var(--text-main) !important;
  cursor: default;
  user-select: text;
}

/* Links in walkthrough */
.walkthrough-body a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: all 0.2s;
  border-bottom: 1px dashed var(--accent-blue);
}

.walkthrough-body a:hover {
  color: var(--text-highlight);
  border-bottom-style: solid;
}

/* Buttons styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-family: var(--font-family-body);
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text-highlight);
  color: #000000;
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary.active {
  background: rgba(0, 210, 255, 0.08);
  border-color: var(--accent-blue);
  color: var(--text-highlight);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.1);
}

.btn-danger {
  background: rgba(255, 74, 90, 0.1);
  border-color: rgba(255, 74, 90, 0.3);
  color: var(--danger-color);
}

.btn-danger:hover {
  background: var(--danger-color);
  color: #000000;
}

.btn-complete {
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
}

.btn-complete:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-complete .checkbox-box {
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  display: inline-block;
  position: relative;
  transition: all 0.2s;
}

.btn-complete.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #000000;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.btn-complete.active .checkbox-box {
  background: #000000;
  border-color: #000000;
}

.btn-complete.active .checkbox-box::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 4px;
  width: 3px;
  height: 6px;
  border: solid var(--accent-blue);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Footer Navigation inside Content Area */
.content-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-indicator {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-family-title);
  font-weight: 600;
  letter-spacing: 1px;
}

/* Checklist Panel Right */
.checklist-panel {
  width: var(--checklist-width);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.panel-icon {
  color: var(--accent-blue);
}

.panel-header h2 {
  font-family: var(--font-family-title);
  font-size: 1rem;
  color: var(--text-highlight);
  font-weight: 600;
  letter-spacing: 1px;
}

.checklist-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.15);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.checklist-info .label {
  color: var(--text-muted);
}

.checklist-info .value {
  color: var(--accent-blue);
  font-weight: 600;
  font-family: var(--font-family-title);
}

.checklist-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  flex: 1;
}

.checklist-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem 0;
  font-size: 0.82rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.checklist-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
}

.checklist-item.checked {
  border-color: rgba(0, 210, 255, 0.2);
  background: rgba(0, 210, 255, 0.02);
}

.chk-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1.5px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 3px;
  transition: all 0.2s;
  background: rgba(0, 0, 0, 0.2);
}

.checklist-item.checked .chk-box {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.checklist-item.checked .chk-box::after {
  content: "";
  width: 3px;
  height: 6px;
  border: solid #000000;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  display: block;
  margin-bottom: 1px;
}

.item-name {
  font-size: 0.85rem;
  color: var(--text-main);
  transition: all 0.25s;
}

.checklist-item.checked .item-name {
  opacity: 0.45;
  text-decoration: line-through;
}

/* ============================================================
   RESPONSIVE SYSTEM (Fase 6)
   ≥1200px  : three columns (default, above)
   768–1199 : two columns + checklist as right drawer + FAB
   <768px   : single column + off-canvas drawers + bottom bar
   ============================================================ */

/* --- Responsive-only components: hidden on desktop --- */
.drawer-handle,
.checklist-fab,
.mobile-bottom-bar,
.overflow-toggle {
  display: none;
}

/* Slim header tweak so widths reduce gracefully before tablet */
@media (max-width: 1100px) {
  :root {
    --sidebar-width: 290px;
  }
}

.drawer-handle {
  justify-content: flex-end;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.drawer-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
}
.drawer-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-highlight);
}

/* Dark overlay behind any open drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 46;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.drawer-overlay.visible {
  opacity: 1;
  visibility: visible;
}

/* Lock background scroll while a drawer is open */
body.scroll-locked {
  overflow: hidden;
}

/* Floating checklist button (tablet) */
.checklist-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 44;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  min-height: 52px;
  border: 1px solid var(--accent-blue);
  border-radius: 30px;
  background: rgba(0, 210, 255, 0.12);
  color: var(--text-highlight);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 12px var(--accent-blue-glow);
  font-family: var(--font-family-body);
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
}
.checklist-fab .fab-count {
  font-family: var(--font-family-title);
  font-weight: 600;
  color: var(--accent-blue);
}

/* Mobile bottom action bar */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 44;
  min-height: 64px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(8, 12, 20, 0.95);
  border-top: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  align-items: stretch;
}
.mobile-bottom-bar button {
  flex: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family-body);
  font-size: 0.65rem;
  cursor: pointer;
  transition: color 0.2s;
}
.mobile-bottom-bar button:hover,
.mobile-bottom-bar button:focus-visible {
  color: var(--accent-blue);
}
.mobile-bottom-bar .mb-glyph {
  font-size: 1.2rem;
  line-height: 1;
}
.mobile-bottom-bar .mb-count {
  font-family: var(--font-family-title);
  font-weight: 600;
  color: var(--accent-blue);
  font-size: 0.7rem;
}

/* Touch targets ≥ 44px on coarse pointers */
@media (pointer: coarse) {
  .nav-item { min-height: 44px; }
  .checklist-item { min-height: 44px; align-items: center; }
  .filter-tag { min-height: 40px; }
}

/* ===== TABLET: 768px – 1199px ===== */
@media (max-width: 1199px) {
  /* Collapse header controls into an overflow (⋯) menu */
  .header-controls { position: relative; }
  .overflow-toggle {
    display: inline-flex;
    padding: 0.5rem 0.85rem;
    font-size: 1.2rem;
    line-height: 1;
  }
  .controls-actions {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    flex-direction: column;
    gap: 0.4rem;
    width: 230px;
    padding: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-glass);
    z-index: 60;
  }
  body.overflow-open .controls-actions { display: flex; }
  .controls-actions .btn {
    width: 100%;
    justify-content: flex-start;
    min-height: 44px;
  }

  /* Checklist panel becomes a right-side drawer */
  .checklist-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 330px;
    max-width: 85vw;
    margin: 0;
    border-radius: 0;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.3s;
    z-index: 50;
  }
  body.drawer-right-open .checklist-panel {
    transform: translateX(0);
    visibility: visible;
  }
  .checklist-panel .drawer-handle { display: flex; }

  /* Floating checklist button */
  .checklist-fab { display: inline-flex; }

  /* Keep the in-content footer's Next button clear of the FAB */
  .content-footer { padding-right: 6rem; }
}

/* ===== MOBILE: < 768px ===== */
@media (max-width: 767px) {
  /* Slim header */
  .app-header {
    height: 60px;
    padding: 0 0.9rem;
    gap: 0.6rem;
  }
  .brand { gap: 0.6rem; }
  .zohar-icon { width: 34px; height: 34px; }
  .brand-text h1 { font-size: 1.05rem; letter-spacing: 1px; }
  .brand-text p { display: none; }
  .header-controls { gap: 0.5rem; flex: 1; justify-content: flex-end; }
  .global-progress-card { width: auto; flex: 1; max-width: 150px; gap: 0.2rem; }
  .progress-info { font-size: 0.65rem; }

  /* Single column: content only */
  .main-layout {
    padding: 0.75rem;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    gap: 0;
  }
  .content-area { width: 100%; }
  .content-header { padding: 0.9rem 1rem; gap: 0.75rem; flex-wrap: wrap; }
  .walkthrough-body { padding: 1.25rem 1.1rem; }
  .walkthrough-body p { text-align: left; }
  .breadcrumbs { font-size: 0.8rem; }

  /* Sidebar becomes a left-side drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 320px;
    max-width: 85vw;
    margin: 0;
    border-radius: 0;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.3s;
    z-index: 50;
  }
  body.drawer-left-open .sidebar {
    transform: translateX(0);
    visibility: visible;
  }
  .sidebar .drawer-handle { display: flex; }

  /* Tighten checklist drawer width on tiny screens */
  .checklist-panel { width: 320px; }

  /* Replace floating button + in-content footer with the bottom bar */
  .checklist-fab { display: none; }
  .content-footer { display: none; }
  .mobile-bottom-bar { display: flex; }
}

/* Custom Dialog Modal Styling (Fase 4) */
dialog.custom-dialog {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(16, 21, 36, 0.95);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  margin: auto;
  backdrop-filter: blur(25px);
  outline: none;
}

dialog.custom-dialog::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.dialog-content h3 {
  font-family: var(--font-family-title);
  color: var(--text-highlight);
  font-weight: 600;
  font-size: 1.35rem;
  margin-top: 0;
  margin-bottom: 0.85rem;
  letter-spacing: 1px;
}

.dialog-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.dialog-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.dialog-buttons-right {
  display: flex;
  gap: 0.75rem;
}


/* Accessibility Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  .zohar-core {
    animation: none !important;
  }
}

/* ============================================================
   PHASE 8 - ADVANCED UX STYLES
   ============================================================ */

/* Read Progress Bar */
.read-progress-container {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.02);
  z-index: 5;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.read-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-orange));
  box-shadow: 0 0 8px var(--accent-blue-glow);
}

/* Copy Link Button */
.copy-link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  margin-left: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.copy-link-btn:hover {
  color: var(--accent-blue);
  background: rgba(0, 210, 255, 0.08);
  box-shadow: 0 0 6px var(--accent-blue-glow);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  width: calc(100% - 4rem);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  background: rgba(16, 21, 36, 0.9);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-blue);
  border-radius: 6px;
  box-shadow: var(--shadow-glass);
  color: var(--text-main);
  font-family: var(--font-family-body);
  font-size: 0.88rem;
  animation: toast-slide-in 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transition: all 0.3s ease;
}

.toast.success {
  border-left-color: var(--accent-blue);
  box-shadow: 0 4px 20px rgba(0, 210, 255, 0.1), var(--shadow-glass);
}

.toast.error {
  border-left-color: var(--danger-color);
  box-shadow: 0 4px 20px rgba(255, 74, 90, 0.1), var(--shadow-glass);
}

.toast.info {
  border-left-color: var(--accent-orange);
  box-shadow: 0 4px 20px rgba(255, 157, 0, 0.1), var(--shadow-glass);
}

.toast.fade-out {
  opacity: 0;
  transform: translateY(10px);
}

.toast-content {
  flex: 1;
  display: flex;
  align-items: center;
}

.toast-message {
  font-weight: 500;
}

.toast-action-btn {
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: var(--accent-blue);
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: bold;
  font-family: var(--font-family-body);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.toast-action-btn:hover {
  background: var(--accent-blue);
  color: #000;
}

.toast-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.toast-close-btn:hover {
  color: var(--text-highlight);
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .toast-container {
    bottom: calc(75px + env(safe-area-inset-bottom, 0px));
    right: 1rem;
    left: 1rem;
    width: auto;
    max-width: none;
  }
}

/* Personal Notes Section */
.notes-panel {
  border-top: 1px solid var(--border-color);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notes-header-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-highlight);
  cursor: pointer;
  font-family: var(--font-family-title);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.25rem 0;
}

.notes-header-btn:hover {
  color: var(--accent-blue);
}

.notes-chevron {
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.notes-panel.expanded .notes-chevron {
  transform: rotate(90deg);
  color: var(--accent-blue);
}

.notes-content {
  display: flex;
  flex-direction: column;
}

.notes-content textarea {
  width: 100%;
  height: 120px;
  min-height: 80px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  font-family: var(--font-family-body);
  font-size: 0.85rem;
  padding: 0.75rem;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
  line-height: 1.5;
}

.notes-content textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue-glow);
}

.notes-content textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* Floating Back-to-Top Button */
.back-to-top-btn {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(16, 21, 36, 0.85);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(10px);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  box-shadow: var(--shadow-glass);
}

.back-to-top-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-highlight);
  box-shadow: 0 0 12px var(--accent-blue-glow);
  transform: translateY(-2px);
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 767px) {
  .back-to-top-btn {
    bottom: calc(75px + env(safe-area-inset-bottom, 0px));
    right: 1.5rem;
  }
}

/* Keyboard Shortcut Overlay */
.shortcuts-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.shortcut-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.shortcut-row:last-child {
  border-bottom: none;
}

.shortcut-keys {
  display: flex;
  gap: 0.35rem;
  width: 80px;
  flex-shrink: 0;
}

kbd {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom-width: 3px;
  border-radius: 4px;
  color: var(--accent-blue);
  font-family: var(--font-family-title);
  font-size: 0.78rem;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  display: inline-block;
  min-width: 28px;
  text-align: center;
  box-shadow: 0 2px 0 rgba(0,0,0,0.3);
  text-shadow: 0 0 4px var(--accent-blue-glow);
}

.shortcut-desc {
  font-size: 0.88rem;
  color: var(--text-main);
}

/* ============================================================
   PHASE 9 - PWA AND LOCAL FONTS
   ============================================================ */

/* Local Web Fonts definition */
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/orbitron-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/orbitron-900.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/outfit-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/outfit-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/outfit-700.woff2') format('woff2');
}

/* Online/Offline Status Indicator */
.connection-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.72rem;
  font-family: var(--font-family-body);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.connection-status.online {
  color: var(--accent-blue);
  border-color: rgba(0, 210, 255, 0.15);
}

.connection-status.online .status-dot {
  background-color: var(--accent-blue);
  box-shadow: 0 0 8px var(--accent-blue-glow);
}

.connection-status.offline {
  color: var(--accent-orange);
  border-color: rgba(255, 157, 0, 0.2);
}

.connection-status.offline .status-dot {
  background-color: var(--accent-orange);
  box-shadow: 0 0 8px var(--accent-orange-glow);
}

/* Hide connection text on smaller devices to keep header compact */
@media (max-width: 480px) {
  .connection-status .status-text {
    display: none;
  }
  .connection-status {
    padding: 0.3rem;
    margin-left: 0.5rem;
  }
}

/* PWA Install Prompt Banner */
.install-banner {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 998; /* Under toasts, but above everything else */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 460px;
  width: calc(100% - 4rem);
  padding: 1rem 1.4rem;
  background: rgba(16, 21, 36, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--accent-blue);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), var(--shadow-glass);
  animation: banner-slide-up 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  color: var(--text-main);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

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

.install-banner-icon {
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: 8px;
  flex-shrink: 0;
}

.install-banner-text h4 {
  font-family: var(--font-family-title);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-highlight);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.install-banner-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0; /* Override default paragraph margin */
}

.install-banner-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

@keyframes banner-slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .install-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    bottom: calc(75px + env(safe-area-inset-bottom, 0px));
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    padding: 1rem;
  }
  
  .install-banner-actions {
    justify-content: flex-end;
  }
}

/* ============================================================
   PHASE 10 - GUIDE PRO STYLES
   ============================================================ */

/* Missable Warning Banner */
.missable-warning-banner {
  background: rgba(255, 157, 0, 0.05);
  border: 1px solid rgba(255, 157, 0, 0.3);
  border-left: 4px solid var(--accent-orange);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(255, 157, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.missable-warning-banner .warning-title {
  font-family: var(--font-family-title);
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--accent-orange);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
}
.missable-warning-banner .warning-body {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* Missable Indicator Badge in Checklist */
.missable-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange);
  margin-left: 0.35rem;
  font-size: 0.9rem;
  cursor: help;
  text-shadow: 0 0 6px var(--accent-orange-glow);
}

/* Item Categories Filters */
.checklist-type-filters {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
  margin-top: 0.25rem;
}
.checklist-type-filters::-webkit-scrollbar {
  display: none;
}
.type-filter-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.3rem 0.65rem;
  font-size: 0.72rem;
  font-family: var(--font-family-body);
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.type-filter-btn:hover {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}
.type-filter-btn.active {
  background: rgba(0, 210, 255, 0.08);
  border-color: var(--accent-blue);
  color: var(--text-highlight);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.1);
}

/* Reading Mode Styles */
body.reading-mode-active .sidebar,
body.reading-mode-active .checklist-panel,
body.reading-mode-active .app-header {
  display: none !important;
}
body.reading-mode-active .checklist-fab,
body.reading-mode-active .mobile-bottom-bar {
  display: none !important;
}
body.reading-mode-active .main-layout {
  padding: 3rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  display: block;
}
body.reading-mode-active .content-area {
  border: none !important;
  background: none !important;
}
body.reading-mode-active .walkthrough-body {
  max-width: 760px;
  padding: 2rem 0;
}
body.reading-mode-active .walkthrough-body p {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 1.75rem;
  color: #e0e6f0;
}

/* Exit Reading Mode Floating Button */
.exit-reading-mode-fab {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  background: rgba(16, 21, 36, 0.9);
  border: 1px solid var(--accent-blue);
  color: var(--text-highlight);
  padding: 0.6rem 1.1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px var(--accent-blue-glow);
  transition: all 0.2s ease;
}
.exit-reading-mode-fab:hover {
  background: var(--accent-blue);
  color: #000;
  transform: translateY(-2px);
}
body.reading-mode-active .exit-reading-mode-fab {
  display: flex;
}

/* Stats Dialog & Grid Layout */
.stats-dialog {
  max-width: 600px !important;
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 550px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
.stats-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stats-card-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: bold;
}
.stats-card-value {
  font-family: var(--font-family-title);
  font-size: 1.15rem;
  color: var(--text-highlight);
  font-weight: 600;
}
.stats-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}
.stats-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-blue);
  box-shadow: 0 0 6px var(--accent-blue-glow);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.missables-card {
  grid-column: 1 / -1;
}
.missables-breakdown {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}
.missable-stat {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-main);
}
.missable-stat .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.missable-stat .dot.collected {
  background: var(--accent-blue);
  box-shadow: 0 0 6px var(--accent-blue-glow);
}
.missable-stat .dot.missed {
  background: var(--danger-color);
  box-shadow: 0 0 6px rgba(255, 74, 90, 0.5);
}
.missable-stat .dot.pending {
  background: var(--text-muted);
}
.missable-stat .stat-num {
  font-family: var(--font-family-title);
  font-weight: 600;
  color: var(--text-highlight);
}

/* Paragraph Search Results */
.search-results-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem;
  overflow-y: auto;
  flex: 1;
}
.search-results-container h2 {
  font-family: var(--font-family-title);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.75px;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}
.search-results-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.search-result-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.search-result-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(0, 210, 255, 0.25);
}
.search-result-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
}
.search-result-chapter {
  color: var(--accent-orange);
  font-weight: 600;
}
.search-result-snippet {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.search-result-snippet mark {
  background: rgba(0, 210, 255, 0.25);
  color: var(--text-highlight);
  border-radius: 2px;
  padding: 0 2px;
}

/* Paragraph Flash Highlight Animation */
.temp-paragraph-highlight {
  animation: paragraph-flash-highlight 2s ease forwards;
}
@keyframes paragraph-flash-highlight {
  0% {
    background: rgba(0, 210, 255, 0.25);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
    border-radius: 4px;
  }
  100% {
    background: transparent;
    box-shadow: none;
  }
}

/* Spoiler Counter Badge next to title */
.spoiler-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 157, 0, 0.1);
  border: 1px solid rgba(255, 157, 0, 0.3);
  color: var(--accent-orange);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-weight: bold;
  font-family: var(--font-family-body);
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: 0 0 4px var(--accent-orange-glow);
  box-shadow: 0 0 6px rgba(255, 157, 0, 0.05);
}
.spoiler-counter-badge:hover {
  background: var(--accent-orange);
  color: #000;
  border-color: var(--accent-orange);
  box-shadow: 0 0 10px var(--accent-orange-glow);
}

/* Noscript Fallback Styling */
.noscript-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at center, rgba(255, 74, 90, 0.05) 0%, transparent 70%),
    linear-gradient(rgba(18, 24, 41, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 24, 41, 0.4) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 2rem;
}

.noscript-content {
  background: var(--bg-surface);
  border: 1px solid var(--danger-color);
  border-radius: 12px;
  padding: 3rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 30px rgba(255, 74, 90, 0.15), var(--shadow-glass);
  backdrop-filter: blur(20px);
}

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

.noscript-zohar {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 12px rgba(255, 74, 90, 0.6));
}

.noscript-zohar .zohar-poly {
  fill: none;
  stroke: var(--danger-color);
  stroke-width: 2.5;
}

.noscript-zohar .zohar-inner {
  fill: rgba(255, 74, 90, 0.05);
  stroke: var(--danger-color);
  stroke-width: 1.2;
}

.noscript-zohar .zohar-core {
  fill: var(--danger-color);
}

.noscript-content h2 {
  font-family: var(--font-family-title);
  color: var(--danger-color);
  font-size: 1.6rem;
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
}

.noscript-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2rem;
  font-weight: 600;
}

.noscript-details {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 74, 90, 0.1);
  border-radius: 6px;
  padding: 1.5rem;
}

.noscript-details p {
  color: var(--text-main);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.noscript-details p:last-child {
  margin-bottom: 0;
  color: var(--accent-orange);
  font-weight: 600;
}


