:root {
  --bg: #07111f;
  --bg-soft: #101d31;
  --panel: rgba(7, 17, 31, 0.78);
  --panel-strong: rgba(9, 22, 40, 0.92);
  --line: rgba(155, 190, 255, 0.16);
  --text: #f4f7fb;
  --muted: #9bb1c9;
  --accent: #7ef0c1;
  --accent-strong: #4bc7e8;
  --danger: #ff8e84;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(75, 199, 232, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(126, 240, 193, 0.14), transparent 24%),
    linear-gradient(145deg, #030915 0%, #091426 48%, #07111f 100%);
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  position: relative;
  overflow: hidden;
}

.bg-orb {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.45;
  pointer-events: none;
}

.bg-orb-a {
  top: -8rem;
  right: -6rem;
  background: rgba(75, 199, 232, 0.18);
}

.bg-orb-b {
  left: -10rem;
  bottom: -8rem;
  background: rgba(126, 240, 193, 0.14);
}

.layout {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.panel-card {
  backdrop-filter: blur(18px);
}

.card-copy,
.helper-text,
.toolbar-note {
  color: var(--muted);
}

.panel-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(9, 22, 40, 0.6);
  box-shadow: var(--shadow);
}

.stream-header span,
.topbar-label,
label span {
  display: block;
}

.app-panel {
  display: flex;
  justify-content: center;
  width: 100%;
}

.panel-card {
  width: 100%;
  max-width: 1380px;
  padding: 38px;
  background: var(--panel);
}

.console-card {
  min-height: calc(100vh - 88px);
  display: flex;
  flex-direction: column;
}

.card-head,
.console-topbar,
.toolbar-row,
.stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-head {
  gap: 10px;
  justify-content: flex-start;
}

.card-head p,
.topbar-label,
.stream-header small {
  margin: 0;
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 0 18px rgba(126, 240, 193, 0.72);
}

.login-card h2,
.console-topbar h2 {
  margin: 18px 0 8px;
  font-size: 2.4rem;
  letter-spacing: -0.03em;
}

.console-topbar h2 {
  margin-top: 8px;
}

.form-stack {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

label span,
.topbar-label {
  margin-bottom: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(155, 190, 255, 0.14);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--panel-strong);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

input:focus,
select:focus {
  border-color: rgba(126, 240, 193, 0.66);
  transform: translateY(-1px);
}

.primary-btn,
.ghost-btn {
  border-radius: 16px;
  padding: 13px 18px;
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #031018;
  font-weight: 800;
}

.ghost-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.helper-text {
  margin: 18px 0 0;
  line-height: 1.6;
}

.hidden {
  display: none;
}

.controls-grid,
.stream-grid {
  display: grid;
  gap: 16px;
}

.controls-grid {
  margin-top: 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toolbar-row {
  margin-top: 20px;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.toolbar-note {
  font-size: 0.92rem;
}

.stream-grid {
  margin-top: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 1;
}

.stream-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(6, 15, 28, 0.74);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.stream-box {
  min-height: 420px;
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid rgba(155, 190, 255, 0.11);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    rgba(4, 11, 22, 0.85);
  padding: 18px;
  color: #d9e7f7;
  line-height: 1.7;
  white-space: pre-wrap;
  flex: 1;
}

@media (max-width: 980px) {
  .layout {
    padding-top: 28px;
    padding-bottom: 28px;
  }
}

@media (max-width: 720px) {
  .controls-grid,
  .stream-grid {
    grid-template-columns: 1fr;
  }

  .panel-card {
    padding: 22px;
  }

  .console-card {
    min-height: auto;
  }

  .login-card h2,
  .console-topbar h2 {
    font-size: 1.9rem;
  }

  .stream-box {
    min-height: 220px;
  }
}
