/* Compile Academy Studio – gemeinsame Oberfläche der Kreativ-Apps (Liquid Glass, app-artig). */

.studio {
  height: 100dvh;
  overflow: hidden;
}
.studio body,
body.studio-body {
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
.studio-bar {
  margin: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  border-radius: 999px;
  z-index: 10;
}
.studio-bar .back {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--rim-low);
}
.studio-bar .back svg {
  width: 20px;
  height: 20px;
}
.studio-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 17px/1 var(--display);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.studio-title .app-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background-size:
    20px 20px,
    100% 100%;
}
.studio-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.studio-actions .btn {
  min-height: 42px;
  padding: 10px 18px;
  font-size: 15px;
}
.studio-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 300px;
  gap: 10px;
  padding: 0 10px 10px;
}
.rail,
.inspector {
  border-radius: 28px;
  padding: 12px;
  overflow: auto;
}
.rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.tool {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
}
.tool svg {
  width: 22px;
  height: 22px;
}
.tool:hover {
  background: rgba(255, 255, 255, 0.08);
}
.tool[aria-pressed='true'] {
  color: #fff;
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.95), rgba(106, 71, 245, 0.8));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.5),
    0 10px 20px -10px rgba(124, 92, 255, 0.9);
}
.tool:active {
  transform: scale(0.94);
}
.stage {
  position: relative;
  min-height: 0;
  border-radius: 30px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.04) 0 25%, transparent 0 50%) 0 0 / 24px 24px,
    rgba(5, 6, 22, 0.45);
  box-shadow: inset 0 0 0 1px var(--rim-low);
}
.stage canvas,
.stage video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  touch-action: none;
}
.drop {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 2px dashed rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  text-align: center;
  color: var(--mist);
  padding: 20px;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.drop.hot {
  border-color: var(--violet-ink);
  background: rgba(124, 92, 255, 0.1);
}
.drop h2 {
  font: 700 clamp(22px, 3vw, 30px) / 1.2 var(--display);
  color: var(--ink);
}
.drop p {
  margin: 0;
  max-width: 420px;
}
.drop[hidden] {
  display: none;
}
.inspector h3 {
  font: 700 13px/1 var(--body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--haze);
  margin: 10px 4px 12px;
}
.inspector h3:first-child {
  margin-top: 4px;
}
.field {
  display: grid;
  gap: 6px;
  margin: 0 4px 14px;
}
.field label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}
.field output {
  color: var(--haze);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 26px;
  background: transparent;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  opacity: 0.85;
}
input[type='range']::-moz-range-track {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 1px #fff,
    0 4px 10px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.5);
}
input[type='range']::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 4px 14px;
}
.chip-btn {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  font: 600 13px var(--body);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--rim-low);
  cursor: pointer;
}
.chip-btn:hover,
.chip-btn[aria-pressed='true'] {
  background: rgba(124, 92, 255, 0.35);
  box-shadow: inset 0 0 0 1px rgba(184, 166, 255, 0.7);
}
.swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 4px 14px;
}
.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    0 0 0 2px transparent;
}
.swatch[aria-pressed='true'] {
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    0 0 0 3px #fff;
}
.text-input {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  font: 15px var(--body);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--rim-low);
}
.hint {
  margin: 6px 4px 0;
  font-size: 13px;
  color: var(--haze);
}
.status {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 30;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.35s cubic-bezier(0.2, 0.9, 0.25, 1.2);
  pointer-events: none;
}
.status.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.privacy-note {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 18px 4px 4px;
  font-size: 12px;
  color: var(--haze);
}
.privacy-note svg {
  flex: none;
  width: 16px;
  height: 16px;
}

/* Film-Zeitleiste */
.timeline {
  grid-column: 2 / 3;
  border-radius: 24px;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}
