/* Quantum Demo Styles */

/* Demo container layout */
.demo-container {
  display: flex;
  height: 85vh;
  gap: 20px;
  padding: 20px;
  background: transparent;
  color: #fff;
}

/* Visualization panel (left 70%) */
.viz-panel {
  flex: 0 0 70%;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(10px);
}

/* Before/After visualization comparison */
.viz-comparison {
  display: flex;
  gap: 20px;
  flex: 1;
}

.viz-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.viz-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  opacity: 0.7;
  margin-bottom: 10px;
  font-weight: 600;
}

.viz-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 10px;
  min-height: 300px;
}

/* Right controls and metrics column (30%) */
.demo-controls {
  flex: 0 0 30%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Metrics panel - removed, now part of demo-controls */
.metrics-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
  width: 100%;
}

/* Quantum Optimize Button - BIG BLUE IMPOSSIBLE TO MISS */
.quantum-optimize-btn {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
  flex: 1;
}

.quantum-optimize-btn:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.7);
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.quantum-optimize-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.quantum-optimize-btn.quantum-glow {
  animation: quantum-pulse 1.5s infinite;
}

@keyframes quantum-pulse {
  0%, 100% {
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5);
  }
  50% {
    box-shadow: 0 8px 50px rgba(37, 99, 235, 0.9), 0 0 70px rgba(37, 99, 235, 0.5);
  }
}

/* Button and Speedup Row */
.button-speedup-row {
  display: flex;
  gap: 15px;
  width: 100%;
  align-items: stretch;
}

#speedup-display {
  flex: 0 0 33.333%;
  display: flex;
}

/* Reset and Try Another buttons */
.demo-secondary-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 12px 24px;
  font-size: 14px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
}

.demo-secondary-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Speedup display - side by side with reset button */
.metric-speedup {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  padding: 8px 12px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.speedup-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: 2px;
}

.speedup-value {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  line-height: 1;
}

/* Table-style metrics */
.metrics-table {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.metric-row {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 15px;
  backdrop-filter: blur(10px);
  width: 100%;
}

.metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.metric-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.metric-value-cell {
  text-align: center;
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
}

.value-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.6;
  margin-bottom: 4px;
  display: block;
}

.value-number {
  font-size: 20px;
  font-weight: bold;
  display: block;
}

.value-before {
  color: #ffa500;
}

.value-after {
  color: #4CAF50;
}

/* Improvement indicator */
.metric-improvement {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  margin-top: 8px;
  transition: all 0.3s ease;
}

/* Legacy metric value for compatibility */
.metric-value {
  font-size: 28px;
  font-weight: bold;
  margin: 10px 0;
  transition: color 0.3s ease;
}

/* Simple bar chart */
.simple-bar-chart {
  margin-top: 10px;
}

.simple-bar-chart > div {
  height: 24px;
  margin: 5px 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  transition: width 0.5s ease;
}

.bar-label {
  font-size: 11px;
  color: #fff;
  font-weight: bold;
}

/* Status bar at bottom */
.demo-status {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  text-align: center;
  font-size: 14px;
  border-radius: 8px;
  margin-top: 15px;
}

/* SVG visualization styles */
.grid-viz {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 10px;
}

.datacenter-viz {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 0;
}

.edge-congested {
  stroke: #ff4444 !important;
}

.edge-normal {
  stroke: #ffa500 !important;
}

.edge-optimal {
  stroke: #44ff44 !important;
}

/* Success indicators */
.success-check {
  animation: check-appear 0.5s ease;
}

@keyframes check-appear {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Quantum wave effects */
.quantum-waves {
  pointer-events: none;
}

/* Disclaimer section */
.demo-disclaimer {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #667eea;
  padding: 15px 40px;
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.demo-disclaimer a {
  color: #667eea;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.demo-disclaimer a:hover {
  color: #764ba2;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .demo-container {
    flex-direction: column;
    height: auto;
  }

  .viz-panel, .demo-controls, .metrics-panel {
    flex: 1 1 auto;
  }
}

/* Tablet responsive (768px - 1024px) */
@media (max-width: 1024px) {
  .demo-container {
    padding: 15px;
    gap: 15px;
  }

  .viz-panel {
    padding: 15px;
  }

  .viz-comparison {
    gap: 15px;
  }

  .button-speedup-row {
    flex-direction: column;
    gap: 10px;
  }

  #speedup-display {
    flex: 1 1 auto;
  }

  .quantum-optimize-btn {
    font-size: 16px;
    padding: 10px 20px;
  }
}

/* Mobile responsive (below 768px) */
@media (max-width: 768px) {
  .demo-container {
    padding: 10px;
    gap: 10px;
    height: auto;
  }

  .viz-panel {
    padding: 12px;
  }

  .viz-comparison {
    flex-direction: column;
    gap: 15px;
  }

  .viz-container {
    min-height: 250px;
    padding: 8px;
  }

  .demo-controls {
    gap: 15px;
  }

  .metrics-panel {
    gap: 12px;
  }

  .quantum-optimize-btn {
    font-size: 16px;
    padding: 14px 20px;
    letter-spacing: 1px;
  }

  .demo-secondary-btn {
    padding: 10px 18px;
    font-size: 13px;
  }

  .button-speedup-row {
    flex-direction: column;
    gap: 10px;
  }

  #speedup-display {
    flex: 1 1 auto;
  }

  .metric-row {
    padding: 12px;
  }

  .value-number {
    font-size: 18px;
  }

  .speedup-value {
    font-size: 18px;
  }

  .demo-disclaimer {
    padding: 12px 20px;
    font-size: 12px;
  }
}

/* Small mobile (below 480px) */
@media (max-width: 480px) {
  .demo-container {
    padding: 8px;
    gap: 8px;
  }

  .viz-panel {
    padding: 10px;
    border-radius: 8px;
  }

  .viz-label {
    font-size: 10px;
    margin-bottom: 6px;
  }

  .viz-container {
    min-height: 200px;
    padding: 6px;
  }

  .quantum-optimize-btn {
    font-size: 14px;
    padding: 12px 16px;
    letter-spacing: 0.5px;
  }

  .demo-secondary-btn {
    padding: 8px 14px;
    font-size: 12px;
  }

  .metric-row {
    padding: 10px;
  }

  .metric-label {
    font-size: 10px;
    margin-bottom: 8px;
  }

  .metric-values {
    gap: 8px;
  }

  .value-number {
    font-size: 16px;
  }

  .value-label {
    font-size: 8px;
  }

  .speedup-value {
    font-size: 16px;
  }

  .speedup-label {
    font-size: 10px;
  }

  .demo-status {
    padding: 10px;
    font-size: 12px;
  }

  .demo-disclaimer {
    padding: 10px 15px;
    font-size: 11px;
  }
}
