:root {
  /* 科技感配色 */
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1e293b;
  --bg-hover: #2d3748;
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  
  --border-color: #334155;
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.7);
  
  --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  --gradient-accent: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
  --gradient-card: linear-gradient(145deg, #1e293b, #0f172a);
}

/* 动画定义 */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* 布局 */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* 头部 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

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

.logo-icon {
  background: var(--gradient-accent);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  animation: float 3s ease-in-out infinite;
}

.logo-text h1 {
  font-size: 24px;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

.logo-text p {
  font-size: 14px;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.3s ease;
}

.status-dot.live {
  background: var(--accent-green);
  box-shadow: 0 0 15px var(--accent-green);
  animation: pulse 2s infinite;
}

.status-dot.error {
  background: var(--accent-red);
  box-shadow: 0 0 15px var(--accent-red);
}

.status-text {
  font-size: 14px;
  font-weight: 500;
}

/* 主要内容区 */
.main-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 30px;
  margin-bottom: 30px;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
  }
}

/* 视频播放器 */
.video-player {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.player-title {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-title i {
  color: var(--accent-cyan);
}

.stream-info {
  display: flex;
  gap: 15px;
  font-size: 14px;
  color: var(--text-secondary);
}

.stream-info span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  margin-bottom: 15px;
}

#video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  outline: none;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.video-container:hover .video-overlay {
  opacity: 1;
}

.player-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

.control-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent-blue);
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

/* 侧边栏 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: var(--gradient-card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.info-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-cyan);
}

.info-card h3 i {
  font-size: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.stat-item {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 10px;
  padding: 15px;
  border: 1px solid var(--border-color);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
}

.stat-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.detection-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 5px;
}

/* 滚动条样式 */
.detection-list::-webkit-scrollbar {
  width: 6px;
}

.detection-list::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.3);
  border-radius: 3px;
}

.detection-list::-webkit-scrollbar-thumb {
  background: var(--accent-blue);
  border-radius: 3px;
}

.detection-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 10px;
  border-left: 4px solid var(--accent-blue);
  transition: all 0.2s;
}

.detection-item:hover {
  background: rgba(30, 41, 59, 0.8);
  transform: translateX(5px);
}

.detection-item.person {
  border-left-color: var(--accent-green);
}

.detection-item.car {
  border-left-color: var(--accent-purple);
}

.detection-item.dog {
  border-left-color: var(--accent-pink);
}

.detection-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.detection-confidence {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-secondary);
}

/* 页脚 */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 14px;
}

.tech-stack {
  display: flex;
  gap: 20px;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.latency-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.latency-value {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-green);
  font-weight: 600;
}

/* 页脚版权信息 */
.copyright {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.8;
}

.copyright span {
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.3px;
}

/* 版权链接样式 */
.copyright-link {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.copyright-link:hover {
  color: var(--accent-blue);
  border-bottom: 1px solid var(--accent-blue);
  text-decoration: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .player-controls {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .control-buttons {
    width: 100%;
    justify-content: space-between;
  }
  
  .footer {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .copyright {
    font-size: 11px;
    margin-top: 8px;
  }
}
