:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f172a;
  color: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 2rem;
  background: #0f172a;
  color: #f8fafc;
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.join-container {
  max-width: 600px;
  margin: 4rem auto;
  padding: 2.5rem;
  background: #1e293b;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

h1,
.card h3 {
  color: #38bdf8;
}

h1 {
  margin-top: 0;
}

p {
  line-height: 1.6;
  color: #94a3b8;
}

hr {
  margin: 1.5rem 0;
  border: 0;
  border-top: 1px solid #334155;
}

.form-group {
  margin-top: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
  font-weight: 600;
}

input[type="email"] {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.75rem;
  color: #fff;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
}

input[type="email"]:focus {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

#join-form > button {
  width: 100%;
  padding: 0.85rem;
  color: #fff;
  background: #0284c7;
  font-size: 1rem;
  font-weight: 700;
  transition: background 0.2s ease;
}

#join-form > button:hover {
  background: #0369a1;
}

.footer-text,
.form-message,
.resource-message {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #334155;
}

.portal-header h2 {
  margin: 0;
}

.member-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  padding: 0.25rem 0.75rem;
  color: #dcfce7;
  background: #15803d;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
}

#member-email {
  color: #94a3b8;
}

.text-button {
  padding: 0.4rem 0.65rem;
  color: #bae6fd;
  background: transparent;
  border: 1px solid #334155;
}

.text-button:hover {
  background: #1e293b;
}

.portal-content {
  max-width: 1200px;
  margin: 0 auto;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  padding: 1.5rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
}

.card h3 {
  margin-top: 0;
}

.card a {
  display: inline-block;
  margin-top: 0.5rem;
  color: #38bdf8;
  font-weight: 600;
  text-decoration: none;
}

.card a:hover {
  text-decoration: underline;
}

@media (max-width: 650px) {
  body {
    padding: 1rem;
  }

  .join-container {
    margin: 2rem auto;
    padding: 1.5rem;
  }

  .portal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-summary {
    justify-content: flex-start;
  }
}
