/**
 * Main Stylesheet - Manga Boda Josue & Ana
 * Dark Theme with Radiant Grand Line Gold & Romance Accents
 */

:root {
  --bg-primary: #0b0c10;
  --bg-secondary: #14171f;
  --bg-card: rgba(22, 27, 38, 0.85);
  --bg-glass: rgba(18, 22, 32, 0.75);
  
  --gold-primary: #f5b041;
  --gold-light: #f9e79f;
  --gold-dark: #b7791f;
  --gold-glow: rgba(245, 176, 65, 0.35);

  --rose-primary: #ff7597;
  --rose-glow: rgba(255, 117, 151, 0.3);

  --pirate-red: #e74c3c;
  --pirate-dark: #1e272e;
  
  --text-primary: #f8f9fa;
  --text-secondary: #cbd5e1;
  --text-muted: #808b96;

  --border-subtle: rgba(245, 176, 65, 0.2);
  --border-highlight: rgba(245, 176, 65, 0.6);

  --shadow-depth: 0 20px 40px rgba(0, 0, 0, 0.7);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --font-title: 'Cinzel Decorative', 'Bangers', serif, system-ui;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-manga: 'Bangers', 'Permanent Marker', cursive, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(245, 176, 65, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 10% 90%, rgba(255, 117, 151, 0.05) 0%, transparent 50%),
    linear-gradient(to bottom, #090a0e, #0e1117);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
}

/* Canvas de Partículas VFX de fondo */
#vfx-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10;
}

/* Lupa de Aumento */
#magnifier-lens {
  position: fixed;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 3px solid var(--gold-primary);
  box-shadow: 0 0 20px rgba(245, 176, 65, 0.6), inset 0 0 15px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 9999;
  display: none;
  background-repeat: no-repeat;
  background-color: #000;
}

/* Contenedor Principal de la App */
.app-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  z-index: 20;
}

/* ==================== HEADER / NAVBAR ==================== */
.app-header {
  height: 64px;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px var(--gold-glow));
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

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

/* Selector de Modos de Lectura */
.reading-modes-nav {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 4px;
  gap: 4px;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.mode-btn:hover {
  color: var(--gold-light);
  background: rgba(245, 176, 65, 0.1);
}

.mode-btn.active {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #0b0c10;
  box-shadow: 0 2px 10px var(--gold-glow);
}

/* Botones de Acción Superiores */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(245, 176, 65, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

.icon-btn.active-feature,
.icon-btn.audio-active {
  background: rgba(245, 176, 65, 0.2);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
}

.btn-guestbook-accent {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border-color: #e74c3c;
  color: #fff;
  font-weight: 600;
}

.btn-guestbook-accent:hover {
  background: linear-gradient(135deg, #ff5252, #d63031);
  box-shadow: 0 0 14px rgba(231, 76, 60, 0.5);
  color: #fff;
}

/* ==================== READER STAGE ==================== */
.reader-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 10px 0 70px 0;
}

.reader-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Barra de Progreso Superior */
.progress-bar-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 90;
}

.progress-bar-fill {
  height: 100%;
  width: 5%;
  background: linear-gradient(90deg, var(--gold-primary), var(--rose-primary));
  box-shadow: 0 0 8px var(--gold-glow);
  transition: width 0.3s ease;
}

/* ==================== MODO WEBTOON ==================== */
.webtoon-view {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px 100px 10px;
  gap: 40px;
  scroll-behavior: smooth;
}

.webtoon-item {
  max-width: 800px;
  width: 100%;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-depth);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.webtoon-header {
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.webtoon-tag {
  background: var(--gold-dark);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.webtoon-title {
  font-size: 1rem;
  color: var(--gold-light);
  font-family: var(--font-title);
}

.webtoon-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==================== MODO SLIDE ==================== */
.slide-view {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-card {
  max-height: 82vh;
  display: flex;
  background: #000;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.slide-img {
  max-height: 82vh;
  width: auto;
  object-fit: contain;
  display: block;
}

.slide-meta {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 280px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-subtle);
}

.slide-badge {
  background: var(--gold-primary);
  color: #0b0c10;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  align-self: flex-start;
  margin-bottom: 12px;
}

.slide-title {
  font-family: var(--font-title);
  color: var(--gold-light);
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.slide-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==================== MODO CINEMÁTICO ==================== */
.cinematic-view {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cinematic-stage {
  position: relative;
  max-height: 84vh;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
  border: 2px solid var(--border-highlight);
}

.cinematic-camera {
  overflow: hidden;
  animation: kenBurns 12s infinite alternate ease-in-out;
}

.cinematic-img {
  max-height: 84vh;
  width: auto;
  display: block;
}

@keyframes kenBurns {
  0% { transform: scale(1.0) translate(0, 0); }
  50% { transform: scale(1.06) translate(-1%, -1%); }
  100% { transform: scale(1.03) translate(1%, 0.5%); }
}

.cinematic-overlay-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
  padding: 24px 30px 16px 30px;
}

.cinematic-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.15);
}

.cinematic-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--gold-primary);
}

