/* Shared styles for landing page and OBS overlay */

:root {
  --accent-1: #ff5c8d;
  --accent-2: #ffaf40;
  --chat-bg: rgba(0, 0, 0, 0.55);
  --text-color: #ffffff;
  --overlay-font: "Hiragino Sans", "Yu Gothic", sans-serif;
}

body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
}

/* ---------- Overlay (OBS browser source) ---------- */

.overlay-body {
  background: transparent;
  overflow: hidden;
  color: var(--text-color);
  font-family: var(--overlay-font);
  width: 100vw;
  height: 100vh;
}

.chat-container {
  position: fixed;
  left: 16px;
  bottom: 16px;
  width: 420px;
  max-height: 60vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-line {
  background: var(--chat-bg);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  opacity: 1;
  transition: opacity 1s ease;
  word-break: break-word;
}

.chat-line.fade-out {
  opacity: 0;
}

.chat-name {
  font-weight: bold;
}

.chat-line.system {
  color: #ffd166;
}

.alert-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.alert-box {
  min-width: 320px;
  max-width: 560px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  padding: 14px 22px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: alert-in 0.4s ease-out;
  opacity: 1;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.alert-box.fade-out {
  opacity: 0;
  transform: translateY(-12px);
}

.alert-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-color);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.alert-message {
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-color);
}

@keyframes alert-in {
  from { opacity: 0; transform: translateY(-24px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Landing / config page ---------- */

.landing-body {
  background: #0f1117;
  color: #e8e8e8;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}

.landing-card {
  background: #1b1e29;
  border-radius: 14px;
  padding: 32px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.landing-card h1 {
  font-size: 22px;
  margin-top: 0;
}

.landing-card label {
  display: block;
  margin: 18px 0 6px;
  font-size: 14px;
  color: #b8bcc8;
}

.landing-card input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #33384a;
  background: #12141c;
  color: #fff;
  font-size: 15px;
}

.landing-card button {
  margin-top: 16px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff5c8d, #ffaf40);
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
}

.landing-card button:hover {
  filter: brightness(1.08);
}

.url-output {
  margin-top: 18px;
  padding: 12px;
  background: #12141c;
  border: 1px dashed #33384a;
  border-radius: 8px;
  word-break: break-all;
  font-size: 14px;
  display: none;
}

.url-output.visible {
  display: block;
}

.copy-button {
  margin-top: 10px;
}

.instructions {
  margin-top: 28px;
  font-size: 14px;
  line-height: 1.7;
  color: #c7cad4;
}

.instructions h2 {
  font-size: 16px;
  color: #fff;
}

.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.theme-swatch {
  width: 64px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 4px;
  text-align: center;
  background: transparent;
}

.theme-swatch.selected {
  border-color: #fff;
}

.theme-swatch-color {
  width: 100%;
  height: 40px;
  border-radius: 8px;
}

.theme-swatch-label {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #c7cad4;
}

.premium-section {
  margin-top: 28px;
  padding: 16px;
  border: 1px dashed #6b5230;
  border-radius: 10px;
  background: rgba(255, 175, 64, 0.06);
}

.premium-section h2 {
  font-size: 15px;
  margin: 0 0 6px;
  color: #ffd28a;
}

.premium-note {
  font-size: 12px;
  color: #b8bcc8;
  margin: 0 0 14px;
}

.premium-field {
  margin-bottom: 12px;
}

.premium-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: #b8bcc8;
}

.premium-field input[type="text"],
.premium-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #33384a;
  background: #12141c;
  color: #fff;
  font-size: 14px;
}

.premium-field input[type="color"] {
  width: 48px;
  height: 32px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

.preview-panel {
  margin-top: 8px;
  padding: 20px;
  border-radius: 10px;
  font-family: var(--overlay-font);
  background-color: #14161f;
  background-image:
    linear-gradient(45deg, #2a2d3a 25%, transparent 25%),
    linear-gradient(-45deg, #2a2d3a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a2d3a 75%),
    linear-gradient(-45deg, transparent 75%, #2a2d3a 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.preview-panel .chat-line {
  align-self: flex-start;
}
