:root {
  --bg: #0f0e12;
  --surface: #1a1920;
  --surface2: #24222c;
  --text: #e8e6ed;
  --text-muted: #8c8899;
  --accent: #c9a227;
  --accent-dim: #9a7b1a;
  --success: #3d9d7a;
  --error: #c75c5c;
  --radius: 12px;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Playfair Display', serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 3rem;
}

.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.25rem;
  letter-spacing: 0.02em;
}

.tagline {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.main {
  width: 100%;
  max-width: 420px;
}

.view {
  animation: fadeIn 0.25s ease;
}

.view.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

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

.form label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--surface2);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s;
}

.form input:focus {
  outline: none;
  border-color: var(--accent);
}

.form input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  color: inherit;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  margin-top: 0.25rem;
}

.btn-primary:hover {
  background: var(--accent-dim);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
}

.btn-secondary:hover {
  background: #2e2c38;
}

.btn-block {
  width: 100%;
}

.copy-line {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.copy-line input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--surface2);
  border-radius: 8px;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
}

.copy-line .btn {
  flex-shrink: 0;
}

.status-box {
  background: var(--bg);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.status-box strong {
  color: var(--text);
}

.result-box {
  text-align: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(145deg, var(--surface2) 0%, var(--surface) 100%);
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  margin: 1.5rem 0;
}

.result-box .result-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.result-box .result-theme {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

.result-box .result-name {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.message {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.message.error {
  background: rgba(199, 92, 92, 0.15);
  color: var(--error);
}

.message.success {
  background: rgba(61, 157, 122, 0.15);
  color: var(--success);
}

.footer {
  margin-top: auto;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer p {
  margin: 0;
}
