:root {
  color-scheme: dark;
  --bg: #09111d;
  --bg-soft: #101b2d;
  --panel: rgba(12, 22, 38, 0.88);
  --panel-strong: #13243f;
  --border: rgba(118, 154, 255, 0.22);
  --text: #ebf2ff;
  --muted: #9eb1d4;
  --accent: #76d0ff;
  --accent-strong: #3bb8ff;
  --danger: #ff6f86;
  --success: #6ee7b7;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(59, 184, 255, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(118, 208, 255, 0.08), transparent 24%),
    linear-gradient(180deg, #09111d 0%, #070d18 100%);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  gap: 20px;
}

.dashboard {
  grid-template-columns: 320px 1fr;
  align-items: start;
}

.stack {
  display: grid;
  gap: 14px;
}

.pad {
  padding: 22px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}

.hero h1, .hero h2, .hero h3, .hero p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(118, 208, 255, 0.08);
  border: 1px solid rgba(118, 208, 255, 0.18);
  color: var(--accent);
  font-size: 13px;
}

.button, button, input[type="submit"] {
  appearance: none;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #49c4ff 0%, #1788ff 100%);
  color: #03111f;
  cursor: pointer;
  font-weight: 700;
  padding: 11px 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 30px rgba(23, 136, 255, 0.24);
}

.button:hover, button:hover, input[type="submit"]:hover {
  transform: translateY(-1px);
}

.button.alt {
  background: rgba(118, 208, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(118, 208, 255, 0.2);
  box-shadow: none;
}

.button.danger {
  background: linear-gradient(135deg, #ff8aa0 0%, #ff5a7b 100%);
  color: #22020c;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

input, select, textarea {
  width: 100%;
  border: 1px solid rgba(118, 154, 255, 0.18);
  background: rgba(6, 14, 25, 0.9);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 14px;
  outline: none;
}

textarea {
  min-height: 200px;
  resize: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(118, 154, 255, 0.12);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.stats {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat strong {
  display: block;
  font-size: 28px;
  margin-top: 6px;
}

.viewer {
  width: min(960px, calc(100% - 32px));
  margin: 34px auto;
}

.media-box {
  display: grid;
  gap: 18px;
}

.media-frame {
  background: rgba(4, 10, 20, 0.95);
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 320px;
}

.media-frame img, .media-frame video {
  max-width: 100%;
  max-height: 72vh;
  display: block;
}

.flash {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(118, 154, 255, 0.18);
}

.flash.success {
  background: rgba(110, 231, 183, 0.08);
  color: var(--success);
}

.flash.error {
  background: rgba(255, 111, 134, 0.08);
  color: #ffc2cc;
}

.code {
  background: rgba(4, 10, 20, 0.96);
  border-radius: 18px;
  padding: 16px;
  font-family: "Cascadia Code", "Fira Code", monospace;
  overflow-x: auto;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  align-self: start;
  justify-self: start;
  width: 100%;
  max-height: 70vh;
}

.code-wrap {
  position: relative;
  align-self: start;
  justify-self: start;
  width: 100%;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  appearance: none;
  border: 1px solid rgba(118, 208, 255, 0.2);
  border-radius: 10px;
  background: rgba(12, 22, 38, 0.9);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 6px 12px;
  transition: background 0.15s, color 0.15s;
  z-index: 2;
}

.copy-btn:hover {
  background: rgba(118, 208, 255, 0.12);
  color: var(--text);
}

.copy-btn.copied {
  background: rgba(110, 231, 183, 0.15);
  color: var(--success);
  border-color: rgba(110, 231, 183, 0.3);
}

.empty {
  padding: 18px;
  border: 1px dashed rgba(118, 154, 255, 0.18);
  border-radius: 18px;
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(118, 154, 255, 0.18);
  color: var(--muted);
  font-size: 12px;
}

.right {
  text-align: right;
}

@media (max-width: 920px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

