:root {
  --am-green: #00FFA8;
  --am-green-hover: #00e094;
  --am-yellow: #FFC83B;
  --am-yellow-active: #FDB827;
  --am-cyan: #00F0FF;
  --am-rose: #FF2A6D;
  --bg-dark: #0A0D14;
  --bg-card: #131824;
  --bg-card-sub: #1A2030;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(0, 255, 168, 0.4);
  --text-main: #F3F6FC;
  --text-muted: #8E9BAE;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(0, 255, 168, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(0, 240, 255, 0.03) 0%, transparent 40%);
}

/* ======================================================== */
/* NAVBAR                                                   */
/* ======================================================== */
.studio-header {
  height: 60px;
  background: rgba(14, 18, 28, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 500;
}

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

.logo-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-am {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--am-green) 0%, var(--am-cyan) 100%);
  color: #050811;
  font-weight: 900;
  font-size: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(0, 255, 168, 0.35);
}

.logo-text {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #FFFFFF 0%, #D4E0F5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 255, 168, 0.1);
  border: 1px solid rgba(0, 255, 168, 0.25);
  color: var(--am-green);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

.btn-nav-import {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-nav-import:hover {
  background: rgba(0, 255, 168, 0.15);
  border-color: var(--am-green);
  color: var(--am-green);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-nav-xml {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-nav-xml:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.btn-nav-export {
  background: var(--am-green);
  color: #000000;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 15px rgba(0, 255, 168, 0.3);
  transition: all 0.15s ease;
}

.btn-nav-export:hover {
  background: var(--am-green-hover);
  transform: translateY(-1px);
}

/* ======================================================== */
/* MAIN STUDIO LAYOUT                                       */
/* ======================================================== */
.studio-main {
  flex: 1;
  display: flex;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  gap: 24px;
}

.main-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-column {
  width: 380px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ======================================================== */
/* VIDEO PLAYER VIEWPORT                                    */
/* ======================================================== */
.player-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.canvas-wrapper {
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #000000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  user-select: none;
}

.canvas-wrapper canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.canvas-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.canvas-play-overlay.hidden {
  opacity: 0;
}

.play-btn-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(14, 18, 28, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}

.canvas-wrapper:hover .play-btn-circle {
  transform: scale(1.08);
}

.beat-flash-pill {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(10, 13, 20, 0.85);
  border: 1px solid rgba(0, 255, 168, 0.4);
  color: var(--am-green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.08s ease;
  pointer-events: none;
}

.beat-flash-pill.active {
  opacity: 1;
}

.beat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--am-green);
  box-shadow: 0 0 8px var(--am-green);
}

.canvas-badge-info {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(10, 13, 20, 0.75);
  backdrop-filter: blur(4px);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

/* ======================================================== */
/* SCRUBBER & TIMECODE                                      */
/* ======================================================== */
.scrubber-container {
  width: 100%;
  max-width: 540px;
  margin-top: 16px;
}

.timecode-track-box {
  position: relative;
  padding-top: 26px;
  width: 100%;
}

.timecode-pill {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  background: #1B2130;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  white-space: nowrap;
}

.timecode-pill::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px 4px 0 4px;
  border-style: solid;
  border-color: #1B2130 transparent transparent transparent;
}

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--am-green);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(0, 255, 168, 0.5);
}

.progress-thumb {
  position: absolute;
  top: -8px;
  left: 0;
  transform: translateX(-50%);
  width: 8px;
  height: 22px;
  background: #FFFFFF;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  cursor: grab;
}

.bookmarks-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bookmark-mark {
  position: absolute;
  top: 0;
  width: 2px;
  height: 6px;
  background: rgba(255, 42, 109, 0.7);
}

.time-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.player-quick-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-ctrl {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s ease;
}

.btn-ctrl:hover {
  color: #FFFFFF;
}

.btn-ctrl.play-trigger {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.btn-ctrl.play-trigger:hover {
  background: var(--am-green);
  color: #000000;
}

.btn-ctrl i.active {
  color: var(--am-green);
}

/* ======================================================== */
/* MEDIA REPLACEMENT SECTION                                */
/* ======================================================== */
.media-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
}

.section-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Slot Cards Grid */
.slots-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.slot-card {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #000000;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.slot-card:hover {
  transform: translateY(-2px);
}

.slot-card.active {
  border-color: var(--am-yellow);
  box-shadow: 0 0 12px rgba(255, 200, 59, 0.4);
}

.slot-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slot-badge-icon {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(10, 13, 20, 0.8);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.slot-swap-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 22px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.slot-duration-pill {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(10, 13, 20, 0.85);
  color: #FFFFFF;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.slot-duration-pill.active {
  background: var(--am-yellow);
  color: #000000;
  font-weight: 800;
}

/* Actions Row */
.media-actions-bar {
  display: flex;
  gap: 10px;
}

.btn-replace-primary {
  background: var(--am-yellow);
  color: #0B0E17;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-replace-primary:hover {
  background: var(--am-yellow-active);
  transform: translateY(-1px);
}

.btn-replace-audio {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-replace-audio:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Synced Audio Card */
.audio-track-card {
  padding: 12px 14px;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.audio-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(0, 255, 168, 0.15);
  color: var(--am-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.audio-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}

.audio-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.audio-tag {
  background: rgba(0, 255, 168, 0.1);
  border: 1px solid rgba(0, 255, 168, 0.25);
  color: var(--am-green);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* ======================================================== */
/* SIDEBAR CARDS (Desktop)                                  */
/* ======================================================== */
.studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.studio-card.highlight-card {
  background: linear-gradient(180deg, rgba(0, 255, 168, 0.05) 0%, var(--bg-card) 100%);
  border-color: rgba(0, 255, 168, 0.2);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.badge-status {
  color: var(--am-green);
  font-size: 11px;
}

.meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.meta-item strong {
  color: #FFFFFF;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-fx {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #CBD5E1;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 8px;
}

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.btn-export-big {
  width: 100%;
  background: linear-gradient(135deg, var(--am-green) 0%, var(--am-cyan) 100%);
  color: #000000;
  font-size: 13px;
  font-weight: 800;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 20px rgba(0, 255, 168, 0.35);
  transition: all 0.15s ease;
}

.btn-export-big:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

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

.btn-outline-card {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.btn-outline-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}

/* ======================================================== */
/* MODALS                                                   */
/* ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.modal-box {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 440px;
  max-width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-group h3 {
  font-size: 16px;
  font-weight: 800;
}

.btn-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}

.btn-modal-close:hover {
  color: #FFFFFF;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Detected Preset Card */
.detected-preset-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}

.preset-cover {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #000000;
}

.preset-meta-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preset-name {
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
}

.preset-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-size {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-type {
  background: rgba(0, 255, 168, 0.15);
  color: var(--am-green);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Input URL Field */
.input-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.url-input-wrap {
  display: flex;
  background: #0A0D14;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.input-url {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: 12px;
  padding: 8px 12px;
  font-family: inherit;
}

.btn-fetch-url {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFFFFF;
  padding: 0 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-fetch-url:hover {
  background: var(--am-green);
  color: #000000;
}

.field-note {
  font-size: 11px;
  color: var(--text-muted);
}

.included-media-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(0, 255, 168, 0.06);
  border: 1px solid rgba(0, 255, 168, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.btn-modal-action {
  background: var(--am-green);
  color: #000000;
  font-size: 14px;
  font-weight: 800;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 16px rgba(0, 255, 168, 0.35);
  transition: all 0.15s ease;
}

.btn-modal-action:hover {
  background: var(--am-green-hover);
  transform: translateY(-1px);
}

.btn-download-action {
  background: var(--am-yellow);
  color: #000000;
  font-size: 13px;
  font-weight: 800;
  padding: 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-download-action:hover {
  background: var(--am-yellow-active);
}

.upload-xml-alt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.link-upload {
  color: var(--am-cyan);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* Export Video Box */
.export-video-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.export-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.render-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 20, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 20px;
}

.spinner-ring {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(0, 255, 168, 0.2);
  border-top-color: var(--am-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.render-label {
  font-size: 12px;
  color: #FFFFFF;
}

.render-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px;
  font-weight: 800;
  color: var(--am-green);
}

.export-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg-card-sub);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}

.detail-row strong {
  color: #FFFFFF;
}

.xml-viewer {
  width: 100%;
  height: 280px;
  background: #0A0D14;
  color: var(--am-green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  outline: none;
  resize: none;
}

/* ======================================================== */
/* RESPONSIVE: MOBILE OPTIMIZATION (iPhone & Android)        */
/* ======================================================== */
@media (max-width: 900px) {
  .studio-main {
    flex-direction: column;
    padding: 12px;
    gap: 16px;
  }

  .sidebar-column {
    width: 100%;
  }

  .project-pill {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 600px) {
  .studio-header {
    height: 52px;
    padding: 0 12px;
  }

  .logo-text {
    display: none;
  }

  .project-pill {
    display: none;
  }

  .btn-nav-import {
    padding: 6px 12px;
    font-size: 11px;
  }

  .btn-nav-xml {
    display: none;
  }

  .btn-nav-export {
    padding: 6px 12px;
    font-size: 11px;
  }

  .studio-main {
    padding: 10px;
  }

  .player-section {
    padding: 10px;
  }

  .canvas-wrapper {
    max-width: 100%;
    border-radius: var(--radius-sm);
  }

  .scrubber-container {
    max-width: 100%;
  }

  .slots-grid {
    gap: 8px;
  }

  .slot-card {
    width: 96px;
    height: 96px;
  }

  .media-actions-bar {
    flex-direction: column;
  }

  .btn-replace-primary, .btn-replace-audio {
    width: 100%;
    justify-content: center;
  }
}

/* ======================================================== */
/* GLOBAL STUDIO LOADING SCREEN                             */
/* ======================================================== */
.global-loader-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #080B11;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.global-loader-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none !important;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 320px;
  width: 90%;
}

.loader-logo-pulse {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #00FFA8 0%, #00B8FF 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: #06090e;
  box-shadow: 0 0 35px rgba(0, 255, 168, 0.45);
  animation: amLogoPulse 1.8s infinite ease-in-out;
  margin-bottom: 20px;
}

@keyframes amLogoPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(0, 255, 168, 0.35);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 45px rgba(0, 255, 168, 0.65);
  }
}

.loader-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.loader-sub {
  font-size: 12px;
  color: #8E9BAE;
  margin-bottom: 22px;
}

.loader-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00FFA8 0%, #00F0FF 100%);
  border-radius: 999px;
  box-shadow: 0 0 12px #00FFA8;
  transition: width 0.25s ease;
}

.loader-msg {
  font-size: 11px;
  color: var(--am-green);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}
