/* Temporal QR Demo Styles - Enhanced */

:root {
  --qr-primary: #0d6efd;
  --qr-secondary: #6610f2;
  --qr-accent: #0dcaf0;
  --qr-success: #198754;
  --qr-bg: #f8f9fa;
  --qr-dark: #212529;
  --monitor-bezel: #333;
  --monitor-screen: #000;
}

/* Demo Container */
.demo-container {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.demo-title {
  font-weight: 700;
  color: var(--gold);
  position: relative;
  display: inline-block;
}

.demo-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--qr-primary), var(--qr-accent));
  border-radius: 2px;
}

/* Layout */
.temporal-demo-area {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.qr-display-section {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2rem;
  height: 400px;
  position: relative;
  perspective: 1000px;
}

/* Monitor Styles */
.qr-monitor {
  width: 280px;
  height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.monitor-frame {
  width: 100%;
  height: 240px;
  background: var(--monitor-bezel);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  position: relative;
}

.qr-content {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.qr-image {
  width: 180px;
  height: 180px;
  object-fit: contain;
  transition: transform 0.1s linear;
}

.frame-indicator {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 10px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Roboto Mono', monospace;
}

.micro-region {
  position: absolute;
  border: 2px solid var(--qr-accent);
  background: rgba(13, 202, 240, 0.2);
  border-radius: 4px;
  pointer-events: none;
  box-shadow: 0 0 10px var(--qr-accent);
  z-index: 10;
}

.monitor-stand {
  width: 80px;
  height: 60px;
  background: linear-gradient(180deg, #444 0%, #222 100%);
  clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
  margin-top: -5px;
}

/* Phone Scanner Styles */
.phone-scanner {
  width: 160px;
  height: 300px;
  position: relative;
  z-index: 3;
  transform: rotateY(-15deg) translateZ(20px);
  transition: transform 0.5s ease;
}

.phone-body {
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  border-radius: 24px;
  padding: 8px;
  box-shadow: 20px 20px 40px rgba(0,0,0,0.2);
  border: 2px solid #444;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}

.scanner-interface {
  width: 100%;
  height: 100%;
  position: relative;
  background: rgba(0,0,0,0.8);
}

.scanner-overlay {
  position: absolute;
  top: 20px;
  left: 10px;
  right: 10px;
  height: 180px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
}

.scanner-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--qr-accent);
  border-style: solid;
  transition: all 0.3s ease;
}

.scanner-corner.tl { top: -1px; left: -1px; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.scanner-corner.tr { top: -1px; right: -1px; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.scanner-corner.bl { bottom: -1px; left: -1px; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.scanner-corner.br { bottom: -1px; right: -1px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

.scanner-active .scanner-corner {
  border-color: var(--qr-success);
  box-shadow: 0 0 10px var(--qr-success);
}

.scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--qr-accent);
  box-shadow: 0 0 10px var(--qr-accent);
  opacity: 0;
}

.collection-status {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
}

.frame-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.frame-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: all 0.3s ease;
}

.frame-dot.collected {
  background: var(--qr-success);
  box-shadow: 0 0 5px var(--qr-success);
  transform: scale(1.2);
}

.status-text {
  color: white;
  font-size: 12px;
  font-family: 'Roboto Mono', monospace;
}

/* Reassembly Animation Styles */
.reassembly-display {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.95);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

.reassembly-section {
  width: 100%;
  margin-bottom: 5px;
}

.section-title {
  font-size: 10px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 4px;
  text-align: center;
  letter-spacing: 1px;
}

.qr-mini-grid {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.qr-mini-fragment {
  width: 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f0f0f0;
  padding: 2px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.mini-fragment-qr {
  width: 25px;
  height: 25px;
  opacity: 0.8;
}

.mini-fragment-text {
  font-size: 8px;
  font-family: 'Roboto Mono', monospace;
  margin-top: 2px;
  color: #333;
}

.reorder-arrow {
  font-size: 12px;
  color: var(--qr-primary);
  margin: 2px 0;
  font-weight: bold;
}

.decrypted-message {
  margin-top: 5px;
  text-align: center;
}

.message-arrow {
  font-size: 12px;
  color: var(--qr-success);
  margin-bottom: 2px;
}

.final-message {
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  font-weight: bold;
  color: var(--qr-success);
  background: rgba(25, 135, 84, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--qr-success);
}

/* Biometric Styles */
.biometric-scanner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.biometric-prompt {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

.fingerprint-icon {
  font-size: 40px;
  color: var(--qr-accent);
  margin-bottom: 10px;
  opacity: 0.8;
}

.biometric-text {
  font-size: 14px;
  font-weight: 600;
}

.biometric-subtext {
  font-size: 10px;
  opacity: 0.7;
}

.biometric-sensor {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.biometric-sensor:hover {
  border-color: var(--qr-accent);
  box-shadow: 0 0 15px rgba(13, 202, 240, 0.3);
}

.sensor-center {
  font-size: 30px;
  color: rgba(255,255,255,0.5);
  transition: all 0.3s ease;
}

.biometric-sensor:active .sensor-center {
  color: var(--qr-accent);
  transform: scale(0.95);
}

.scan-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--qr-accent);
  opacity: 0;
}

/* Auth Complete */
.auth-complete {
  text-align: center;
  padding: 20px;
}

.success-icon {
  font-size: 48px;
  color: var(--qr-success);
  margin-bottom: 15px;
}

.complete-message {
  font-size: 16px;
  font-weight: bold;
  color: var(--gold);
  margin-bottom: 5px;
}

.auth-details {
  font-size: 12px;
  color: #a0a0a0;
}

/* Controls */
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.demo-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-btn.primary {
  background: var(--qr-primary);
  color: white;
  box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
}

.demo-btn.primary:hover {
  background: #0b5ed7;
  transform: translateY(-2px);
}

.demo-btn.secondary {
  background: #e9ecef;
  color: var(--qr-dark);
}

.demo-btn.secondary:hover {
  background: #dee2e6;
}

.demo-btn.scanner-btn {
  background: var(--qr-dark);
  color: white;
  margin-left: auto;
}

/* Timeline */
.timeline-container {
  padding: 20px;
}

.timeline-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--gold);
}

.timeline-step {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.timeline-step.active {
  opacity: 1;
}

.step-number {
  width: 32px;
  height: 32px;
  background: #e9ecef;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.timeline-step.active .step-number {
  background: var(--qr-primary);
  color: white;
  box-shadow: 0 0 10px rgba(13, 110, 253, 0.4);
}

.step-content h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--gold);
}

.step-content p {
  font-size: 0.875rem;
  color: #a0a0a0;
  margin: 0;
}

/* Advanced Demo Styles */
.qr-demo-container {
  background: transparent;
  padding: 20px;
}

.settings-panel {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.setting-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qr-container {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
}

.security-meter {
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  flex-grow: 1;
  margin: 0 10px;
}

.security-fill {
  height: 100%;
  width: 80%;
  background: var(--qr-success);
  transition: width 0.3s ease;
}

.security-level {
  display: flex;
  align-items: center;
  margin-top: 15px;
  font-size: 0.875rem;
}

/* Advanced Demo Headings */
.qr-demo-title,
#advanced-qr-demo .card-header h3 {
  color: var(--gold) !important;
}

/* Responsive */
@media (max-width: 991px) {
  .qr-display-section {
    flex-direction: column;
    align-items: center;
    height: auto;
  }
  
  .phone-scanner {
    transform: none;
    margin-top: -40px;
  }
  
  .demo-btn.scanner-btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}
