:root {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #f3f3f3;
  background-color: #050505;
  color-scheme: dark;
  --bg-gradient: radial-gradient(circle at top, #101010, #050505 70%);
  --panel-border: #1f1f1f;
  --panel-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --panel-bg: #ffffff;
  --panel-text: #111111;
  --glass-bg: rgba(255, 255, 255, 0.04);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(2.25rem, 6vw, 3.5rem);
  background: var(--bg-gradient);
  color: var(--text-on-background, #f3f3f3);
}

body.page--about,
body.page--contact,
body.page--resources,
body.page--donate,
body.page--shop,
body.page--community {
  --panel-bg: #81613c;
  --panel-text: #111;
}

main,
.info-panel,
.card {
  width: min(92vw, 760px);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--panel-border);
  border-radius: clamp(16px, 4vw, 26px);
  background-color: var(--panel-bg);
  color: var(--panel-text);
  box-shadow: var(--panel-shadow);
}

.info-panel {
  background: rgba(255, 255, 255, 0.05);
  color: #f5f5f5;
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

body.page--about .info-panel {
  background: rgba(255, 255, 255, 0.05);
}

h1,
h2,
h3 {
  letter-spacing: 0.05em;
  margin-top: 0;
  line-height: 1.2;
}

p {
  margin: 0.4rem 0 1rem;
  line-height: 1.6;
}

a {
  color: #f4b400;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  padding-left: 1.25rem;
  line-height: 1.5;
}

form {
  display: grid;
  gap: 1.15rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.45rem;
  letter-spacing: 0.04em;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #92817a;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-color: #fff;
  color: #111;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #f4b400;
  box-shadow: 0 0 0 3px rgba(244, 180, 0, 0.2);
}

textarea {
  min-height: 160px;
  resize: vertical;
}

button {
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  background: linear-gradient(120deg, #f4b400, #ff8800);
  color: #111;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.status {
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.03em;
  min-height: 1.2em;
}

.status.error {
  color: #e57373;
}

.status.success {
  color: #1b5e20;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.team-card {
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.team-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #d9d9d9;
}

.resource-grid,
.mutual-aid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.resource-card {
  background: linear-gradient(135deg, rgba(10, 10, 10, 0.95), rgba(30, 30, 30, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 1.1rem;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.resource-card--center {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: min(600px, 100%);
}

@media (max-width: 600px) {
  .resource-card--center {
    grid-column: auto;
    justify-self: stretch;
    max-width: none;
  }
}

.resource-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: #fff;
}

.resource-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.resource-card:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  animation: resource-bounce 0.4s ease;
}

.info-panel--map {
  width: min(96vw, 1024px);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.us-map {
  position: relative;
  width: 100%;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(11, 18, 35, 0.85), rgba(3, 5, 12, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(0.75rem, 3vw, 1.25rem);
  overflow: hidden;
  min-height: 420px;
}

.us-map__svg {
  width: 100%;
  height: auto;
  display: block;
}

.us-map__state {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 0.6;
  cursor: pointer;
  transition: fill 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

.us-map__state:hover,
.us-map__state:focus-visible {
  fill: rgba(46, 165, 255, 0.85);
  filter: drop-shadow(0 0 10px rgba(46, 165, 255, 0.8));
  outline: none;
}

.us-map__loader {
  width: 100%;
  min-height: 280px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.us-map__error {
  width: 100%;
  min-height: 280px;
  display: grid;
  place-items: center;
  color: #ff8a80;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.us-map__hint {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.state-files-panel {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(6, 10, 18, 0.8);
  padding: 1rem;
  color: #f5f5f5;
}

.state-files-panel__header {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.state-files-panel__status {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

.state-files-panel__empty {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: #ffb74d;
}

.state-files-panel__form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.state-files-panel__label {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.state-files-panel__form select {
  width: 100%;
}

.state-files-panel__button {
  width: 100%;
  text-transform: none;
  letter-spacing: 0.02em;
}

@keyframes resource-bounce {
  0% {
    transform: translateY(0) scale(1);
  }
  60% {
    transform: translateY(-8px) scale(1.05);
  }
  100% {
    transform: translateY(-4px) scale(1.04);
  }
}

.server-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 1.25rem 0;
}

.server-list li {
  margin: 0;
  padding: 0;
}

.server-card {
  width: 100%;
  background: linear-gradient(135deg, rgba(15, 15, 20, 0.95), rgba(45, 45, 55, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  line-height: 1.5;
  color: #f7f7f7;
  text-align: left;
  cursor: pointer;
  font: inherit;
  display: block;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.server-card:hover,
.server-card:focus-visible {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  animation: resource-bounce 0.4s ease;
}

.server-card:focus-visible {
  outline: 2px solid #f4b400;
  outline-offset: 3px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

body.page--shop #shop.stack {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.shop-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.shop-card span {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.shop-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  body {
    gap: 1.5rem;
  }

  main,
  .info-panel,
  .card {
    width: 100%;
    padding: clamp(1.25rem, 6vw, 1.75rem);
  }

  h1 {
    font-size: clamp(1.75rem, 6vw, 2.2rem);
  }

  button {
    width: 100%;
  }

  .us-map {
    min-height: 300px;
  }
}

@media (min-width: 900px) {
  body {
    align-items: center;
  }
}
