:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #08080a;
  --surface: #151519;
  --surface-soft: #221519;
  --text: #f8f3f4;
  --muted: #c6b9bd;
  --line: #352026;
  --red: #ff2c35;
  --red-dark: #b71320;
  --red-soft: #351017;
  --black: #0d0d10;
  --success: #57f287;
  --warning: #ffcf6b;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  background:
    linear-gradient(135deg, transparent 0 20%, rgba(255, 44, 53, 0.16) 21% 24%, transparent 25% 100%),
    linear-gradient(150deg, transparent 0 48%, rgba(183, 19, 32, 0.22) 49% 52%, transparent 53% 100%),
    linear-gradient(116deg, transparent 0 60%, rgba(255, 44, 53, 0.08) 61% 65%, transparent 66% 100%),
    radial-gradient(circle at 76% 12%, rgba(255, 44, 53, 0.12), transparent 26%),
    linear-gradient(180deg, #101014 0%, var(--bg) 520px);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: rgba(13, 13, 16, 0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 2;
}

.brand {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-size: 20px;
  font-weight: 800;
  gap: 10px;
}

.brand img {
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 44, 53, 0.18);
  display: block;
  height: 38px;
  object-fit: cover;
  width: 38px;
}

nav {
  align-items: center;
  display: flex;
  gap: 14px;
}

main {
  flex: 1;
  margin: 0 auto;
  max-width: 1160px;
  padding: 44px clamp(18px, 4vw, 56px);
  width: 100%;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  padding: 20px clamp(18px, 4vw, 56px);
  text-align: center;
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(30px, 5vw, 72px);
  grid-template-columns: minmax(190px, 320px) minmax(0, 1fr);
  min-height: 520px;
}

.hero-logo {
  align-items: center;
  display: flex;
  justify-content: center;
}

.hero-logo img {
  border-radius: 50%;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42), 0 0 0 9px rgba(255, 44, 53, 0.16);
  display: block;
  max-width: min(320px, 100%);
  width: 100%;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  margin: 0;
  max-width: 850px;
}

.lead {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
  max-width: 680px;
}

.actions,
.card-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-actions {
  align-items: center;
}

.button {
  align-items: center;
  background: var(--red);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
}

.button.secondary {
  background: #25252b;
  color: var(--text);
}

.button.small {
  min-height: 38px;
  padding: 0 14px;
}

.button.tiny {
  border-radius: 8px;
  font-size: 13px;
  min-height: 32px;
  padding: 0 12px;
}

.button.ghost {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  min-height: 32px;
  padding: 0 12px;
}

.button.danger {
  background: var(--red-soft);
  color: #ff9aa2;
  font-size: 13px;
  min-height: 32px;
  padding: 0 12px;
}

.test-result {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.test-result.ok {
  color: var(--success);
}

.test-result.error {
  color: var(--red-dark);
}

.info-box {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 16px;
}

.info-box strong {
  color: var(--text);
}

.info-box .button {
  justify-self: start;
}

.features,
.guild-grid,
.settings-shell,
.module-grid,
.form-grid {
  display: grid;
  gap: 16px;
}

.features {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.features article,
.guild-card,
.panel,
.module-card,
.upgrade-band {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.features article,
.module-card {
  border-top: 3px solid rgba(255, 44, 53, 0.78);
}

.features h2,
.guild-card h2,
.panel h2,
.module-card h2,
.upgrade-band h2 {
  font-size: 19px;
  margin: 0 0 8px;
}

.features p,
.guild-card p,
.panel p,
.page-head p,
.module-card p,
.upgrade-band p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.page-head {
  margin-bottom: 26px;
}

.page-head h1 {
  font-size: clamp(34px, 5vw, 54px);
  margin-bottom: 10px;
}

.page-head.split {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.guild-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.guild-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-content: space-between;
}

.guild-main {
  align-items: center;
  display: flex;
  gap: 14px;
}

.guild-main img,
.guild-placeholder {
  border-radius: 8px;
  height: 54px;
  width: 54px;
}

.guild-placeholder {
  align-items: center;
  background: var(--red-soft);
  color: #ff9aa2;
  display: flex;
  font-weight: 900;
  justify-content: center;
  text-transform: uppercase;
}

.settings-shell {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.social-link-list {
  display: grid;
  gap: 8px;
}

.simple-socials {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.simple-socials-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.simple-socials-head span {
  font-weight: 800;
}

.simple-social-list {
  display: grid;
  gap: 12px;
}

.simple-social-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.simple-social-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 150px minmax(0, 1fr) auto 38px;
}

.simple-social-row select,
.simple-social-row input {
  min-width: 0;
}

.module-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-content: space-between;
  min-height: 190px;
}

.module-card.enabled {
  border-color: rgba(255, 44, 53, 0.62);
}

.module-title,
.module-footer,
.module-form-head,
.upgrade-band {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.mini-badge {
  background: var(--red-soft);
  border-radius: 999px;
  color: #ff9aa2;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.upgrade-band {
  margin-top: 16px;
}

.dashboard-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: 250px minmax(0, 1fr);
}

.module-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px;
}

.module-sidebar a {
  align-items: center;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
}

.module-sidebar a.active,
.module-sidebar a:hover {
  background: var(--red-soft);
  color: var(--text);
}

.module-sidebar small {
  color: var(--muted);
  font-weight: 800;
}

.module-form {
  min-height: 420px;
}

.module-form-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  padding-bottom: 18px;
}

.locked-panel {
  background: #241b10;
  border: 1px solid #6b4b18;
  border-radius: 8px;
  padding: 22px;
}

.locked-panel h3 {
  margin: 0 0 8px;
}

label {
  display: grid;
  font-weight: 800;
  gap: 8px;
  margin-bottom: 18px;
}

input,
textarea,
select {
  background: #0f0f13;
  border: 1px solid #443139;
  color: var(--text);
  border-radius: 8px;
  font: inherit;
  padding: 12px 14px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.check {
  align-items: center;
  display: flex;
  gap: 10px;
}

.check input {
  width: auto;
}

.status {
  background: var(--surface-soft);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  padding: 10px 14px;
}

.status.ok,
.success {
  background: var(--red-soft);
  color: #ff9aa2;
}

.spacer {
  height: 16px;
}

.warning {
  background: #241b10;
  border: 1px solid #6b4b18;
  border-radius: 8px;
  color: var(--warning);
  font-weight: 800;
  padding: 12px 14px;
}

.copy-box {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
  padding: 12px 14px;
}

.user-pill {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  bottom: 16px;
  box-shadow: 0 12px 24px rgba(17, 17, 20, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
  position: fixed;
  right: 16px;
}

@media (max-width: 760px) {
  .topbar,
  nav,
  .page-head.split {
    align-items: flex-start;
    flex-direction: column;
  }

  .features,
  .hero,
  .settings-shell,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-logo {
    justify-content: flex-start;
  }

  .hero-logo img {
    max-width: 180px;
  }

  .module-title,
  .module-footer,
  .module-form-head,
  .upgrade-band {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 42px;
  }

  .simple-social-row {
    grid-template-columns: 1fr;
  }

  .simple-social-row .button {
    width: 100%;
  }
}
