:root {
  color-scheme: dark;
  --black: #050505;
  --dark-grey: #0c0c0c;
  --white: #ffffff;
  --grey: #a3a3a3;
  --dim: #737373;
  --line: #222222;
  --panel: #0c0c0c;
  --danger: #ff6b6b;
  --accent: #51cf66;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at center, #101010 0%, var(--black) 100%);
  color: var(--white);
  font-family: 'Outfit', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Topbar Layout */
.topbar {
  background: transparent;
  position: relative;
  z-index: 100;
  padding-top: 32px;
  padding-bottom: 12px;
}

.topbar-container {
  width: min(800px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.topbar-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.topbar-nav a {
  color: var(--grey);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 6px;
  transition: all 0.25s ease;
}

.topbar-nav a:hover {
  color: var(--white);
  background: var(--line);
}

.topbar-nav a.active {
  color: var(--black);
  background: var(--white);
  font-weight: 700;
}

.topbar-nav a#developerPortalLink {
  display: none;
  border: 1px solid var(--white);
}

.topbar-nav a#developerPortalLink.is-visible {
  display: inline-block;
}

/* Scroll Ornament Line */
.topbar-scroll-line {
  width: 100%;
  max-width: 680px;
  margin-top: 12px;
  color: var(--line);
  display: flex;
  justify-content: center;
}

.topbar-scroll-line svg {
  width: 100%;
  height: auto;
  display: block;
  animation: idlePulse 4s ease-in-out 1.6s infinite;
}

.topbar-scroll-line line {
  stroke-dasharray: 500;
  stroke-dashoffset: 500;
  animation: drawLine 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.topbar-scroll-line path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawLine 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 0.6s;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes idlePulse {
  0%, 100% {
    opacity: 0.5;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.05));
  }
  50% {
    opacity: 0.85;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.25));
  }
}

main {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 56px;
  flex: 1;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -1px;
}

p {
  margin: 0 0 20px;
  color: var(--grey);
}

.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: var(--panel);
  margin-top: 24px;
}

.form-group {
  margin-bottom: 20px;
}

label.field-label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--white);
}

input[type="text"], textarea {
  width: 100%;
  background: #050505;
  color: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  font-size: 1rem;
  font-family: inherit;
}

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

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #020202;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  color: var(--grey);
  font-size: 0.95rem;
}

.checkbox-label input {
  margin-top: 4px;
}

.hint {
  display: block;
  font-size: 0.85rem;
  color: var(--dim);
  margin-top: 4px;
  line-height: 1.4;
}

button {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--white);
  border-radius: 6px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background: transparent;
  color: var(--white);
}

.error, .notice {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 24px;
}

.error {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(255, 107, 107, 0.05);
}

.notice {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(81, 207, 102, 0.05);
}

footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  color: var(--dim);
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .topbar-container {
    flex-direction: column;
    height: auto;
    padding: 12px 0;
    gap: 10px;
  }
  main {
    padding-top: 24px;
  }
}
