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

:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #334155;
  --border: #475569;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #22c55e;
  --primary-hover: #16a34a;
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --success-bg: rgba(34, 197, 94, 0.12);
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 197, 94, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(59, 130, 246, 0.08), transparent);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

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

.logo {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hidden {
  display: none !important;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

label input {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

label input:focus {
  outline: none;
  border-color: var(--primary);
}

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

.field-group > label {
  margin-bottom: 0.5rem;
}

.field-hint {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}

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

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

.input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 0.5rem;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  min-width: 0;
}

.input-wrap input:focus {
  outline: none;
}

.prefix,
.suffix {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0 0.75rem;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

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

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #052e16;
  margin-top: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--surface-2);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border);
}

.params-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.params-header h2 {
  margin-bottom: 0.25rem;
}

.user-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.78rem;
}

.tag-green {
  background: var(--success-bg);
  color: var(--primary);
}

.tag-red {
  background: var(--danger-bg);
  color: var(--danger);
}

.error-msg {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--danger-bg);
  color: #fca5a5;
  border-radius: 8px;
  font-size: 0.875rem;
}

.status-msg {
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.875rem;
  text-align: center;
}

.status-msg.success {
  background: var(--success-bg);
  color: var(--primary);
}

.status-msg.error {
  background: var(--danger-bg);
  color: #fca5a5;
}

.updated-at {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 380px) {
  .container {
    padding: 1.5rem 1rem 2.5rem;
  }

  .card {
    padding: 1.25rem;
  }
}
