/* ── Reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #CC2222;
  --red-dark:   #991A1A;
  --red-glow:   rgba(204, 34, 34, 0.25);
  --gold:       #D4A843;
  --gold-light: #F0C060;
  --bg:         #0E0E0E;
  --surface:    #161616;
  --surface2:   #1E1E1E;
  --border:     #2A2A2A;
  --border2:    #333333;
  --text:       #E8E8E8;
  --text-muted: #888888;
  --text-dim:   #555555;
  --success:    #2EAA5E;
  --danger:     #CC3333;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 24px;
  color: var(--red);
  filter: drop-shadow(0 0 8px var(--red-glow));
}

.logo-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.logo-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-username {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-logout {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border2);
  color: var(--text-muted);
  background: transparent;
  transition: all 0.2s;
}
.btn-logout:hover {
  color: var(--text);
  border-color: var(--text-dim);
  background: var(--surface2);
}

/* ── Main / Footer ─────────────────────────────────────────────────────────── */
main { flex: 1; }

.site-footer {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  letter-spacing: 0.01em;
}
.btn-primary:hover {
  background: var(--red-dark);
  box-shadow: 0 0 24px var(--red-glow);
  color: #fff;
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: #5865F2;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-discord:hover {
  background: #4752C4;
  color: #fff;
  transform: translateY(-1px);
}

.btn-large { padding: 16px 40px; font-size: 16px; }

/* ── Hero (index) ──────────────────────────────────────────────────────────── */
.hero {
  max-width: 800px;
  margin: 80px auto 0;
  padding: 0 24px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 5px 14px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--red);
  text-shadow: 0 0 40px var(--red-glow);
}

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 48px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Steps ─────────────────────────────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 160px;
}

.step-num {
  width: 32px;
  height: 32px;
  background: var(--red);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 12px var(--red-glow);
}

.step-text { text-align: left; }
.step-text strong { display: block; font-size: 13px; color: var(--text); }
.step-text span { font-size: 11px; color: var(--text-muted); }

.step-arrow {
  color: var(--text-dim);
  font-size: 20px;
  padding: 0 4px;
}

/* ── Info cards ────────────────────────────────────────────────────────────── */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 64px auto 80px;
  padding: 0 24px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s;
}
.info-card:hover { border-color: var(--border2); }

.info-icon { font-size: 28px; margin-bottom: 12px; }

.info-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.info-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Form page ─────────────────────────────────────────────────────────────── */
.form-page {
  max-width: 760px;
  margin: 48px auto 80px;
  padding: 0 24px;
}

.form-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 48px;
}

.user-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  object-fit: cover;
  flex-shrink: 0;
}

.user-avatar-placeholder {
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 0 16px var(--red-glow);
}

.form-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.form-header-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Form sections ─────────────────────────────────────────────────────────── */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  margin-bottom: 24px;
  transition: border-color 0.2s;
}
.form-section:focus-within { border-color: var(--red); }

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.section-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.1em;
  background: rgba(204,34,34,0.12);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(204,34,34,0.25);
}

.section-label h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.section-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  margin-top: 6px;
  line-height: 1.6;
}

/* ── Rules box ─────────────────────────────────────────────────────────────── */
.rules-box {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.rules-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rules-box li {
  font-size: 13.5px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.rules-box li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--red);
}

/* ── Checkboxes ────────────────────────────────────────────────────────────── */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  margin-top: 8px;
}
.checkbox-label:hover { background: var(--surface2); border-color: var(--border2); }
.checkbox-label:has(input:checked) { background: rgba(204,34,34,0.07); border-color: rgba(204,34,34,0.3); }

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border2);
  border-radius: 4px;
  background: var(--surface2);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.15s;
  position: relative;
}
.checkbox-label input[type="checkbox"]:checked {
  background: var(--red);
  border-color: var(--red);
}
.checkbox-label input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 800;
}

.checkbox-label span { font-size: 14px; color: var(--text); line-height: 1.5; }

/* ── Form inputs ───────────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group-full { grid-column: 1 / -1; }

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group .req { color: var(--red); }

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(204,34,34,0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-group select option {
  background: var(--surface2);
  color: var(--text);
}

.form-group small {
  font-size: 12px;
  color: var(--text-dim);
}

.char-counter {
  text-align: right;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── Submit ────────────────────────────────────────────────────────────────── */
.form-submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 0 0;
}

.submit-disclaimer {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  max-width: 480px;
  line-height: 1.6;
}

.btn-submit { font-size: 17px; padding: 18px 56px; }
.btn-submit:disabled {
  background: var(--border2);
  color: var(--text-dim);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Success page ──────────────────────────────────────────────────────────── */
.success-page, .status-page {
  max-width: 600px;
  margin: 100px auto;
  padding: 0 24px;
  text-align: center;
}

.success-icon, .status-icon {
  font-size: 64px;
  margin-bottom: 24px;
  display: block;
}

.success-page h1, .status-page h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.success-page p, .status-page p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.success-card, .status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin: 32px 0;
  text-align: left;
}

.success-card h3, .status-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.status-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border2);
  flex-shrink: 0;
}

.status-dot.done { background: var(--success); box-shadow: 0 0 8px rgba(46,170,94,0.4); }
.status-dot.active { background: var(--gold); box-shadow: 0 0 8px rgba(212,168,67,0.4); animation: pulse 2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Status badges ─────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-pending  { background: rgba(212,168,67,0.15);  color: var(--gold);    border: 1px solid rgba(212,168,67,0.3); }
.badge-approve  { background: rgba(46,170,94,0.15);   color: var(--success); border: 1px solid rgba(46,170,94,0.3); }
.badge-refuse   { background: rgba(204,51,51,0.15);   color: var(--danger);  border: 1px solid rgba(204,51,51,0.3); }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-section { padding: 20px 16px; }
  .steps { flex-direction: column; align-items: stretch; }
  .step-arrow { display: none; }
  .step { min-width: unset; }
  .header-inner { padding: 0 16px; }
}