.cinematic-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold-primary);
  letter-spacing: 1px;
}

.cinematic-title {
  font-family: var(--font-title);
  color: #fff;
  font-size: 1.3rem;
  margin: 4px 0 2px 0;
}

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

/* ==================== BOTTOM CONTROLS & DRAWER ==================== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}

.bottom-center {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-arrow-btn {
  background: rgba(245, 176, 65, 0.12);
  border: 1px solid var(--border-subtle);
  color: var(--gold-light);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-arrow-btn:hover {
  background: var(--gold-primary);
  color: #0b0c10;
  box-shadow: 0 0 14px var(--gold-glow);
}

.page-counter-badge {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

/* Cajón de Miniaturas (Thumbnail Drawer) */
.thumbnails-drawer {
  position: fixed;
  bottom: 60px;
  left: 0;
  width: 100%;
  background: rgba(14, 17, 23, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  padding: 14px 20px;
  transform: translateY(110%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 95;
}

.thumbnails-drawer.open {
  transform: translateY(0);
}

.thumbnails-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-primary) rgba(0,0,0,0.3);
}

.thumb-item {
  flex: 0 0 70px;
  height: 98px;
  background: #000;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: all 0.2s ease;
}

.thumb-item:hover {
  border-color: var(--gold-primary);
  transform: translateY(-4px);
}

.thumb-item.active-thumb {
  border-color: var(--gold-primary);
  box-shadow: 0 0 14px var(--gold-glow);
  transform: translateY(-4px) scale(1.05);
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-number {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}

/* ==================== MODALES ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-overlay.modal-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 18px 24px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-title);
  color: var(--gold-light);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.btn-close-modal:hover {
  color: var(--rose-primary);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Formulario de Dedicatorias */
.wish-form {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 0.8rem;
  color: var(--gold-light);
  font-weight: 600;
}

.form-input, .form-select, .form-textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 70px;
}

.btn-submit-wish {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  border: none;
  color: #0b0c10;
  font-weight: 700;
  padding: 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-submit-wish:hover {
  box-shadow: 0 0 15px var(--gold-glow);
  transform: translateY(-1px);
}

/* Lista de Deseos */
.wishes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
}

.wish-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.wish-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.wish-avatar {
  font-size: 1.4rem;
}

.wish-author-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.wish-author-name {
  color: var(--gold-light);
  font-size: 0.9rem;
}

.wish-role-tag {
  color: var(--text-muted);
  font-size: 0.75rem;
}

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

.wish-body {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.4;
}

/* Toast Notificaciones */
.manga-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(14, 17, 23, 0.95);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  color: var(--gold-light);
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10000;
}

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

/* ==================== BARRA FLOTANTE DE ZOOM ==================== */
.floating-zoom-toolbar {
  position: absolute;
  bottom: 80px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-highlight);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-lg);
  padding: 4px 8px;
  z-index: 90;
  transition: all 0.3s ease;
}

.zoom-tool-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.zoom-tool-btn:hover {
  background: rgba(245, 176, 65, 0.2);
  color: var(--gold-light);
  transform: scale(1.1);
}

.zoom-level-display {
  width: auto;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(0, 0, 0, 0.4);
}

.zoom-fit-btn {
  font-size: 0.9rem;
}

/* Estado de Zoom Activo & Panning */
.is-zoomed {
  cursor: grab;
}

.is-zoomed.is-panning {
  cursor: grabbing !important;
  user-select: none;
}

.is-zoomed .flip-click-zone {
  display: none !important;
}

.reader-container.is-zoomed,
.reader-container.is-zoomed .book-wrapper,
.reader-container.is-zoomed .slide-card,
.reader-container.is-zoomed .cinematic-stage,
.reader-container.is-zoomed .page-img {
  touch-action: none !important;
}

