.page-apply .apply-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 0;
}

.apply-hero {
  position: relative;
  text-align: center;
  padding: 6.25rem 1.5rem 2rem;
  overflow: hidden;
}

.apply-hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(56, 189, 248, 0.18), transparent 58%),
    radial-gradient(ellipse 55% 45% at 75% 35%, rgba(201, 162, 39, 0.12), transparent 55%);
  pointer-events: none;
}

.apply-hero-inner {
  position: relative;
  z-index: 1;
}

.apply-container {
  max-width: 640px;
}

.apply-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
  background: linear-gradient(135deg, var(--text) 0%, #7dd3fc 45%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.apply-lead {
  margin: 0 auto;
  max-width: 34rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 1.05rem;
}

.apply-hero-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.35rem;
}

.apply-discord-btn {
  border-color: rgba(114, 137, 218, 0.65);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.45), rgba(88, 101, 242, 0.28));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 28px rgba(88, 101, 242, 0.22);
}

.apply-discord-btn:hover,
.apply-discord-btn:focus-visible {
  border-color: rgba(114, 137, 218, 0.9);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.62), rgba(88, 101, 242, 0.4));
  color: #fff;
}

.apply-status {
  margin: 1.75rem auto 0;
  max-width: 28rem;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.apply-status-text {
  margin: 0;
  line-height: 1.6;
  color: #fecaca;
}

.apply-status a {
  color: var(--accent);
  font-weight: 700;
}

.apply-status--closed {
  border-color: rgba(248, 113, 113, 0.35);
  background: linear-gradient(180deg, rgba(60, 24, 32, 0.85), rgba(32, 16, 22, 0.72));
}

.page-apply.apply-closed .apply-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 3rem;
}

.page-apply.apply-closed .apply-lead {
  margin-bottom: 0;
}

.apply-form-section {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1.5rem 4rem;
  background: linear-gradient(180deg, transparent, rgba(107, 92, 231, 0.06), transparent);
}

.apply-form {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.apply-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border: none;
  margin: 0;
  padding: 0;
}

.apply-label {
  font-weight: 700;
  font-size: 0.98rem;
}

.apply-label small {
  font-weight: 600;
  color: var(--text-muted);
}

.apply-field input,
.apply-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 24, 0.55);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.apply-field input:focus,
.apply-field textarea:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.apply-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.apply-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.apply-scale-btn {
  min-width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 18, 32, 0.7);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.apply-scale-btn:hover {
  border-color: rgba(212, 175, 55, 0.45);
}

.apply-scale-btn.is-selected {
  background: linear-gradient(135deg, var(--accent), #a8841a);
  color: #1a1408;
  border-color: transparent;
}

.apply-error {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) - 4px);
  background: rgba(120, 30, 40, 0.45);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.apply-success {
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) - 4px);
  background: rgba(20, 60, 40, 0.45);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #bbf7d0;
}

.apply-submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
  font-size: 1.05rem;
  padding: 1rem 1.5rem;
}

.apply-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.apply-discord-row {
  display: flex;
  gap: 0.65rem;
  align-items: stretch;
}

.apply-discord-row input {
  flex: 1;
  min-width: 0;
}

.apply-discord-row .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.apply-code-label {
  margin-top: 0.35rem;
}

.apply-verify-status {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.apply-verify-status--ok {
  color: #bbf7d0;
}

.apply-verify-status--err {
  color: #fecaca;
}

@media (max-width: 600px) {
  .apply-hero {
    padding-top: 5.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .apply-form-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .apply-form {
    padding: 1.25rem;
  }

  .apply-discord-row {
    flex-direction: column;
  }

  .apply-discord-row .btn {
    width: 100%;
    justify-content: center;
  }
}
