

:root {
  color-scheme: dark;

  
  --iplug-host-bg: #2e3840;
  --iplug-host-panel-bg: #38434c;
  --iplug-host-panel-bg-hover: #414e58;
  --iplug-host-control-bg: #282f38;
  --iplug-host-control-bg-hover: #313a44;

  
  --iplug-host-border: #56636e;
  --iplug-host-border-subtle: #44505a;

  
  --iplug-host-fg-strong: #f2f5f2;
  --iplug-host-fg: #ccd3cc;
  --iplug-host-fg-secondary: #a6aea5;
  --iplug-host-fg-faint: #828c83;
  --iplug-host-fg-muted: #6e786f;

  
  --iplug-host-accent: #86b535;
  --iplug-host-accent-fg: #101410;
  --iplug-host-accent-glow: rgba(134, 181, 53, 0.45);

  
  --iplug-host-blue: #c1e3ee;

  
  --iplug-host-start-btn-bg: #282f38;
  --iplug-host-start-btn-bg-hover: #313a44;
  --iplug-host-start-btn-bg-active: #222830;

  
  --iplug-host-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --iplug-host-shadow-thumb: 0 2px 6px rgba(0, 0, 0, 0.3);

  
  --wordmark-h: min(46px, calc((100vw - 32px) * 81 / 769));
  --tagline-size: max(9px, calc(var(--wordmark-h) * 0.239));
}

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

html, body {
  width: 100%;
  
  min-height: 0;
  overflow: auto;
  
  overflow: hidden;
  
  touch-action: none;
  
  overscroll-behavior-x: none;
  
  background: #2e3840;
  color: var(--iplug-host-fg);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}


body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 10px 16px 28px;
}


.iplug-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  
  position: absolute;
  
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 32px));
  z-index: 2;
  
  pointer-events: none;
}

.iplug-stage-controls {
  pointer-events: none;
}



iplug-backflipper {
  display: block;
  width: 760px;
  height: 335px;
  
  background: transparent;
  border-radius: 16px;
  overflow: hidden;
  
  touch-action: none;
}


iplug-backflipper.iplug-stage-plugin {
  transform-origin: top center;
  will-change: transform;
  order: 1;
  
  margin-top: 64px;
  
  flex-shrink: 0;
}


#controls {
  --near-gap: 10px;
  --btn-size: clamp(32px, 4.8vw, 39px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  width: 100%;
  
  max-width: min(360px, max(196px, calc(100vw - 64px)));
  margin-left: auto;
  margin-right: auto;
  flex-shrink: 0;
  min-height: 68px;
  
  padding: 5px 14px 6px;
  
  background: linear-gradient(
      180deg,
      rgba(86, 100, 108, 0.08) 0%,
      rgba(58, 65, 72, 0.3) 45%,
      rgba(50, 57, 64, 0.35) 100%
    ),
    #333d45;
  
  border-radius: 12px 12px 0 0;
  
  
  pointer-events: auto;
}


.transport-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--near-gap);
  min-width: 0;
}

#leftGroup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

#rightGroup {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  min-width: 0;
}


#startBtn.play-btn {
  flex-shrink: 0;
  --btn-size: clamp(32px, 4.8vw, 39px);
  width: var(--btn-size);
  height: var(--btn-size);
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(31, 31, 38, 0.4);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--iplug-host-start-btn-bg);
  color: var(--iplug-host-blue);
  box-shadow: none;
  line-height: 0;
  cursor: pointer;
}


#startBtn.play-btn .play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#startBtn.play-btn .stop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#startBtn.play-btn .play-icon svg,
#startBtn.play-btn .stop-icon svg {
  display: block;
  width: calc(var(--btn-size) * 0.55);
  height: calc(var(--btn-size) * 0.55);
  fill: var(--iplug-host-blue);
  stroke: var(--iplug-host-blue);
}

@media (hover: hover) {
  #startBtn.play-btn:hover:not(:disabled) {
    box-shadow: inset 0 0 0 2px rgba(193, 227, 238, 0.2);
  }
}

#startBtn.play-btn:active:not(:disabled) {
  background: var(--iplug-host-start-btn-bg-active);
}

#startBtn.play-btn.on {
  background: var(--iplug-host-start-btn-bg);
  color: var(--iplug-host-blue);
  box-shadow: none;
}

#startBtn.play-btn.on .play-icon {
  display: none;
}

#startBtn.play-btn.on .stop-icon {
  display: inline-flex;
}

#startBtn.play-btn.on .play-icon svg,
#startBtn.play-btn.on .stop-icon svg {
  fill: var(--iplug-host-blue);
  stroke: var(--iplug-host-blue);
}

#startBtn.play-btn.on:active:not(:disabled) {
  filter: brightness(0.9);
}

.host-status {
  justify-self: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--iplug-host-fg-secondary);
  font-size: 12px;
  flex-shrink: 1;
  padding-top: 2px;
}


.host-controls-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  order: -1;
}




.volume-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.volume-group svg {
  color: var(--iplug-host-fg-secondary);
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

#volumeIcon {
  color: #9fb3c0;
}