.reader-container.is-zoomed .book-wrapper,
.reader-container.is-zoomed .slide-card,
.reader-container.is-zoomed .cinematic-stage {
  transition: none !important;
}

.book-wrapper, .slide-card, .cinematic-stage {
  will-change: transform;
  touch-action: pan-y pinch-zoom;
}

/* ==================== MODAL VISOR DE ZOOM ULTRA-HD ==================== */
.modal-zoom-viewer {
  padding: 0;
  background: rgba(5, 6, 8, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
}

.zoom-viewer-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.zoom-viewer-canvas {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform 0.15s ease-out;
  cursor: grab;
  will-change: transform;
}

.zoom-viewer-canvas.is-panning {
  cursor: grabbing !important;
  transition: none !important;
}

.zoom-viewer-img {
  max-height: 90vh;
  max-width: 90vw;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(245, 176, 65, 0.2);
  border: 1px solid var(--border-highlight);
  border-radius: 4px;
  image-rendering: -webkit-optimize-contrast;
  display: block;
}

.zoom-viewer-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 17, 23, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-highlight);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  padding: 6px 16px;
  border-radius: 30px;
  z-index: 2100;
}

.zoom-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 4px;
}

.btn-close-zoom-view {
  background: rgba(231, 76, 60, 0.2);
  border-color: #e74c3c;
  color: #ff7675;
}

.btn-close-zoom-view:hover {
  background: #e74c3c;
  color: #fff;
}

/* ==================== RESPONSIVIDAD & OPTIMIZACIÓN CELULAR ==================== */
@media (max-width: 900px) {
  .app-header {
    height: 56px;
    padding: 0 10px;
  }
  .brand-subtitle {
    display: none;
  }
  .brand-title {
    font-size: 0.95rem;
  }
  .reading-modes-nav {
    padding: 2px;
    gap: 2px;
  }
  .mode-btn {
    padding: 5px 8px;
    font-size: 0.75rem;
  }
  .mode-btn span:not(.mode-icon) {
    display: none;
  }
  .header-actions {
    gap: 4px;
  }
  .header-actions .icon-btn {
    height: 34px;
    padding: 0 8px;
    font-size: 0.75rem;
  }
  .header-actions .icon-btn span:not(.btn-icon) {
    display: none;
  }
  .slide-meta {
    display: none;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .form-input, .form-select, .form-textarea {
    font-size: 16px !important; /* Evita que iOS haga zoom automático y rompa la vista */
  }
  .bottom-bar {
    height: 56px;
    padding: 0 8px;
  }
  .bottom-left {
    display: none; /* Da todo el espacio inferior a los botones de pasar página */
  }
  .bottom-center {
    width: 100%;
    justify-content: space-around;
    gap: 6px;
  }
  .nav-arrow-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
    flex: 1;
    justify-content: center;
  }
  #btn-first-page,
  #btn-last-page,
  #btn-cinematic-play {
    display: none;
  }
  .page-counter-badge {
    padding: 5px 8px;
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .floating-zoom-toolbar {
    bottom: 64px;
    right: 8px;
    padding: 2px 4px;
    transform: scale(0.88);
    transform-origin: bottom right;
  }
  .zoom-viewer-controls {
    bottom: 12px;
    padding: 4px 8px;
    gap: 4px;
    width: 95vw;
    justify-content: space-between;
    overflow-x: auto;
  }
  .page-img {
    max-height: calc(100vh - 124px);
    max-width: 98vw;
  }
}

@media (max-width: 480px) {
  .app-header {
    height: 52px;
    padding: 0 6px;
  }
  .brand-icon {
    font-size: 1.2rem;
  }
  .brand-title {
    font-size: 0.88rem;
  }
  .mode-btn {
    padding: 4px 6px;
  }
  .header-actions .icon-btn {
    height: 32px;
    padding: 0 6px;
  }
  .modal-dialog {
    padding: 0;
    max-height: 94vh;
    border-radius: var(--radius-md);
  }
  .modal-header {
    padding: 12px 16px;
  }
  .modal-body {
    padding: 14px 16px;
  }
  .thumbnails-drawer {
    bottom: 56px;
    padding: 10px;
  }
  .thumb-item {
    flex: 0 0 55px;
    height: 78px;
  }
}

