*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #09090b;
  --surface: #131316;
  --border: rgba(255,255,255,0.08);
  --text: #fafafa;
  --text-secondary: rgba(255,255,255,0.6);
  --text-muted: rgba(255,255,255,0.35);
  --accent: #c8a96e;
  --accent-hover: #d4b87c;
  --danger: #e07070;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.create-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.back-link {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover { color: var(--accent); }

h1 {
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
}

#create-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.field input:focus { border-color: var(--accent); }

.field-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.slug-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s;
}

.slug-input-wrap:focus-within { border-color: var(--accent); }

.slug-prefix {
  padding: 0.7rem 0 0.7rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  user-select: none;
}

.slug-input-wrap input {
  border: none !important;
  background: transparent !important;
  padding-left: 0 !important;
  border-radius: 0 !important;
  flex: 1;
  min-width: 0;
}

.collapsible {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.collapsible summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
  user-select: none;
  list-style: none;
}

.collapsible summary::before {
  content: '+ ';
}

.collapsible[open] summary::before {
  content: '- ';
}

.collapsible > *:not(summary) {
  padding: 0 1rem 1rem;
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.75rem;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.theme-option:has(input:checked) {
  border-color: var(--accent);
}

.theme-option input { display: none; }

.theme-preview {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 4px;
}

.classic-preview  { background: linear-gradient(135deg, #1a1916 0%, #2a2520 100%); }
.elegant-preview  { background: linear-gradient(135deg, #0f1510 0%, #1a2a1f 100%); }
.cinematic-preview { background: linear-gradient(135deg, #0a0a14 0%, #14142a 100%); }
.polaroid-preview { background: #f0efe8; border: 3px solid #fff; border-bottom-width: 12px; }

.theme-option span {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.screen-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.error {
  font-size: 0.85rem;
  color: var(--danger);
  text-align: center;
}

.hidden { display: none !important; }

.btn-create {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--bg);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 0.5rem;
}

.btn-create:hover { background: var(--accent-hover); box-shadow: 0 2px 8px rgba(200,169,110,0.25); }
.btn-create:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
