:root {
  --bg-gradient-start: #ffe4f4;
  --bg-gradient-end: #d6e6ff;
  --card-bg: #ffffff;
  --card-glow: rgba(255, 255, 255, 0.8);
  --accent-pink: #ff8ac9;
  --accent-blue: #7caeff;
  --accent-violet: #c6b4ff;
  --text-main: #2b2440;
  --text-muted: #6b6680;
  --border-soft: rgba(255, 255, 255, 0.8);
  --shadow-soft: 0 24px 65px rgba(37, 25, 55, 0.18);
  --shadow-lift: 0 20px 40px rgba(124, 174, 255, 0.25);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  color: var(--text-main);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 138, 201, 0.28), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(124, 174, 255, 0.3), transparent 40%),
    radial-gradient(circle at 70% 85%, rgba(198, 180, 255, 0.25), transparent 42%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.shell {
  width: 100%;
  max-width: 980px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  animation: floatIn 0.7s ease both;
}

.card--narrow {
  max-width: 460px;
  margin: 0 auto;
}

.card--wide {
  max-width: 1280px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(255, 174, 214, 0.95), rgba(173, 200, 255, 0.95));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #43214a;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffffff;
}

.heading {
  margin: 18px 0 6px;
  font-size: 30px;
  line-height: 1.2;
}

.subheading {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--text-muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.input {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(214, 214, 235, 0.9);
  background: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  color: var(--text-main);
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.input:focus {
  border-color: rgba(255, 138, 201, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 138, 201, 0.15);
}

.button {
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-blue));
  box-shadow: 0 16px 24px rgba(255, 138, 191, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-main);
  border: 1px solid rgba(214, 214, 235, 0.9);
  box-shadow: none;
}

.helper {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px dashed rgba(86, 69, 118, 0.35);
  color: var(--text-muted);
  font-size: 13px;
  min-height: 44px;
}

.helper--active {
  border-style: solid;
  border-color: rgba(255, 138, 201, 0.4);
  background: rgba(255, 248, 252, 0.9);
}

.links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  text-decoration: none;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(220, 210, 255, 0.9);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.header-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid rgba(214, 214, 235, 0.9);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.chip.active {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-blue));
  color: #ffffff;
  border-color: transparent;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px dashed rgba(86, 69, 118, 0.25);
}

.stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.stats-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.stats-panel {
  border-radius: var(--radius-md);
  padding: 20px;
  background: linear-gradient(
    145deg,
    rgba(255, 208, 236, 0.9),
    rgba(210, 228, 255, 0.92)
  );
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.stats-panel h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.stats-summary {
  margin-top: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
}

.stats-section {
  margin-top: 14px;
}

.stats-section-title {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stats-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.bar-label {
  width: 86px;
  color: var(--text-muted);
}

.bar {
  flex: 1;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.bar-inner {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-pink), var(--accent-blue));
}

.bar-count {
  width: 64px;
  text-align: right;
}

.stats-footer {
  margin-top: 12px;
  font-size: 11px;
  text-align: right;
}

.stats-scroll {
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  padding: 8px 10px;
  max-height: 260px;
  overflow: auto;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px;
  font-size: 13px;
  border-bottom: 1px solid rgba(230, 224, 255, 0.9);
}

.list-item:last-child {
  border-bottom: none;
}

.item-label {
  display: flex;
  flex-direction: column;
}

.item-label .meta {
  font-size: 11px;
  color: var(--text-muted);
}

.member-card {
  padding: 12px 0;
  border-bottom: 1px solid rgba(214, 214, 235, 0.6);
}

.member-card:last-child {
  border-bottom: none;
}

.profile-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(214, 214, 235, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(214, 214, 235, 0.6);
  font-size: 14px;
}

.info-row span:first-child {
  color: var(--text-muted);
}

.roles-block {
  margin-top: 12px;
}

.roles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.role-pill {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(214, 214, 235, 0.9);
  font-size: 12px;
  color: var(--text-main);
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 900px) {
  .toggle-grid {
    grid-template-columns: 1fr;
  }
}

.spacer {
  height: 18px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.panel-card {
  border-radius: var(--radius-md);
  padding: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(214, 214, 235, 0.7);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.panel-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.panel-scroll {
  max-height: 200px;
  overflow: auto;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 8px 10px;
  border: 1px solid rgba(214, 214, 235, 0.7);
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 900px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }
}


@media (min-width: 900px) {
  .stats-layout {
    grid-template-columns: 3fr 2fr;
  }
}

.text-link {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.text-link:hover {
  border-color: currentColor;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.terms-panel {
  border-radius: var(--radius-md);
  padding: 20px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed rgba(86, 69, 118, 0.3);
  color: var(--text-muted);
}

.guild-card {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}

.guild-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.guild-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(214, 214, 235, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--text-main);
  font-weight: 700;
  font-size: 13px;
}

.guild-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-badge {
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.rank-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.guild-initials {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.server-hero {
  display: flex;
  align-items: center;
  gap: 18px;
}

.server-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.server-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(214, 214, 235, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--text-main);
  font-weight: 700;
  font-size: 18px;
}

.server-hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.server-rank {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(214, 214, 235, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.server-rank img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.guild-meta {
  min-width: 0;
}

.guild-meta strong {
  display: block;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guild-meta .muted {
  margin: 4px 0 0;
}

.guild-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.guild-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex-shrink: 0;
}

.guild-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.stat-pill {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(214, 214, 235, 0.8);
  font-weight: 600;
  color: var(--text-main);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.question-card {
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(214, 214, 235, 0.8);
  background: rgba(255, 255, 255, 0.9);
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.question-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.field-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

@media (max-width: 720px) {
  .guild-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .guild-right {
    width: 100%;
    justify-content: space-between;
  }
}

.terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.term-card {
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(214, 214, 235, 0.8);
  font-size: 14px;
  color: var(--text-muted);
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.fade-up {
  animation: fadeUp 0.65s ease both;
}

.fade-delay-1 {
  animation-delay: 0.1s;
}

.fade-delay-2 {
  animation-delay: 0.2s;
}

.fade-delay-3 {
  animation-delay: 0.3s;
}

@keyframes floatIn {
  from {
    transform: translateY(18px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .card {
    padding: 28px 22px;
  }

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

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