:root {
  --bg: #0b0e17;
  --bg-elevated: #121726;
  --bg-card: #161c2e;
  --bg-input: #0e1320;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #ffd43b;
  --accent-2: #00e5ff;
  --accent-grad: linear-gradient(135deg, #ffd43b, #ff922b);
  --danger: #f43f5e;
  --success: #22c55e;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at 15% 0%, #17203a 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

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

.small {
  font-size: 0.84rem;
}

.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

/* Shell & Topbar */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(11, 14, 23, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-grad);
  color: #111;
  font-weight: 900;
  font-size: 1.35rem;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(255, 212, 59, 0.35);
}

.brand h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-tag {
  color: var(--accent);
  font-weight: 600;
}

.brand-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.step-nav {
  display: flex;
  gap: 6px;
  background: var(--bg-elevated);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.step-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.step-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.step-btn.active {
  background: rgba(255, 212, 59, 0.16);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 212, 59, 0.35);
}

.step-num {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}

.step-btn.active .step-num {
  background: var(--accent);
  color: #111;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Workspace */
.workspace {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 20px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel-step {
  display: none;
}

.panel-step.active {
  display: block;
}

/* Cards & Grids */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

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

.card-head h2, .card-head h3, .card > h2, .card > h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.sync-grid {
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 18px;
  margin-top: 16px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 0.96rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent-grad);
  color: #11131a;
  box-shadow: 0 4px 16px rgba(255, 196, 46, 0.25);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.13);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger-ghost {
  background: transparent;
  border-color: rgba(244, 63, 94, 0.35);
  color: #fda4af;
}

.btn-danger-ghost:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.15);
}

/* Inputs */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label, .range-field label, .color-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
}

input[type="text"],
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

.select-sm {
  width: auto;
  padding: 6px 10px;
  font-size: 0.8rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.range-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed rgba(255, 212, 59, 0.35);
  background: rgba(255, 212, 59, 0.04);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(255, 212, 59, 0.09);
}

.dropzone-icon {
  font-size: 2.2rem;
  margin-bottom: 6px;
}

.dropzone-title {
  font-weight: 700;
  font-size: 1rem;
}

.dropzone-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 4px 0 14px;
}

.audio-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.32);
}

.audio-info-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.audio-check {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--success);
  color: #06180c;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.lyrics-textarea {
  min-height: 320px;
  resize: vertical;
  line-height: 1.65;
  font-size: 0.94rem;
}

.tip-box {
  background: rgba(0, 229, 255, 0.07);
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.83rem;
  color: #cffafe;
}

/* Stage Preview */
.stage-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
  flex-wrap: wrap;
}

.stage-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.badge-muted {
  color: var(--text-muted);
  font-weight: 600;
}

.badge-accent {
  background: rgba(255, 212, 59, 0.18);
  color: var(--accent);
}

.canvas-wrapper {
  position: relative;
  margin: 0 auto;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.canvas-wrapper.aspect-16-9 {
  width: 100%;
  max-width: 780px;
  aspect-ratio: 16 / 9;
}

.canvas-wrapper.aspect-9-16 {
  height: 440px;
  aspect-ratio: 9 / 16;
}

.canvas-wrapper:fullscreen {
  max-width: none;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
}

#karaokeCanvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.export-overlay {
  position: absolute;
  top: 12px;
  right: 12px;
  pointer-events: none;
}

.export-overlay-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(244, 63, 94, 0.6);
  font-size: 0.82rem;
  font-weight: 700;
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f43f5e;
  animation: pulseDot 1s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* Transport Bar */
.transport-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.transport-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-play {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--accent-grad);
  color: #111;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.14);
}

.transport-timeline {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.82rem;
  color: #cbd5e1;
  min-width: 58px;
  text-align: center;
}

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

.speed-select-wrap,
.volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.speed-select-wrap select {
  width: auto;
  padding: 5px 8px;
  font-size: 0.8rem;
}

.volume-wrap input {
  width: 78px;
}

/* Waveform */
.waveform-card {
  padding: 14px 16px;
}

.waveform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.waveform-head h3 {
  font-size: 0.95rem;
}

.waveform-wrap {
  width: 100%;
  background: #0b0f1b;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

#waveformCanvas {
  width: 100%;
  height: 96px;
  display: block;
}

