:root {
  --bg: #0f1115;
  --card: #171a21;
  --border: #2a2f3a;
  --text: #f0f2f5;
  --muted: #9aa3b2;
  --accent: #ffd400;
  --danger: #e4241b;
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0 0 60px;
}

header {
  padding: 32px 24px 16px;
  text-align: center;
}

header h1 {
  margin: 0;
  color: var(--accent);
}

header p {
  color: var(--muted);
  margin: 4px 0 0;
}

main {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.card h2 {
  margin-top: 0;
  font-size: 18px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: -8px;
}

input[type="text"], textarea {
  width: 100%;
  background: #0f1115;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  margin-bottom: 10px;
  font-family: inherit;
}

button {
  background: var(--accent);
  color: #111;
  border: none;
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}

button:hover { opacity: 0.9; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.status { color: var(--muted); font-size: 13px; min-height: 18px; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
}

.tab-btn.active {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

.frame-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.frame-tile {
  position: relative;
}

.frame-tile img {
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  border: 3px solid transparent;
  display: block;
}

.frame-tile.selected img {
  border-color: var(--accent);
}

.frame-tile .order-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--accent);
  color: #111;
  font-weight: 700;
  font-size: 13px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

.frame-tile.selected .order-badge {
  display: flex;
}

.add-photo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.add-photo-row input[type="file"] { flex: 1; margin: 0; }

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  margin-bottom: 14px;
}

.line-row, .extra-badge-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.line-row input[type="text"] { margin: 0; flex: 1; }

.line-row select {
  background: #0f1115;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 6px;
}

.extra-badge-row input[type="file"] { flex: 1; }
.extra-badge-row input[type="text"] { margin: 0; flex: 1; }

.remove-btn {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
}

h3 { margin-bottom: 4px; font-size: 15px; }

.badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.badge-row input { margin: 0; flex: 1; }

.title-option {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
}

.title-option.selected {
  border-color: var(--accent);
  background: #22201040;
}

.title-option .title {
  font-weight: 700;
}

.title-option .headline {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

#thumbnailPreview img {
  width: 100%;
  border-radius: 8px;
  margin-top: 12px;
}

#thumbnailPreview a {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
}
