/* ==========================================================================
   TradOpiax - Quotex-Style Dynamic Dashboard Video Preview & Background
   Architecture: High-Tech FinTech Terminal, Ambient Backdrop, 3D Glass Chassis
   ========================================================================== */

/* Ambient Video Background Canvas */
.ambient-glow-wrapper {
  position: absolute;
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
  width: 140%;
  max-width: 1100px;
  height: 120%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
  opacity: 0.85;
  transition: opacity 0.8s ease;
}

.ambient-glow-canvas {
  width: 100%;
  height: 100%;
  filter: blur(65px) saturate(1.8) brightness(1.15);
  opacity: 0.65;
  transform: scale(1.15);
  transform-origin: center;
  transition: opacity 0.4s ease;
}

/* Hero Showcase Container */
.quotex-preview-showcase {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  perspective: 1400px;
  z-index: 10;
}

/* 3D Perspective Card Chassis */
.terminal-device-frame {
  position: relative;
  width: 100%;
  background: rgba(10, 15, 29, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 
    0 30px 80px -15px rgba(0, 0, 0, 0.9),
    0 0 60px -10px rgba(0, 230, 118, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.18s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.terminal-device-frame:hover {
  border-color: rgba(0, 230, 118, 0.35);
  box-shadow: 
    0 40px 100px -15px rgba(0, 0, 0, 0.95),
    0 0 80px -5px rgba(0, 230, 118, 0.3),
    0 0 40px rgba(0, 229, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Glass Specular Sheen (Moves on Mouse Hover) */
.terminal-glare-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.14) 0%, transparent 65%);
  opacity: 0.6;
  mix-blend-mode: overlay;
  transition: opacity 0.3s ease;
}

/* Window Chrome / Title Bar */
.terminal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(4, 9, 20, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.terminal-window-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-address-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  color: #94a3b8;
  letter-spacing: 0.3px;
}

.terminal-address-pill .lock-icon {
  color: #00e676;
  font-size: 11px;
}

.terminal-address-pill .host-name {
  color: #cbd5e1;
  font-weight: 600;
}

.terminal-address-pill .path-name {
  color: #64748b;
}

.terminal-status-chips {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.3);
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 800;
  color: #00e676;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chip-live-beacon {
  width: 7px;
  height: 7px;
  background: #00e676;
  border-radius: 50%;
  box-shadow: 0 0 10px #00e676;
  animation: beaconPulse 1.8s infinite;
}

@keyframes beaconPulse {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 7px rgba(0, 230, 118, 0); }
  100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

.chip-asset-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  color: #e2e8f0;
}

.chip-payout {
  color: #00e676;
  font-weight: 800;
}

/* Screen Canvas Area */
.terminal-screen-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #060b14;
  overflow: hidden;
  cursor: pointer;
}

.dashboard-preview-canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: filter 0.2s ease;
}

/* Scanline / CRT Subtle Overlay */
.terminal-screen-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  opacity: 0.25;
  z-index: 15;
}

/* Screen Watermark & Notification Overlay */
.terminal-action-toast {
  position: absolute;
  top: 14px;
  left: 16px;
  padding: 8px 14px;
  background: rgba(6, 11, 24, 0.85);
  border: 1px solid rgba(0, 230, 118, 0.4);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 25;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 230, 118, 0.2);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(0);
}

.terminal-action-toast.hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.toast-icon {
  font-size: 14px;
}

.toast-accent {
  color: #00e676;
  font-weight: 800;
}

/* Play/Pause Hover Center Badge */
.terminal-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 7, 18, 0.35);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 22;
  pointer-events: none;
}

.terminal-screen-wrapper:hover .terminal-play-overlay.show-overlay {
  opacity: 1;
}