/* Sync Pad */
.sync-help {
  font-size: 0.84rem;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.sync-cue-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.cue-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cue-current {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  min-height: 30px;
  line-height: 1.35;
}

.cue-current .word-done {
  color: var(--accent);
}

.cue-current .word-active {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cue-next {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.tap-button {
  width: 100%;
  padding: 20px 16px;
  border-radius: 14px;
  border: 2px solid rgba(255, 212, 59, 0.55);
  background: linear-gradient(180deg, rgba(255, 212, 59, 0.18), rgba(255, 146, 43, 0.1));
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.08s ease, background 0.1s ease, border-color 0.1s ease;
  user-select: none;
}

.tap-button:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(255, 212, 59, 0.25), rgba(255, 146, 43, 0.15));
}

.tap-button.holding {
  transform: scale(0.985);
  border-color: var(--accent-2);
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.28), rgba(0, 229, 255, 0.12));
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.28);
}

.tap-key {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#tapButtonLabel {
  font-size: 0.96rem;
  font-weight: 700;
}

.sync-shortcuts {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

kbd {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 1px 6px;
  font-family: inherit;
  font-size: 0.74rem;
  color: var(--text);
}

/* Timing List */
.sync-lines-list {
  max-height: 410px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.sync-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.sync-row:hover {
  border-color: var(--border-strong);
}

.sync-row.is-cursor {
  border-color: var(--accent);
  background: rgba(255, 212, 59, 0.08);
}

.sync-row.is-playing {
  border-color: var(--accent-2);
  box-shadow: inset 3px 0 0 var(--accent-2);
}

.sync-row-idx {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
  text-align: center;
}

.sync-row-text {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sync-row-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.time-pill {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.75rem;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #e2e8f0;
  min-width: 58px;
  text-align: center;
}

.time-pill.unset {
  color: #64748b;
}

.mini-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 0.72rem;
  cursor: pointer;
}

.mini-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.14);
}

/* Style Controls */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.theme-chip {
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.theme-chip:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.theme-chip.active {
  border-color: var(--accent);
  background: rgba(255, 212, 59, 0.15);
  color: var(--accent);
}

.color-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.color-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.color-field input[type="color"] {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-input);
  cursor: pointer;
  padding: 2px;
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.78rem;
}

.swatch-btn {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.75rem;
  cursor: pointer;
}

.swatch-btn:hover {
  border-color: var(--accent);
}

.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.86rem;
  cursor: pointer;
  color: #e2e8f0;
}

.toggle-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

/* Export */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.summary-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.82rem;
}

.summary-item strong {
  font-size: 0.98rem;
  color: var(--text);
}

.export-progress-box {
  background: var(--bg-input);
  border: 1px solid rgba(255, 212, 59, 0.3);
  border-radius: 12px;
  padding: 14px;
}

.export-progress-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-grad);
  transition: width 0.15s linear;
}

.export-result {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 12px;
  padding: 14px;
}

.export-extras {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  cursor: pointer;
}

.project-item:hover {
  border-color: var(--accent);
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #1e263d;
  color: #fff;
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: toastIn 0.2s ease;
}

.toast.toast-error {
  border-left-color: var(--danger);
}

.toast.toast-success {
  border-left-color: var(--success);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1040px) {
  .grid-2,
  .style-grid,
  .sync-grid {
    grid-template-columns: 1fr;
  }
}



/* =========================================================
   Top Mode Switcher & WhatsApp Audio Stickers Studio
   ========================================================= */
.mode-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
}

.mode-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.mode-tab:hover {
  color: var(--text);
}

.mode-tab.active[data-app-mode="karaoke"] {
  background: var(--accent-grad);
  color: #111;
}

.mode-tab.active[data-app-mode="stickers"] {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.badge-wa {
  background: rgba(37, 211, 102, 0.18);
  color: #4ade80;
  border: 1px solid rgba(37, 211, 102, 0.35);
}

.btn-wa {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.28);
}

.btn-wa:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.stickers-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.12), rgba(18, 140, 126, 0.06));
  border: 1px solid rgba(37, 211, 102, 0.25);
  flex-wrap: wrap;
}

.stickers-header-banner h2 {
  font-size: 1.15rem;
  margin-bottom: 3px;
}

.stickers-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: start;
}

.stickers-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.url-bar {
  display: flex;
  gap: 8px;
}

