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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #1e3c72);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  padding: 42px 38px;
  width: 100%;
  max-width: 460px;
  animation: fadeInUp 0.7s ease both;
}

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

/* The card's top row: the way back on the left, the account circle on the
   right. */
.form-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

/* Back to the landing page. Deliberately an <a>: the bare `button` rule below
   is full-width and would swallow it — which is also why authslot.css gives the
   signed-out control, a real <button>, an explicit width and height. */
.back-home {
  display: inline-block;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.back-home:hover { color: #74ebd5; }

h1 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 2rem;
  background: linear-gradient(90deg, #74ebd5, #9face6, #74ebd5);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  to { background-position: 200% center; }
}

.subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 28px;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

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

label {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

input:focus,
select:focus {
  outline: none;
  border-color: #74ebd5;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 3px rgba(116, 235, 213, 0.2);
}

/* The placeholder option renders dark on most browsers regardless of the
   select's own background, since <option> ignores backdrop-filter/rgba
   backgrounds and falls back to the platform's native popup styling. */
select option {
  background: #1e3c72;
  color: #fff;
}

button {
  width: 100%;
  margin-top: 6px;
  padding: 13px;
  background: linear-gradient(90deg, #74ebd5, #6a8fe6);
  color: #0f2027;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.25s ease, opacity 0.2s;
  box-shadow: 0 6px 18px rgba(116, 235, 213, 0.25);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(116, 235, 213, 0.4);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.message {
  margin-top: 20px;
  padding: 13px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  animation: fadeInUp 0.4s ease both;
}

.message.success {
  background: rgba(46, 204, 113, 0.18);
  border: 1px solid rgba(46, 204, 113, 0.5);
  color: #7bedaa;
}

.message.error {
  background: rgba(231, 76, 60, 0.18);
  border: 1px solid rgba(231, 76, 60, 0.5);
  color: #ff9d8f;
}

.hidden {
  display: none;
}

/* Discord invite popup — shown after a successful submission when the
   server has a link on file (see showInviteModal in script.js).
   `.modal-overlay.hidden` is a two-class selector on purpose: .modal-overlay
   sets its own `display: flex` to centre the card, and the bare
   single-class `.hidden` above would tie with it on specificity and could
   lose depending on stylesheet order — the same bug player.css documents at
   .lookup-suggest. */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 12, 15, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-overlay.hidden { display: none; }

.modal-card {
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  padding: 36px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  animation: fadeInUp 0.35s ease both;
}

.modal-card h2 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  background: linear-gradient(90deg, #74ebd5, #9face6, #74ebd5);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-card p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  margin-bottom: 22px;
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* Discord's own blurple rather than the site's teal/mint accent, so this
   reads as "leaves the site" the same way the site's own CTA never does. */
.invite-link-btn {
  display: inline-block;
  width: 100%;
  padding: 13px;
  background: linear-gradient(90deg, #5865f2, #7289da);
  color: #fff;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(88, 101, 242, 0.35);
  transition: transform 0.15s ease, box-shadow 0.25s ease;
}

.invite-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(88, 101, 242, 0.5);
}

@media (max-width: 480px) {
  .container {
    padding: 30px 22px;
  }

  h1 {
    font-size: 1.6rem;
  }
}