.tl-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tl-track {
  position: relative;
  flex: 1;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px var(--rim-low);
}
.tl-thumbs {
  position: absolute;
  inset: 0;
  display: flex;
}
.tl-thumbs img {
  height: 100%;
  flex: 1;
  object-fit: cover;
  opacity: 0.75;
  min-width: 0;
}
.tl-range {
  position: absolute;
  top: 0;
  bottom: 0;
  border: 3px solid #ffc857;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.tl-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  margin-left: -9px;
  cursor: ew-resize;
  touch-action: none;
  z-index: 2;
}
.tl-handle::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: 14px;
  width: 6px;
  border-radius: 99px;
  background: #ffc857;
}
.tl-head {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 10px #fff;
  pointer-events: none;
  z-index: 3;
}
.tl-time {
  font: 600 13px var(--mono);
  color: var(--mist);
  min-width: 112px;
  text-align: right;
}
.play {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #8f74ff, #6a47f5);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.5),
    0 10px 20px -8px rgba(124, 92, 255, 0.9);
}
.play svg {
  width: 20px;
  height: 20px;
}
.progress-bar {
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width 0.2s;
}

/* PDF-Seitenraster */
.pages {
  align-self: stretch;
  justify-self: stretch;
  overflow: auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
  align-content: start;
}
.page-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--rim-low);
  cursor: grab;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.9, 0.25, 1.2),
    box-shadow 0.2s;
  user-select: none;
}
.page-card:hover {
  transform: translateY(-3px);
}
.page-card.dragging {
  opacity: 0.4;
}
.page-card.over {
  box-shadow: inset 0 0 0 2px var(--violet-ink);
}
.page-card.selected {
  box-shadow:
    inset 0 0 0 2px #ffc857,
    0 0 0 4px rgba(255, 200, 87, 0.2);
}
.page-card canvas,
.page-card img {
  width: 100%;
  aspect-ratio: 0.72;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  transition: transform 0.3s ease;
}
.page-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--mist);
}
.page-card .mini {
  display: flex;
  gap: 4px;
}
.page-card .mini button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}
.page-card .mini svg {
  width: 14px;
  height: 14px;
}
.badge {
  position: absolute;
  left: 16px;
  top: 16px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
}

/* Übersicht der Apps */
.studio-hero {
  padding-top: clamp(48px, 8vw, 96px);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 18px;
}
.studio-hero .icons {
  display: flex;
  gap: 14px;
}
.studio-hero .app-icon {
  width: 84px;
  height: 84px;
  border-radius: 26px;
  animation: iconFloat 4s ease-in-out infinite alternate;
}
.studio-hero .app-icon:nth-child(2) {
  animation-delay: -1.3s;
}
.studio-hero .app-icon:nth-child(3) {
  animation-delay: -2.6s;
}
@keyframes iconFloat {
  to {
    transform: translateY(-12px) rotate(4deg);
  }
}
.lineup {
  display: grid;
  gap: 22px;
}
.lineup-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: center;
  padding: clamp(22px, 3vw, 36px);
  text-decoration: none;
}
.lineup-card:nth-child(even) {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}
.lineup-card:nth-child(even) .shot {
  order: -1;
}
.lineup-card h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  margin: 12px 0;
}
.lineup-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--mist);
}
.shot {
  aspect-ratio: 16 / 10;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  box-shadow:
    inset 0 0 0 1px var(--rim-low),
    0 30px 60px -30px rgba(0, 0, 0, 0.8);
  background: #0b0d24;
}
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  color: #12121f;
  background: linear-gradient(90deg, #a8f05a, #6fe7a8);
}
.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.principle {
  padding: 22px;
}
.principle b {
  display: block;
  font: 700 17px var(--display);
  margin-bottom: 6px;
}
.principle p {
  margin: 0;
  color: var(--mist);
  font-size: 15px;
}

@media (max-width: 960px) {
  .studio-main {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .rail {
    flex-direction: row;
    justify-content: center;
    overflow-x: auto;
    order: 2;
    padding: 8px;
  }
  .stage {
    order: 1;
    min-height: 46vh;
  }
  .inspector {
    order: 3;
    max-height: 32vh;
  }
  .timeline {
    grid-column: 1;
    order: 2;
  }
  .studio-body {
    overflow: auto;
  }
  .studio,
  .studio body {
    overflow: auto;
    height: auto;
  }
  .lineup-card,
  .lineup-card:nth-child(even) {
    grid-template-columns: 1fr;
  }
  .lineup-card:nth-child(even) .shot {
    order: 0;
  }
  .principles {
    grid-template-columns: 1fr;
  }
  .studio-title span.long {
    display: none;
  }
}
