/* ghostati-face-api.css: extracted from ghostati-face-api.html */
:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1d2230;
  --text: #eef2ff;
  --muted: #aeb6cf;
  --line: #2c3346;
  --accent: #7aa2ff;
  --accent-2: aliceblue;
  --success: #3ddc97;
  --warn: #ffcc66;
  --danger: #ff7a7a;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-width: 1280px;
  background:
    radial-gradient(circle at top left, rgba(122, 162, 255, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(159, 122, 234, 0.12), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: 'Outfit', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
  width: min(1820px, 96vw);
  margin: 0 auto;
  padding: 22px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
}

header {
  background: linear-gradient(135deg, rgba(122, 162, 255, 0.16), rgba(159, 122, 234, 0.12));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 18px;
  align-items: start;
}

h1 {
  margin: 0 0 4px;
  font-family: 'League Script', cursive;
  font-size: 60px;
  font-weight: 400;
  line-height: 1;
}

.subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  max-width: 80ch;
}

.about {
  background: rgba(15, 17, 21, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 14px 16px;
}

.about h2 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.about p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 4fr 1fr;
  gap: 18px;
  flex: 1;
  min-height: 0;
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 0;
}

.panel .panel-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.panel .panel-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.panel .panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.controls,
.makeup {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.stack {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-btn,
.preview-btn,
.secondary-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
  padding: 14px 14px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.action-btn:hover,
.preview-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
}

.action-btn:disabled,
.preview-btn:disabled,
.secondary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.action-btn {
  background: linear-gradient(180deg, rgba(122, 162, 255, 0.24), rgba(122, 162, 255, 0.14));
}

.secondary-btn {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.preview-btn {
  background: linear-gradient(180deg, rgba(159, 122, 234, 0.25), rgba(159, 122, 234, 0.12));
  text-align: left;
}

.preview-btn.active {
  outline: 2px solid rgba(159, 122, 234, 0.6);
  border-color: rgba(159, 122, 234, 0.7);
}

.small-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  padding: 0 16px 16px;
}

.image-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
}

.viewer {
  position: relative;
  background: #0a0d12;
  min-height: 560px;
  overflow: hidden;
}

.viewer video,
.viewer canvas,
.viewer img,
.viewer .placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#overlay {
  pointer-events: none;
}

#placeholder,
#previewImage {
  background:
    linear-gradient(180deg, rgba(12, 16, 23, 0.05), rgba(12, 16, 23, 0.1)),
    #0c1017;
}

#placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 28px;
  z-index: 0;
}

#video {
  z-index: 1;
}

#previewImage {
  z-index: 2;
  display: none;
}

#overlay {
  z-index: 3;
}

.status-pill {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 17, 21, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 5px rgba(255, 204, 102, 0.15);
}

.status-dot.live {
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(61, 220, 151, 0.15);
}

.status-dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(255, 122, 122, 0.15);
}

.logbox {
  height: 82px;
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.log-line {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  line-height: 1.25;
  color: #c6d0f5;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.log-line:first-child {
  font-size: 14px;
  font-weight: 700;
  opacity: 1;
}

.log-line:nth-child(2) {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.7;
}

.log-line:nth-child(3) {
  font-size: 11px;
  font-weight: 450;
  opacity: 0.4;
}

.log-line:nth-child(4) {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.25;
}

.log-line:nth-child(5) {
  font-size: 10px;
  font-weight: 300;
  opacity: 0.15;
}

.log-line:nth-child(n+6) {
  display: none;
}

.list-card {
  margin: 0 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 14px;
  padding: 12px 14px;
}

.list-card h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.metric:last-child {
  border-bottom: 0;
}

.metric span:first-child {
  color: var(--muted);
}

.metric strong {
  font-weight: 700;
}