.play-overlay-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(10, 15, 29, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

/* Bottom Transport / Scrubbing Deck */
.terminal-control-deck {
  padding: 12px 18px 14px 18px;
  background: rgba(4, 9, 20, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Scrubber Timeline Bar */
.terminal-timeline-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  cursor: pointer;
  padding: 6px 0;
  background-clip: content-box;
  transition: height 0.15s ease;
}

.terminal-timeline-bar:hover {
  height: 8px;
}

.timeline-buffer {
  position: absolute;
  top: 6px;
  left: 0;
  height: calc(100% - 12px);
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  pointer-events: none;
  transition: width 0.2s ease;
}

.timeline-progress {
  position: absolute;
  top: 6px;
  left: 0;
  height: calc(100% - 12px);
  background: linear-gradient(90deg, #00c853, #00e676, #00e5ff);
  border-radius: 4px;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.6);
}

.timeline-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: 2px solid #00e676;
  border-radius: 50%;
  box-shadow: 0 0 12px #00e676;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.terminal-timeline-bar:hover .timeline-handle,
.terminal-timeline-bar.active .timeline-handle {
  opacity: 1;
}

/* Control Buttons & Timestamps */
.terminal-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.controls-left-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.deck-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #e2e8f0;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.deck-btn:hover {
  background: rgba(0, 230, 118, 0.15);
  border-color: rgba(0, 230, 118, 0.4);
  color: #00e676;
  transform: translateY(-1px);
}

.deck-btn.active {
  background: rgba(0, 230, 118, 0.2);
  border-color: #00e676;
  color: #00e676;
}

.btn-play-pause {
  width: 34px;
  height: 32px;
  padding: 0;
  font-size: 14px;
}

.timecode-label {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.controls-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.speed-selector-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 2px;
}

.speed-chip {
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.speed-chip:hover {
  color: #fff;
}

.speed-chip.active {
  background: rgba(0, 230, 118, 0.2);
  color: #00e676;
}

.btn-fullscreen {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 14px;
}

/* Floating Interactive Metric Cards around the Preview */
.floating-preview-card {
  position: absolute;
  padding: 12px 16px;
  background: rgba(11, 16, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65), 0 0 25px rgba(0, 230, 118, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 25;
  pointer-events: auto;
  transition: transform 0.3s ease, border-color 0.3s ease;
  animation: floatCardMotion 7s ease-in-out infinite;
}

.floating-preview-card:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: rgba(0, 230, 118, 0.4);
}

.floating-preview-card.card-top-left {
  top: -24px;
  left: -28px;
}

.floating-preview-card.card-bottom-right {
  bottom: -22px;
  right: -24px;
  animation-delay: -3.5s;
}

@keyframes floatCardMotion {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.card-icon-pill {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.card-icon-pill.green {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: #00e676;
}

.card-icon-pill.cyan {
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: #00e5ff;
}

.card-content-stack {
  display: flex;
  flex-direction: column;
}

.card-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.card-value {
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.card-value.green {
  color: #00e676;
}

/* Fullscreen Modal View */
.terminal-fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(3, 7, 18, 0.94);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.terminal-fullscreen-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-inner-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  background: #060b14;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.9), 0 0 80px rgba(0, 230, 118, 0.25);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 100;
}

.modal-close-btn:hover {
  background: #ff5f56;
  border-color: #ff5f56;
  transform: rotate(90deg);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .quotex-preview-showcase {
    max-width: 100%;
    margin-top: 30px;
  }
  
  .floating-preview-card.card-top-left {
    top: -16px;
    left: 0;
  }
  
  .floating-preview-card.card-bottom-right {
    bottom: -16px;
    right: 0;
  }
  
  .ambient-glow-wrapper {
    left: 50%;
    width: 120%;
  }
}

@media (max-width: 640px) {
  .terminal-topbar {
    padding: 10px 12px;
  }
  
  .terminal-address-pill {
    display: none;
  }
  
  .floating-preview-card {
    display: none; /* Hide floating badges on extra small screens for clean viewing */
  }
  
  .terminal-control-deck {
    padding: 10px 12px;
  }
  
  .speed-selector-group {
    display: none;
  }
}
