:root {
  color-scheme: dark;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 50, 200, 0.18),
      transparent 24%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(255, 0, 150, 0.14),
      transparent 28%
    ),
    linear-gradient(180deg, #08030f 0%, #12061d 100%);
  color: #f8f8ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: rgba(16, 8, 28, 0.95);
  border: 1px solid rgba(255, 0, 150, 0.12);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-content: center;
  background: linear-gradient(135deg, #ff2fa4, #9d00ef);
  color: white;
  font-weight: 700;
  font-size: 1.4rem;
}

.brand h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.03em;
}

.brand p {
  margin: 4px 0 0;
  color: #d4c5f2;
  font-size: 0.95rem;
}

nav {
  display: grid;
  gap: 10px;
}

.nav-button {
  border: none;
  border-radius: 18px;
  padding: 16px 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  color: #f8f8ff;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-button:hover,
.nav-button.active {
  background: rgba(255, 47, 164, 0.18);
  box-shadow: 0 12px 34px rgba(255, 47, 164, 0.14);
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-footer .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  background: #ff2fa4;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: start;
}

.page-header .eyebrow {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #ff8de9;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.page-header h2 {
  margin: 0;
  font-size: clamp(2rem, 2.6vw, 3rem);
  line-height: 1.05;
}

.page-header p {
  margin: 12px 0 0;
  color: #d8c8ff;
  line-height: 1.7;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card {
  background: rgba(18, 10, 28, 0.92);
  border: 1px solid rgba(255, 47, 164, 0.14);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.28);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #f6e8ff;
}

.field input,
.field select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  color: #f8f8ff;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field input::placeholder {
  color: rgba(248, 248, 255, 0.5);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: #ff2fa4;
  box-shadow: 0 0 0 4px rgba(255, 47, 164, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.actions-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

button.primary,
button.secondary {
  border: none;
  border-radius: 18px;
  padding: 16px 18px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

button.primary {
  background: linear-gradient(135deg, #ff2fa4, #ff63c5);
  color: white;
  box-shadow: 0 18px 40px rgba(255, 47, 164, 0.28);
}

button.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #f8f8ff;
}

button.primary:hover,
button.secondary:hover,
.nav-button:hover {
  transform: translateY(-1px);
}

.status {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: #f8f8ff;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status.error {
  background: rgba(255, 20, 120, 0.15);
  color: #ffccd9;
  border-color: rgba(255, 20, 120, 0.28);
}

.status.success {
  background: rgba(75, 0, 120, 0.2);
  color: #e9c2ff;
  border-color: rgba(255, 47, 164, 0.22);
}

.metadata-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.media-preview {
  min-height: 240px;
  border-radius: 24px;
  overflow: hidden;
  background: #0f0714;
  display: grid;
  place-items: center;
}

.media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.meta-grid div {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.meta-grid strong {
  display: block;
  margin-bottom: 10px;
  color: #f8f8ff;
}

.meta-grid span {
  color: #d5c6ff;
}

.note {
  margin-top: 10px;
  color: #d8c8ff;
  line-height: 1.7;
}

.playlist-panel {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding: 10px 0;
}

.playlist-entry {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.playlist-entry input {
  width: 18px;
  height: 18px;
  accent-color: #ff2fa4;
}

.playlist-entry strong {
  display: block;
  color: #f8f8ff;
}

.playlist-entry small {
  color: #d8c8ff;
}

code {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 2px 6px;
  color: #ffd2ff;
  font-size: 0.95em;
}

.checkbox-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.checkbox-grid input {
  width: 18px;
  height: 18px;
  accent-color: #ff2fa4;
}

.list-panel {
  display: grid;
  gap: 14px;
}

.list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.list-item strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 8px;
  color: #f8f8ff;
}

.list-item p {
  margin: 0;
  color: #d8c8ff;
  font-size: 0.95rem;
}

.list-item .item-meta {
  text-align: right;
  display: grid;
  gap: 10px;
}

.list-item .item-meta button {
  width: 100%;
}

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

.card-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.log-panel {
  min-height: 280px;
  max-height: 520px;
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  background: #100816;
  color: #ffcdfb;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  line-height: 1.7;
  border: 1px solid rgba(255, 47, 164, 0.15);
}

.log-panel div {
  margin-bottom: 10px;
}

.log-panel .error {
  color: #ff8dd1;
}

.progress-bar {
  margin-top: 18px;
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #ff2fa4, #ff7ce0);
  transition: width 0.25s ease;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.hidden {
  display: none !important;
}

.log-card.collapsed .log-panel,
.log-card.collapsed .progress-bar {
  display: none !important;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-button,
  .field input,
  .field select,
  button {
    width: 100%;
  }
  .actions-row {
    grid-template-columns: 1fr;
  }
  .checkbox-grid {
    grid-template-columns: 1fr;
  }
}
