:root {
  --bg: #0b1020;
  --panel: #121a33;
  --panel2: #0f1730;
  --text: #e8ecff;
  --muted: #a9b2d6;
  --accent: #7c5cff;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% 0%, #18234a 0%, var(--bg) 55%);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  outline: none;
}

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

button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(124, 92, 255, 0.2);
  color: var(--text);
  cursor: pointer;
}

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

.muted {
  color: var(--muted);
  font-size: 13px;
}

.notice {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 12px;
  color: var(--muted);
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.spacer {
  flex: 1;
}

.appShell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel2) 100%);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.4px;
  font-size: 18px;
  margin-bottom: 14px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.navBtn {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
}
.navBtn.active {
  border-color: rgba(124, 92, 255, 0.6);
  background: rgba(124, 92, 255, 0.12);
}

.main {
  padding: 18px 20px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.title {
  font-size: 20px;
  font-weight: 750;
}

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

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 14px;
}

.cardTitle {
  font-weight: 700;
  margin-bottom: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

label {
  font-size: 12px;
  color: var(--muted);
}

.memeGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.memeBtn {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}
.memeBtn.selected {
  outline: 2px solid rgba(124, 92, 255, 0.8);
}
.memeBtn img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}

.preview img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 12px;
  margin-top: 8px;
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.feedItem {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
}
.feedItem img {
  width: 120px;
  height: 80px;
  object-fit: cover;
}

.wall {
  min-height: 100vh;
  padding: 18px;
}
.wallTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.wallBrand {
  font-weight: 800;
  letter-spacing: 0.4px;
}
.pill {
  background: rgba(255, 255, 255, 0.05);
}
.stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}
.stageImg {
  width: 100%;
  height: calc(100vh - 120px);
  object-fit: contain;
  display: block;
}
.stageSplit {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 14px;
  height: calc(100vh - 120px);
}
.stagePane {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}
.stagePane img,
.stagePane video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stagePaneOverlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}
.stagePaneTitle {
  font-weight: 800;
  margin-bottom: 6px;
}
.stagePaneText {
  font-size: 18px;
  line-height: 1.3;
}
.stageOverlay {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}
.stageTitle {
  font-weight: 800;
  margin-bottom: 6px;
}
.stageText {
  font-size: 18px;
  line-height: 1.3;
}
.audioUnlockBtn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  border-color: rgba(124, 92, 255, 0.6);
  background: rgba(124, 92, 255, 0.2);
}
.idle {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 18px;
  color: var(--muted);
}

.codeBox {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.25);
  margin: 10px 0;
  word-break: break-all;
}

@media (max-width: 980px) {
  .appShell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
}
