/* ==========================================================================
   Veyon Classroom Monitoring: High-End Interactive Walkthrough Stylesheet
   Theme: Sleek Dark Glassmorphism with Dynamic Phase Accents
   ========================================================================== */

:root {
  --bg-deep: #0a0d14;
  --bg-surface: #121824;
  --bg-card: rgba(22, 30, 46, 0.75);
  --bg-card-hover: rgba(28, 38, 58, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(139, 92, 246, 0.3);
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --phase1-primary: #8B5CF6;
  --phase1-gradient: linear-gradient(135deg, #7C3AED, #A78BFA);
  --phase1-glow: rgba(139, 92, 246, 0.25);
  
  --phase2-primary: #0EA5E9;
  --phase2-gradient: linear-gradient(135deg, #0284C7, #38BDF8);
  --phase2-glow: rgba(14, 165, 233, 0.25);
  
  --phase3-primary: #10B981;
  --phase3-gradient: linear-gradient(135deg, #059669, #34D399);
  --phase3-glow: rgba(16, 185, 129, 0.25);

  --danger: #EF4444;
  --warning: #F59E0B;
  --success: #10B981;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Background Ambient Lighting */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 15% 20%, rgba(124, 58, 237, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(14, 165, 233, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
}

/* Top App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 13, 20, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.version-pill {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(139, 92, 246, 0.2);
  color: #C4B5FD;
  border: 1px solid rgba(139, 92, 246, 0.4);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

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

/* Header Controls & Filters */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.phase-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.phase-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.phase-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.phase-btn[data-phase="1"].active { color: #C4B5FD; border: 1px solid var(--phase1-primary); }
.phase-btn[data-phase="2"].active { color: #7DD3FC; border: 1px solid var(--phase2-primary); }
.phase-btn[data-phase="3"].active { color: #6EE7B7; border: 1px solid var(--phase3-primary); }

.view-toggle-btn, .download-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  text-decoration: none;
}

.view-toggle-btn:hover, .download-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.download-btn.primary {
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  border: none;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

/* Horizontal Progress Scrubber Bar */
.progress-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 40;
}

.progress-bar-fill {
  height: 100%;
  width: 3.8%;
  background: linear-gradient(90deg, #7C3AED, #0284C7, #10B981);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

/* Main Content Workspace */
.main-viewport {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 7.5rem;
}

/* Sub-Hero / Quick Context Banner */
.context-strip {
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(18, 24, 36, 0.4);
}

.station-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.station-badge {
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-phase1 { background: rgba(139, 92, 246, 0.15); color: #C4B5FD; border: 1px solid rgba(139, 92, 246, 0.4); }
.badge-phase2 { background: rgba(14, 165, 233, 0.15); color: #7DD3FC; border: 1px solid rgba(14, 165, 233, 0.4); }
.badge-phase3 { background: rgba(16, 185, 129, 0.15); color: #6EE7B7; border: 1px solid rgba(16, 185, 129, 0.4); }

.step-counter-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.shortcut-hints {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Horizontal Scrolling Track (SHOWCASE MODE)
   ========================================================================== */
.horizontal-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 1.5rem 2rem 2rem 2rem;
  display: flex;
  gap: 2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.horizontal-scroll-wrapper::-webkit-scrollbar {
  height: 8px;
}
.horizontal-scroll-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
.horizontal-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.horizontal-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Step Slide Card (Adapts to full viewport height & width without overflow) */
.step-slide {
  flex: 0 0 calc(100vw - 4rem);
  max-width: 1400px;
  height: clamp(540px, calc(100vh - 200px), 780px);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  transition: var(--transition);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  position: relative;
}

@media (max-width: 1150px), (max-height: 700px) {
  .step-slide {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
    min-height: auto;
    flex: 0 0 calc(100vw - 3rem);
  }
}

.step-slide:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.7);
}

/* Phase Accent Borders */
.step-slide[data-phase="1"] { border-top: 3px solid var(--phase1-primary); }
.step-slide[data-phase="2"] { border-top: 3px solid var(--phase2-primary); }
.step-slide[data-phase="3"] { border-top: 3px solid var(--phase3-primary); }

/* Left Column: Visual Screenshot Container */
.slide-visual-col {
  background: rgba(0, 0, 0, 0.4);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  border-right: 1px solid var(--border-subtle);
  cursor: zoom-in;
  overflow: hidden;
}

@media (max-width: 1150px) {
  .slide-visual-col {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    max-height: 420px;
  }
}

.image-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.step-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.image-frame:hover .step-img {
  transform: scale(1.02);
}

.expand-hint {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0.8;
  transition: var(--transition);
}

.slide-visual-col:hover .expand-hint {
  opacity: 1;
  background: rgba(124, 58, 237, 0.8);
}

/* Right Column: Narrative & Action Instructions */
.slide-info-col {
  padding: 1.75rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.slide-info-col::-webkit-scrollbar {
  width: 6px;
}
.slide-info-col::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}
}

.step-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.step-number-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
}

.pill-p1 { background: var(--phase1-primary); color: white; }
.pill-p2 { background: var(--phase2-primary); color: white; }
.pill-p3 { background: var(--phase3-primary); color: white; }

.device-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.step-heading {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
  letter-spacing: -0.3px;
}

.step-description {
  font-size: 1rem;
  color: #CBD5E1;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  white-space: pre-line;
}

/* Code Snippet Pill inside Card */
.code-action-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #38BDF8;
}

.copy-mini-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition);
}
.copy-mini-btn:hover { background: rgba(255, 255, 255, 0.2); }

/* Notice Callouts */
.callout {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.callout.tip {
  background: rgba(14, 165, 233, 0.1);
  border-left: 3px solid var(--phase2-primary);
  color: #BAE6FD;
}

.callout.warning {
  background: rgba(239, 68, 68, 0.12);
  border-left: 3px solid var(--danger);
  color: #FCA5A5;
  font-weight: 600;
}

.callout.checkpoint {
  background: rgba(245, 158, 11, 0.15);
  border-left: 3px solid var(--warning);
  color: #FDE68A;
  font-weight: 700;
}

.step-card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slide-nav-btns {
  display: flex;
  gap: 0.5rem;
}

.nav-circle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.nav-circle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

/* ==========================================================================
   GRID VIEW MODE (Alternate Full Lab Gallery)
   ========================================================================== */
.grid-view-container {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  width: 100%;
}

.grid-view-container.active {
  display: grid;
}

.horizontal-scroll-wrapper.hidden {
  display: none;
}

.grid-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
}

.grid-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.grid-img-wrap {
  width: 100%;
  height: 200px;
  background: #000;
  overflow: hidden;
}

.grid-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.grid-card:hover .grid-img-wrap img {
  transform: scale(1.04);
}

.grid-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.grid-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0.5rem 0;
  line-height: 1.4;
}

.grid-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   Bottom Floating Control Dock
   ========================================================================== */
.floating-dock {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(18, 24, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.dock-step-info {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
  min-width: 90px;
  text-align: center;
}

.dock-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.dock-nav-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.dock-divider {
  width: 1px;
  height: 20px;
  background: var(--border-subtle);
}

/* ==========================================================================
   Full Screen Lightbox Modal
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 12, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 100;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.lightbox-modal.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-subtle);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close-btn:hover {
  background: var(--danger);
  transform: rotate(90deg);
}

.lightbox-img-wrapper {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-subtle);
}

.lightbox-caption {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.lightbox-caption h4 {
  color: var(--text-primary);
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}
