/* ==========================================================================
   Full Screen Presentation Mode Design System
   ========================================================================== */

:root {
  --bg-dark: #070a11;
  --bg-surface: #111827;
  --bg-glass: rgba(17, 24, 39, 0.85);
  --border-glass: rgba(255, 255, 255, 0.12);
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

/* --- Main Container --- */
.presentation-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #1e293b 0%, #070a11 80%);
}

/* --- Floating Header (Top Control Dock) --- */
.floating-header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1200px;
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  z-index: 100;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.floating-header.autohide {
  opacity: 0;
  transform: translate(-50%, -20px);
  pointer-events: none;
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-text h1 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

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

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.page-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.04em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Presentation Primary Button */
.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: all 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
  background: linear-gradient(135deg, #2563eb, #1e40af);
}

.primary-btn.active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* --- Presentation Progress Bar --- */
.presentation-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.presentation-progress-bar.active {
  opacity: 1;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  box-shadow: 0 0 10px var(--primary);
  transition: width 0.1s linear;
}

/* --- Full Screen Viewport --- */
.fullscreen-viewport {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 12px;
}

.page-stack {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.page-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.page-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}

/* 100% Full Page Image with NO STRETCHING */
.full-page-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* PERFECT RATIO PRESERVATION */
  display: block;
  border-radius: var(--radius-sm);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 0, 0, 0.6);
}

/* Floating Navigation Arrows */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 80;
  transition: all 0.25s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.nav-prev { left: 24px; }
.nav-next { right: 24px; }

.nav-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 0 25px var(--primary-glow);
}

.nav-arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  transform: translateY(-50%);
  background: var(--bg-glass);
}

.nav-arrow.autohide {
  opacity: 0;
  pointer-events: none;
}

/* --- Floating Footer Bar (Bottom Control Dock) --- */
.floating-footer {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 700px;
  height: 50px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 25px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  z-index: 100;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.floating-footer.autohide {
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
}

.btn-control {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-control:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.scrubber-container {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

input[type="range"]#pageScrubber {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.14);
  height: 6px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

input[type="range"]#pageScrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}

input[type="range"]#pageScrubber::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .brand-text { display: none; }
  .floating-header { padding: 0 12px; }
  .floating-footer { width: calc(100% - 24px); }
  .nav-arrow { width: 42px; height: 42px; font-size: 1rem; }
  .nav-prev { left: 8px; }
  .nav-next { right: 8px; }
}
