:root {
  --bg-dark: #090D16;
  --card-bg: rgba(17, 24, 39, 0.88);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-inner-bg: rgba(13, 19, 33, 0.85);
  --text-main: #F9FAFB;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --emerald: #10B981;
  --emerald-hover: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --purple: #8B5CF6;
  --purple-glow: rgba(139, 92, 246, 0.25);
  --blue: #3B82F6;
  --danger: #EF4444;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

/* Ambient Background Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.purple-glow {
  top: -150px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22) 0%, transparent 70%);
}
.cyan-glow {
  bottom: -150px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, transparent 70%);
}

.portal-container {
  width: 100%;
  max-width: 760px;
  position: relative;
  z-index: 1;
}

/* Header */
.portal-header {
  text-align: center;
  margin-bottom: 28px;
}
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #C4B5FD;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 9999px;
  margin-bottom: 14px;
}
.brand-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.gradient-text {
  background: linear-gradient(135deg, #10B981 0%, #38BDF8 50%, #A855F7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Main Card */
.main-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.card-section {
  padding: 32px;
}

.section-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.section-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.section-title-wrap h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.section-title-wrap p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Callout */
.info-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 24px;
}
.callout-icon {
  font-size: 1.25rem;
}
.callout-text {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #BFDBFE;
}
.callout-text strong {
  display: block;
  color: #DBEAFE;
  margin-bottom: 2px;
}

/* Form */
.activation-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.input-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.input-group {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 4px 6px 4px 14px;
  transition: all 0.2s ease;
}
.input-group:focus-within {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-glow);
}
.input-prefix {
  font-size: 1.1rem;
  margin-right: 8px;
}
.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 8px 0;
}
.input-group input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
  letter-spacing: 0.03em;
}
.btn-paste {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-paste:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-main);
}
.input-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: 1px solid #34D399;
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 14px var(--emerald-glow);
  transition: all 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}
.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Alert Boxes */
.alert-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-top: 16px;
  font-size: 0.9rem;
}
.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
}

/* Result Card */
.result-card {
  margin-top: 24px;
  background: var(--card-inner-bg);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 20px;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.status-indicator {
  width: 10px;
  height: 10px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald);
}
.result-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  flex: 1;
}
.key-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: #6EE7B7;
  padding: 3px 8px;
  border-radius: 9999px;
}

.key-display-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.key-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #6EE7B7;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  padding: 10px;
  resize: none;
  outline: none;
  line-height: 1.4;
  word-break: break-all;
}
.btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--emerald);
  color: #064E3B;
  border: none;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-copy:hover {
  background: #34D399;
}

.next-steps-guide {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.step-num {
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--card-border);
}

/* Community Grid */
.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--card-border);
}
.community-card {
  background: rgba(17, 24, 39, 0.7);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}
.community-card:hover {
  background: rgba(26, 36, 56, 0.85);
}
.card-icon {
  font-size: 1.8rem;
}
.card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.card-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}
.card-action {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--purple);
}
.discord-card:hover .card-action {
  color: #A78BFA;
}
.github-card:hover .card-action {
  color: #38BDF8;
}

/* Donate Card */
.donate-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-donate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #EC4899 0%, #BE185D 100%);
  color: white;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: opacity 0.2s;
}
.btn-donate:hover {
  opacity: 0.9;
}
.btn-qr-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-qr-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-main);
}

/* QR Code Preview */
.qr-preview-box {
  padding: 24px;
  background: rgba(10, 15, 26, 0.9);
  text-align: center;
  border-top: 1px solid var(--card-border);
  animation: fadeIn 0.3s ease;
}
.qr-frame {
  display: inline-block;
  background: white;
  padding: 12px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  margin-bottom: 12px;
}
.qr-image {
  width: 180px;
  height: 180px;
  display: block;
}
.qr-instructions {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.portal-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.portal-footer .copyright {
  margin-top: 4px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #10B981;
  color: #064E3B;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 9999px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
  z-index: 100;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Responsive */
@media (max-width: 720px) {
  .community-grid {
    grid-template-columns: 1fr;
  }
  .brand-title {
    font-size: 2rem;
  }
  .card-section {
    padding: 22px 18px;
  }
}

