:root {
  --bg: #0b0b0f;
  --bg-soft: #111218;
  --panel: #171922;
  --panel-2: #1d2030;
  --text: #f5f7ff;
  --muted: #a9b0c4;
  --border: #2b3146;
  --brand: #e50914;
  --brand-2: #ff3341;
  --focus: #ff4d5a;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

html, body {
  background: radial-gradient(1200px 600px at 30% -10%, #1a1a28 0%, var(--bg) 42%, #08090d 100%) !important;
  color: var(--text) !important;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
}

h1, h2, h3 {
  color: #ffffff !important;
  letter-spacing: 0.2px;
}

p, .meta, .hint, label, .pill, .mode-badge, .pitch-val, .step-head {
  color: var(--muted) !important;
}

a {
  color: #ff7d86;
}

a:hover {
  color: #ff9ea5;
}

.head, .bar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border) !important;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.app-topbar {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 10px !important;
  min-height: 34px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
  height: 30px;
}

.brand-logo-img {
  height: 30px;
  width: auto;
  display: block;
}

.brand-text {
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.top-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1 1 auto;
  min-width: 0;
  height: 30px;
  line-height: 1;
  align-self: center;
}

.top-nav a {
  text-decoration: none;
  color: #d6ddf3;
  padding-left: 8px;
  margin-left: 2px;
  border-left: 1px solid #313a56;
}

.top-nav a:hover {
  color: #ffffff;
}

.nav-sep {
  color: #5f6987;
  opacity: 0.9;
  flex: 0 0 auto;
}

.user-chip {
  color: #9da8c7;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0 6px 0 0;
  display: inline;
  white-space: nowrap;
  flex: 0 0 auto;
  padding-right: 8px;
  border-right: 1px solid #313a56;
}

.card, .deck, .panel, .item, .list-wrap, .sequencer-wrap, .fx-panel, .list-wrap, .panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-2)) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow);
}

.cell, .ch-label, .step-head {
  background: #121522 !important;
  border-color: #2a3045 !important;
}

.step-head.bar {
  background: #1d2437 !important;
  border-color: #3a4869 !important;
}

input, select, textarea {
  background: #0f1220 !important;
  color: #f5f7ff !important;
  border: 1px solid #2e3750 !important;
  border-radius: 10px !important;
}

.check-inline {
  justify-content: flex-start !important;
}

input::placeholder {
  color: #7f89a6 !important;
}

button, .card a, a[download], .cell-clear, .cell-download {
  background: linear-gradient(180deg, var(--brand), #bf0811) !important;
  color: #fff !important;
  border: 1px solid #9a0710 !important;
  border-radius: 10px !important;
  box-shadow: 0 6px 14px rgba(229, 9, 20, 0.35);
}

button:hover, .card a:hover {
  background: linear-gradient(180deg, var(--brand-2), #cc1b28) !important;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input:focus, select:focus, button:focus {
  outline: 2px solid var(--focus) !important;
  outline-offset: 1px;
}

audio {
  filter: saturate(0.8) brightness(0.95);
}

.tag {
  background: #1f2438 !important;
  border-color: #384162 !important;
  color: #cbd5ff !important;
}

.tag.loop {
  background: #1d2a26 !important;
  border-color: #335647 !important;
  color: #b5f6d8 !important;
}

.error {
  color: #ff8a92 !important;
}

/* Global scrollbar styling */
* {
  scrollbar-width: thin;
  scrollbar-color: #3a425f #111522;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: #111522;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4b5578, #353d58);
  border: 2px solid #111522;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #5d6a95, #414b6d);
}

*::-webkit-scrollbar-corner {
  background: #111522;
}