.url-bar input {
  flex: 1;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.dropzone-compact {
  padding: 16px;
}

.dropzone-compact .dropzone-sub {
  margin: 3px 0 0;
}

.stk-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  font-size: 0.84rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.stk-timeline-bar {
  position: relative;
  height: 28px;
  border-radius: 8px;
  background: #0b0f1b;
  border: 1px solid var(--border);
  overflow: hidden;
}

.stk-timeline-selection {
  position: absolute;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(37, 211, 102, 0.35), rgba(0, 229, 255, 0.35));
  border-left: 3px solid #25d366;
  border-right: 3px solid #00e5ff;
}

.stk-timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffd43b;
  box-shadow: 0 0 8px #ffd43b;
}

.audio-mode-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.audio-pill {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.audio-pill:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.audio-pill.active {
  background: rgba(37, 211, 102, 0.18);
  border-color: #25d366;
  color: #4ade80;
}

/* WhatsApp Chat Preview Mockup */
.wa-chat-mockup {
  background: radial-gradient(circle at 20% 20%, #102521 0%, #0b141a 75%);
  border: 1px solid rgba(37, 211, 102, 0.22);
  border-radius: 14px;
  padding: 20px;
  display: grid;
  place-items: center;
}

.wa-sticker-bubble {
  position: relative;
  width: 256px;
  height: 256px;
  border-radius: 14px;
  overflow: hidden;
  cursor: grab;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #000;
  user-select: none;
}

.wa-sticker-bubble:active {
  cursor: grabbing;
}

#stkPreviewCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.wa-speaker-pill {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(11, 20, 26, 0.82);
  border: 1px solid rgba(37, 211, 102, 0.65);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.wa-time-stamp {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #86efac;
  font-size: 0.68rem;
  font-weight: 700;
}

.stk-output-box {
  background: rgba(37, 211, 102, 0.08);
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-radius: 12px;
  padding: 13px;
}

.stk-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stk-files-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wa-card {
  border-color: rgba(37, 211, 102, 0.25);
}

.wa-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.wa-qr-box img {
  width: 220px;
  height: 220px;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
}

.wa-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.32);
  font-size: 0.85rem;
  font-weight: 700;
}

.wa-user-pill span:nth-child(2) {
  flex: 1;
}

.wa-online-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 8px #25d366;
}

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


/* =========================================================
   Public Gallery, Per-User WhatsApp Modal & Admin Styles
   ========================================================= */
.brand-icon-wa {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.brand-tag-wa {
  color: #4ade80;
  font-weight: 700;
}

.mode-tab.active[data-view="gallery"],
.mode-tab.active[data-view="create"] {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.28);
}

.btn-wa-outline {
  background: rgba(37, 211, 102, 0.1);
  border-color: rgba(37, 211, 102, 0.4);
  color: #dcfce7;
}

.btn-wa-outline:hover {
  background: rgba(37, 211, 102, 0.2);
}

.wa-dot-off {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
}

.wa-dot-on {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 8px #25d366;
  display: inline-block;
}

.gallery-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.14), rgba(18, 140, 126, 0.06));
  border: 1px solid rgba(37, 211, 102, 0.28);
  flex-wrap: wrap;
}

.gallery-hero h2 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.admin-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 212, 59, 0.1);
  border: 1px solid rgba(255, 212, 59, 0.35);
  flex-wrap: wrap;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.9rem;
}

.search-box input {
  padding-left: 36px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 16px;
}

.stk-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stk-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 211, 102, 0.4);
}

.stk-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 25% 25%, #112a24, #091117);
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
}

.stk-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.stk-play-btn {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border: 1px solid rgba(37, 211, 102, 0.7);
  background: rgba(9, 17, 23, 0.85);
  color: #fff;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(6px);
}

.stk-play-btn.playing {
  background: #25d366;
  color: #052011;
  border-color: #25d366;
}

.stk-dur-pill {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
}

.stk-card-body {
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.stk-card-title {
  font-size: 0.96rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stk-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-muted);
  gap: 8px;
}

.stk-card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.stk-card-dl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.stk-files-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.empty-state {
  text-align: center;
  padding: 46px 24px;
}

.empty-icon {
  font-size: 2.8rem;
  margin-bottom: 10px;
}

.howto-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.modal-card-wa {
  max-width: 440px;
}

.wa-modal-sticker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.wa-modal-sticker img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
}

input[type="password"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

input[type="password"]:focus {
  border-color: var(--accent);
}

.app-footer {
  margin-top: auto;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
}

.footer-link:hover {
  color: var(--text);
}
