﻿:root {
  --bg: #eef1eb;
  --surface: #ffffff;
  --surface-2: #f8faf6;
  --ink: #17202a;
  --muted: #637083;
  --line: #d7ded2;
  --teal: #0f766e;
  --teal-2: #0d9488;
  --purple: #6d28d9;
  --amber: #d99719;
  --danger: #b42318;
  --shadow: 0 20px 52px rgba(23, 32, 42, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
}

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

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(18px, 3.5vw, 48px);
  background: #fbfcf8;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.subtitle {
  max-width: 790px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.top-actions,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.btn,
.tab {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 13px;
  cursor: pointer;
  font-weight: 850;
  color: #fff;
  background: var(--ink);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover,
.tab:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--teal);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.btn-primary:hover {
  background: var(--teal-2);
}

.btn-soft,
.tab {
  background: #f1f4ee;
  border-color: var(--line);
  color: var(--ink);
}

.btn-soft:hover,
.tab:hover {
  background: #e7ece2;
}

.btn-danger {
  background: #fff2ef;
  border-color: #ffd0c8;
  color: var(--danger);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(440px, 0.95fr) minmax(420px, 1.05fr);
  gap: 24px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3.5vw, 42px);
  align-items: start;
}

.settings,
.output-panel {
  min-width: 0;
}

.section,
.preview-section,
.code-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(23, 32, 42, 0.06);
}

.section {
  padding: 17px;
}

.section + .section {
  margin-top: 14px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.hint {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e6ece3;
  color: var(--teal);
  font-weight: 900;
  cursor: help;
}

.hint::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: min(300px, 76vw);
  padding: 10px 12px;
  border-radius: 7px;
  background: #17202a;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.hint:hover::after,
.hint:focus::after {
  opacity: 1;
  transform: translateY(0);
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.top-gap {
  margin-top: 12px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field span,
.switch span {
  color: #273444;
  font-size: 0.84rem;
  font-weight: 820;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c8d0c4;
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}

input[type="color"] {
  height: 42px;
  padding: 4px;
}

input[type="range"] {
  min-height: 28px;
  padding: 0;
  accent-color: var(--teal);
}

.range-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: center;
}

output {
  display: inline-grid;
  place-items: center;
  min-height: 32px;
  border-radius: 6px;
  background: #eef2ea;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.color-field {
  grid-template-columns: 1fr 54px;
  align-items: end;
}

.color-field span {
  grid-column: 1 / -1;
}

.preset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.65fr);
  gap: 10px;
  margin-bottom: 10px;
}

.switch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  cursor: pointer;
}

.switch input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  accent-color: var(--teal);
}

.switch span {
  line-height: 1.25;
}

.output-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
}

.preview-section,
.code-section {
  padding: 17px;
}

.status {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

.preview-stage {
  min-height: 410px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 8px;
  background: #17202a;
  overflow: hidden;
}

#preview {
  width: 100%;
  display: grid;
  place-items: center;
}

.preview-player {
  width: 100%;
  max-width: 390px;
}

.preview-headline {
  margin: 0 0 12px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 900;
}

.preview-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.preview-frame.elevated {
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
}

.preview-frame.minimal {
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.preview-frame.neon {
  box-shadow: 0 0 24px rgba(33, 191, 235, 0.42), 0 0 7px rgba(116, 0, 194, 0.45);
}

.preview-frame.glass {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(9px);
}

.preview-aspect {
  width: 100%;
}

.preview-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
}

.preview-mute {
  width: min(92%, 560px);
  max-width: 92%;
  box-sizing: border-box;
  overflow: hidden;
  color: #fff;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  border-radius: 11px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.preview-mute strong,
.preview-mute span {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.preview-mute strong {
  font-weight: 950;
  line-height: 1.12;
}

.preview-mute span {
  margin-top: 8px;
  font-weight: 760;
  opacity: 0.92;
}


.preview-mute-icon {
  display: block;
  width: clamp(46px, 9vw, 78px);
  height: clamp(46px, 9vw, 78px);
  margin: 10px auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.preview-mute.rich {
  border-style: solid;
}

.preview-mute.glass {
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.preview-mute.minimal {
  background: transparent !important;
  box-shadow: none;
}
.preview-progress {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
}

.preview-progress div {
  width: 46%;
  height: 100%;
}


.preview-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}

.preview-controls span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.preview-controls span:nth-child(2) {
  height: 5px;
  background: rgba(255, 255, 255, 0.35);
}

.preview-resume {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.52);
}

.preview-resume-box {
  width: min(92%, 360px);
  border-radius: 14px;
  padding: 18px;
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  text-align: center;
}

.preview-resume-title {
  margin-bottom: 14px;
  font-weight: 900;
  line-height: 1.2;
}

.preview-resume-actions {
  display: grid;
  gap: 8px;
}

.preview-resume-actions span {
  display: block;
  border-radius: 9px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 850;
}
.preview-cta {
  display: inline-block;
  margin: 14px auto 0;
  color: #fff;
  text-decoration: none;
  font-weight: 950;
  line-height: 1.15;
  padding: 13px 24px;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tab.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

textarea {
  min-height: 360px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre;
}

.split {
  justify-content: space-between;
  margin-top: 10px;
}

.note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

@keyframes previewPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes previewBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes previewShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@keyframes previewGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.2); }
  50% { box-shadow: 0 0 28px rgba(255, 255, 255, 0.52); }
}

@keyframes previewScale {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

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

  .output-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar {
    display: block;
  }

  .top-actions {
    margin-top: 16px;
  }

  .grid.two,
  .grid.three,
  .switch-grid,
  .preset-row {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .preview-stage {
    min-height: 330px;
    padding: 12px;
  }
}
