/* Maple web - distinctive, non-generic aesthetic */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,600;0,9..40,700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-dim: #388bfd;
  --success: #3fb950;
  --error: #f85149;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 139, 253, 0.12), transparent),
    linear-gradient(180deg, var(--bg) 0%, #0a0e14 100%);
}

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

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

input::placeholder {
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.05s;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

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

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

.btn-block {
  width: 100%;
}

.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(248, 81, 73, 0.15);
  border: 1px solid rgba(248, 81, 73, 0.4);
  color: #ff7b72;
}

.alert-success {
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(63, 185, 80, 0.35);
  color: var(--success);
}

/* Flow steps */
.flow-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.flow-steps li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.flow-steps li:last-child {
  border-bottom: none;
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  font-weight: 500;
}

.flow-steps li.done .step-num {
  background: var(--success);
  border-color: var(--success);
  color: var(--bg);
}

.step-text {
  flex: 1;
}

.step-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Results */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.result-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.result-value {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  word-break: break-all;
}

.result-value a {
  color: var(--accent);
  text-decoration: none;
}

.result-value a:hover {
  text-decoration: underline;
}

.copy-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.guide-link {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.guide-link a {
  color: var(--accent);
  text-decoration: none;
}

.guide-link a:hover {
  text-decoration: underline;
}

/* Expandable guide dropdown */
.guide-dropdown {
  margin-top: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.guide-dropdown summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-size: 0.95rem;
  list-style: none;
  user-select: none;
}

.guide-dropdown summary::-webkit-details-marker {
  display: none;
}

.guide-dropdown summary::before {
  content: "▼";
  display: inline-block;
  margin-right: 0.5rem;
  font-size: 0.7em;
  transition: transform 0.2s;
}

.guide-dropdown[open] summary::before {
  transform: rotate(-90deg);
}

.guide-dropdown summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.guide-dropdown-content {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}

/* Guide page */
.container--wide {
  max-width: 640px;
}

.guide-section {
  margin-bottom: 2rem;
}

.guide-section h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.guide-section h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.5rem;
}

.guide-section ul,
.guide-section ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.guide-section li {
  margin-bottom: 0.35rem;
}

.guide-steps {
  list-style: decimal;
}

.guide-section p {
  margin: 0 0 0.75rem;
}

.guide-section p:last-child {
  margin-bottom: 0;
}

.guide-section code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.guide-table th,
.guide-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--border);
}

.guide-table th {
  background: var(--surface);
  font-weight: 600;
}

.guide-table a {
  color: var(--accent);
  text-decoration: none;
}

.guide-table a:hover {
  text-decoration: underline;
}