#volumeSlider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 auto;
  min-width: 0;
  height: 20px;
  background: transparent;
  cursor: pointer;
}

@media (hover: hover) {
  .volume-group:hover #volumeSlider::-webkit-slider-runnable-track {
    box-shadow: inset 0 0 0 1px rgba(193, 227, 238, 0.25);
  }

  .volume-group:hover #volumeSlider::-moz-range-track {
    box-shadow: inset 0 0 0 1px rgba(193, 227, 238, 0.25);
  }
}

#volumeSlider::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
      90deg,
      #9aa4a8 0%,
      #9aa4a8 var(--vol-pct, 71%),
      #20262d var(--vol-pct, 71%),
      #20262d 100%
    );
}

#volumeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -5px;
  border-radius: 50%;
  background: #20262d;
  border: 3px solid #9fb3c0;
}

#volumeSlider::-moz-range-track {
  height: 12px;
  border-radius: 6px;
  background: #20262d;
}

#volumeSlider::-moz-range-progress {
  height: 12px;
  border-radius: 6px;
  background: #9aa4a8;
}

#volumeSlider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #20262d;
  border: 3px solid #9fb3c0;
}

#volumeSlider:focus-visible {
  outline: 2px solid var(--iplug-host-accent);
  outline-offset: 2px;
}

.file-name {
  flex: 1 1 auto;
  min-width: 0;
  
  margin-left: 10px;
  color: var(--iplug-host-fg-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.file-name-track {
  display: inline-block;
  white-space: nowrap;
}


.play-progress {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  
  margin-top: 2px;
}

.progress-line {
  position: relative;
  flex: 1 1 auto;
  min-width: 60px;
  height: 3px;
  border-radius: 2px;
  background: var(--iplug-host-control-bg);
  cursor: pointer;
  touch-action: none;
}


.progress-line::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 18px;
  transform: translateY(-50%);
}

.progress-line:focus-visible {
  outline: 2px solid var(--iplug-host-accent);
  outline-offset: 3px;
}

.progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 2px;
  background: var(--iplug-host-accent);
}

.play-time {
  flex-shrink: 0;
  color: var(--iplug-host-fg-secondary);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#fileInputBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 29px;
  height: 29px;
  padding: 0;
  background: var(--iplug-host-control-bg);
  color: var(--iplug-host-blue);
  border: 1px solid rgba(31, 31, 38, 0.4);
  border-radius: 8px;
  box-shadow: none;
  cursor: pointer;
}

#fileInputBtn svg {
  display: block;
  width: 16px;
  height: 16px;
}

@media (hover: hover) {
  #fileInputBtn:hover {
    box-shadow: inset 0 0 0 2px rgba(193, 227, 238, 0.2);
  }

  #fileInputBtn:hover svg {
    color: var(--iplug-host-blue);
  }
}

#fileInputBtn:active {
  background: var(--iplug-host-control-bg-hover);
  box-shadow: none;
}

#fileInputBtn:focus-visible {
  outline: 2px solid var(--iplug-host-accent);
  outline-offset: 2px;
}


.plugin-logo {
  display: block;
  order: 1;
  
  height: var(--wordmark-h);
  width: auto;
  
  max-width: 100%;
  
  margin: 24px auto 0;
  flex-shrink: 0;
}



.plugin-description {
  max-width: 600px;
  
  margin: 0 auto;
  text-align: center;
  font-size: var(--tagline-size);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--iplug-host-accent);
  order: 2;
  flex-shrink: 0;
}


.download-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  background: var(--iplug-host-control-bg);
  color: var(--iplug-host-blue);
  border: 1px solid rgba(31, 31, 38, 0.4);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: none;
  order: 4;
  flex-shrink: 0;
  align-self: center;
}

@media (hover: hover) {
  .download-btn:hover {
    box-shadow: inset 0 0 0 2px rgba(193, 227, 238, 0.2);
  }
}

.download-btn:active {
  transform: translateY(1px);
}

.download-btn:focus-visible {
  outline: 2px solid var(--iplug-host-accent);
  outline-offset: 2px;
}

.download-btn-platforms {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.download-btn-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}


.download-note {
  order: 3;
  margin: 10px auto 0;
  text-align: center;
  line-height: 1.5;
  
  font-size: 13px;
  max-width: 46ch;
  
  color: #e2e8f0;
  flex-shrink: 0;
}

@media (min-width: 600px) {
  .download-note {
    font-size: 14px;
  }
}

@media (min-width: 860px) {
  .download-note {
    font-size: 15px;
    max-width: none;
  }
}


.hidden {
  display: none !important;
}

.live-edit-btn {
  background: var(--iplug-host-control-bg);
  color: var(--iplug-host-fg-secondary);
}

.live-edit-btn:hover {
  background: var(--iplug-host-control-bg-hover);
  color: var(--iplug-host-fg-strong);
}

.live-edit-btn.active {
  background: var(--iplug-host-accent);
  color: var(--iplug-host-accent-fg);
}
