* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a, #1e293b, #334155);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 1100px;
}

.app-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

h1 {
  text-align: center;
  font-size: 2.7rem;
  margin-bottom: 10px;
}

.subtitle {
  text-align: center;
  color: #d1d5db;
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

button {
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s ease;
}

#startBtn {
  background: #22c55e;
  color: white;
}

#startBtn:hover {
  background: #16a34a;
}

#stopBtn {
  background: #ef4444;
  color: white;
}

#stopBtn:hover {
  background: #dc2626;
}

.stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.stat-box {
  flex: 1;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.08);
  padding: 16px 18px;
  border-radius: 14px;
}

.stat-box .label {
  display: block;
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-bottom: 8px;
}

.stat-box span:last-child {
  font-size: 1.1rem;
  font-weight: bold;
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
}

video,
canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  display: block;
  top: 0;
  left: 0;
}

.info {
  background: rgba(255, 255, 255, 0.08);
  padding: 16px;
  border-radius: 14px;
  color: #e5e7eb;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .app-card {
    padding: 20px;
  }

  h1 {
    font-size: 2rem;
  }

  .controls button {
    width: 100%;
  }
}