/* ============================================
   TOTEM TOUCH SCREEN - MINIMALIST THEME
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0066FF;
  --surface: rgba(255, 255, 255, 0.06);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.72);
  --text-tertiary: rgba(255, 255, 255, 0.44);
  --bg-dark: #050508;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --blur: 20px;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
}

.hidden { display: none !important; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: linear-gradient(180deg, rgba(5, 5, 8, 0.9) 0%, transparent 100%);
  z-index: 100;
}

.header-logo { height: 28px; width: auto; }

.header-center { flex: 1; text-align: center; }

.header-tagline {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.header-right { flex: 0 0 auto; }

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

.connection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.connection-dot.online { background: #00E676; box-shadow: 0 0 6px rgba(0, 230, 118, 0.5); }
.connection-dot.offline { background: #FF1744; box-shadow: 0 0 6px rgba(255, 23, 68, 0.5); }

.header-datetime {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.header-time {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}

.header-date {
  font-size: 10px;
  color: var(--text-tertiary);
}

/* ---------- Slider ---------- */
.slider-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  perspective: 1200px;
  perspective-origin: center center;
}

.slider-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

/* ---------- Coverflow Slide ---------- */
.coverflow-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  overflow: hidden;
  transform: translate3d(65%, 0, -200px) rotateY(-35deg) scale(0.82);
  opacity: 0;
  filter: brightness(0.3);
  pointer-events: none;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.45s ease-in,
              filter 0.45s ease-in;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}

.coverflow-slide.active {
  opacity: 1;
  filter: none;
  transform: translate3d(0, 0, 0) rotateY(0deg) scale(1);
  pointer-events: auto;
  z-index: 10;
}

/* ---------- Slide Content ---------- */
.slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
}

.slide-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.slide-gradient-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(180deg, rgba(5, 5, 8, 0.85) 0%, rgba(5, 5, 8, 0.4) 50%, transparent 100%);
  z-index: 2;
}

.slide-gradient-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 65%;
  background: linear-gradient(0deg, rgba(5, 5, 8, 0.97) 0%, rgba(5, 5, 8, 0.75) 40%, rgba(5, 5, 8, 0.35) 70%, transparent 100%);
  z-index: 2;
}

.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 40px 48px 80px;
}

.slide-type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.slide-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.slide-subtitle {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.slide-description {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 20px;
}

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

.slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.slide-btn svg { width: 16px; height: 16px; }

.slide-btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

.slide-btn-primary:active { transform: scale(0.97); }

/* ---------- QR Code no canto ---------- */
.slide-qrcode {
  position: absolute;
  bottom: 80px;
  right: 40px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.slide-qrcode canvas,
.slide-qrcode img {
  width: 64px;
  height: 64px;
  border-radius: 4px;
}

.slide-qrcode-label {
  font-size: 8px;
  color: #666;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---------- Video Slide Overlay ---------- */
.slide-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px 48px 80px;
  background: linear-gradient(0deg, rgba(5, 5, 8, 0.95) 0%, rgba(5, 5, 8, 0.65) 40%, rgba(5, 5, 8, 0.25) 70%, transparent 100%);
}

.slide-video-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(180deg, rgba(5, 5, 8, 0.85) 0%, rgba(5, 5, 8, 0.4) 50%, transparent 100%);
  z-index: -1;
}

/* ---------- Indicators ---------- */
.slider-indicators {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 50;
  padding: 6px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-radius: 20px;
  width: auto;
}

.indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
  outline: none;
  padding: 0;
  opacity: 1;
}

.indicator.active {
  width: 24px;
  border-radius: 3px;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(0, 102, 255, 0.4);
}

/* ---------- Progress Bar ---------- */
.progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  z-index: 90;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.1s linear;
  will-change: width;
}

/* ---------- Nav Buttons ---------- */
.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  outline: none;
  opacity: 0.4;
}

.nav-btn:active { opacity: 1; transform: translateY(-50%) scale(1.1); }
.nav-btn svg { width: 18px; height: 18px; }
.nav-prev { left: 12px; }
.nav-next { right: 12px; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: #111118;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.5);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.modal-close svg { width: 16px; height: 16px; }

.modal-body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.modal-media {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}

.modal-image { width: 100%; height: 100%; object-fit: cover; }
.modal-video { width: 100%; height: 100%; object-fit: cover; }

.modal-info { padding: 24px; }

.modal-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  background: var(--primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #FFF;
  margin-bottom: 10px;
}

.modal-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.modal-subtitle { font-size: 14px; font-weight: 300; color: var(--text-secondary); margin-bottom: 12px; }
.modal-description { font-size: 13px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 20px; }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.modal-btn svg { width: 14px; height: 14px; }
.modal-btn-primary { background: var(--primary); color: #FFF; }
.modal-btn-secondary { background: var(--surface); color: var(--text-primary); border: 1px solid var(--glass-border); }

.modal-qrcode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.modal-qrcode p { font-size: 11px; color: var(--text-tertiary); }

/* ---------- Screensaver ---------- */
.screensaver {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

#screensaver-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.screensaver-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.screensaver-logo {
  width: 140px;
  animation: ssPulse 3s ease-in-out infinite;
}

.screensaver-tagline {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  animation: ssFade 2s ease-in-out infinite;
}

@keyframes ssPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes ssFade { 0%,100% { opacity: 0.3; } 50% { opacity: 0.6; } }

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: #1a1a24;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  animation: toastIn 0.3s ease-out forwards;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.toast.success { border-left: 3px solid #00E676; }
.toast.error { border-left: 3px solid #FF1744; }
.toast.info { border-left: 3px solid var(--primary); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(60px); }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 2px; }

/* ---------- Animations ---------- */
.anim-slide-up {
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.stagger-1 { animation-delay: 0.05s; opacity: 0; }
.stagger-2 { animation-delay: 0.1s; opacity: 0; }
.stagger-3 { animation-delay: 0.15s; opacity: 0; }
.stagger-4 { animation-delay: 0.2s; opacity: 0; }
