:root {
  --bg-color: #0a0f1a;
  --btn-bg: linear-gradient(145deg, #0d2a4d, #112e58);
  --btn-hover: linear-gradient(145deg, #174c85, #1d5c9a);
  --btn-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  --icon-color: #d0e9ff;
}

body {
  margin: 0;
  padding: 20px;
  background: var(--bg-color);
  font-family: "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}


.control-grid {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  grid-template-rows: repeat(3, 80px);
  gap: 10px;
}

.btn {
  width: 80px;
  height: 80px;
  background: var(--btn-bg);
  border: none;
  border-radius: 12px;
  box-shadow: var(--btn-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;

  touch-action: manipulation;
}

.btn:hover {
  background: var(--btn-hover);
  transform: scale(1.05);
}

.btn i {
  color: var(--icon-color);
  font-size: 28px;
}

.empty {
  width: 80px;
  height: 80px;
}

.input-controls {
  background-color: rgba(20, 20, 30, 0.8);
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  max-width: 90%;
}


.input-controls label {
  color: #ccc;
  font-size: 14px;
}

.input-controls input {
  background-color: #1c2638;
  color: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  min-width: 160px;
}

@media (max-width: 600px) {
  .control-grid {
    grid-template-columns: repeat(3, 60px);
    grid-template-rows: repeat(3, 60px);
  }

  .btn {
    width: 60px;
    height: 60px;
  }

  .btn i {
    font-size: 22px;
  }

  .empty {
    width: 60px;
    height: 60px;
  }

  .input-controls {
    bottom: 10px;
    right: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .input-controls input {
    min-width: 120px;
  }
}




.stream-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
  max-width: 100%;
}

#stream {
  width: 320px;
  height: 240px;
  background-color: #000;
  border: 2px solid #1c2638;
  border-radius: 10px;
  box-shadow: var(--btn-shadow);
  object-fit: cover;
}

/* Responsive */
@media (max-width: 600px) {
  #stream {
    width: 240px;
    height: 180px;
  }
}
