:root {
  color-scheme: dark;
  --aniba-bg: #090f1b;
  --aniba-card: rgba(17, 26, 43, 0.86);
  --aniba-card-strong: rgba(20, 31, 50, 0.94);
  --aniba-field: rgba(10, 18, 31, 0.78);
  --aniba-line: rgba(226, 232, 240, 0.14);
  --aniba-line-strong: rgba(56, 189, 248, 0.28);
  --aniba-text: #e8eef8;
  --aniba-muted: #98a7bb;
  --aniba-blue: #38bdf8;
  --aniba-green: #10d49a;
  --aniba-danger: #fb7185;
  --aniba-radius: 16px;
  --aniba-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body.aniba-member-page {
  margin: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.14), transparent 30%),
    radial-gradient(circle at 82% 26%, rgba(16, 212, 154, 0.1), transparent 28%),
    radial-gradient(ellipse at bottom, #152335 0%, #090a0f 70%);
  color: var(--aniba-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

.aniba-member-shell {
  display: grid;
  gap: 24px;
  margin-inline: auto;
  max-width: 1120px;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 62px) 18px;
  width: min(100%, 1120px);
}

.aniba-member-shell--login,
.aniba-member-shell--register,
.aniba-member-shell--forgot-password,
.aniba-member-shell--reset-password,
.aniba-member-shell--verify-email,
.aniba-member-shell--delete-account {
  align-content: start;
  max-width: 560px;
}

.aniba-member-brand {
  justify-self: center;
  text-decoration: none;
}

.aniba-member-brand img {
  display: block;
  filter: drop-shadow(0 10px 28px rgba(56, 189, 248, 0.18));
  height: auto;
  max-width: min(280px, 58vw);
  width: 280px;
}

.aniba-member-card {
  background: linear-gradient(145deg, rgba(17, 26, 43, 0.92), rgba(10, 18, 31, 0.84));
  border: 1px solid var(--aniba-line);
  border-radius: 22px;
  box-shadow: var(--aniba-shadow);
  padding: clamp(22px, 4vw, 34px);
  width: 100%;
}

.aniba-member-card--profile {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.aniba-auth-head,
.aniba-profile-title,
.aniba-panel-head {
  text-align: start;
}

.aniba-kicker {
  color: var(--aniba-green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.aniba-auth-head h1,
.aniba-profile-title h1,
.aniba-member-card h1,
.aniba-member-card h2,
.aniba-member-card h3 {
  line-height: 1.08;
  margin: 0;
}

.aniba-auth-head h1,
.aniba-profile-title h1 {
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: 0;
}

.aniba-auth-head p:not(.aniba-kicker),
.aniba-profile-title p:not(.aniba-kicker),
.aniba-muted {
  color: var(--aniba-muted);
}

.aniba-auth-head {
  margin-bottom: 22px;
}

.aniba-profile-title {
  margin-bottom: 22px;
}

.aniba-profile-title p:not(.aniba-kicker) {
  font-size: 15px;
  margin: 10px 0 0;
  opacity: 0.72;
}

.profile-container {
  margin-inline: auto;
  max-width: 980px;
  padding-block: 48px 72px;
  width: min(100% - 32px, 980px);
}

.profile-summary {
  align-items: center;
  background: rgba(18, 31, 52, 0.88);
  border: 1px solid rgba(100, 140, 190, 0.25);
  border-radius: 14px;
  display: flex;
  gap: 18px;
  padding: 24px;
}

.profile-settings-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  margin-top: 16px;
  width: 100%;
}

.aniba-panel {
  background: rgba(18, 31, 52, 0.88);
  border: 1px solid var(--aniba-line);
  border-radius: 14px;
  padding: 24px;
  min-width: 0;
  width: 100%;
}

.aniba-panel h2 {
  font-size: 18px;
  margin-bottom: 18px;
}

.aniba-member-form {
  display: grid;
  gap: 14px;
}

.aniba-member-form label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  text-align: start;
}

.aniba-member-form input,
.aniba-member-form select {
  background: var(--aniba-field);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  color: var(--aniba-text);
  font: inherit;
  min-height: 48px;
  padding-inline: 14px;
  width: 100%;
}

.aniba-member-form input:focus,
.aniba-member-form select:focus,
.aniba-btn:focus-visible,
.aniba-saved-card a:focus-visible,
.aniba-resend summary:focus-visible {
  border-color: rgba(56, 189, 248, 0.74);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
  outline: none;
}

.aniba-btn,
.aniba-member-form button,
.aniba-auth-modal a,
.aniba-auth-modal button {
  align-items: center;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.aniba-btn:hover,
.aniba-member-form button:hover,
.aniba-auth-modal a:hover,
.aniba-auth-modal button:hover {
  transform: translateY(-1px);
}

.aniba-btn.is-loading,
.aniba-member-form button.is-loading {
  opacity: 0.68;
  pointer-events: none;
}

.aniba-btn-primary,
.aniba-member-form button {
  background: linear-gradient(135deg, #38bdf8, #10d49a);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #02101b;
}

.aniba-btn-secondary {
  background: rgba(56, 189, 248, 0.11);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #dff6ff;
}

.aniba-btn-neutral {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.14);
  color: var(--aniba-text);
}

.aniba-btn-danger {
  background: rgba(251, 113, 133, 0.08);
  border: 1px solid rgba(251, 113, 133, 0.42);
  color: #fecdd3;
}

.aniba-btn-small {
  font-size: 13px;
  min-height: 36px;
  padding: 8px 12px;
}

.aniba-check {
  align-items: start;
  display: flex !important;
  gap: 10px;
}

.aniba-check input {
  flex: 0 0 auto;
  margin-top: 5px;
  min-height: auto;
  width: auto;
}

.aniba-hp {
  inset-inline-start: -9999px;
  position: absolute;
}

.aniba-member-notice {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 14px;
  color: #dff6ff;
  margin-bottom: 18px;
  padding: 12px 14px;
  text-align: start;
}

.aniba-member-notice.is-error {
  background: rgba(251, 113, 133, 0.1);
  border-color: rgba(251, 113, 133, 0.32);
  color: #fecdd3;
}

.aniba-resend {
  border-top: 1px solid var(--aniba-line);
  margin-top: 20px;
  padding-top: 18px;
}

.aniba-resend summary {
  color: var(--aniba-blue);
  cursor: pointer;
  font-weight: 850;
}

.aniba-resend-form {
  margin-top: 14px;
}

.aniba-avatar {
  align-items: center;
  background: linear-gradient(135deg, hsl(var(--hue), 80%, 42%), #38bdf8);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(56, 189, 248, 0.12);
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 24px;
  font-weight: 950;
  height: 64px;
  justify-content: center;
  width: 64px;
}

.aniba-profile-identity {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: start;
}

.aniba-profile-identity strong,
.aniba-profile-identity span {
  overflow-wrap: anywhere;
}

.aniba-profile-identity strong {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.aniba-profile-identity span {
  color: var(--aniba-muted);
  font-size: 14px;
  opacity: 0.75;
}

.aniba-profile-identity em {
  background: rgba(16, 212, 154, 0.11);
  border: 1px solid rgba(16, 212, 154, 0.24);
  border-radius: 999px;
  color: #a7f3d0;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  justify-self: start;
  padding: 4px 9px;
}

.aniba-profile-form {
  gap: 0;
  margin-top: 0;
  max-width: none;
  width: 100%;
}

.aniba-profile-form label,
.aniba-profile-form input,
.aniba-profile-form select {
  max-width: none;
}

.profile-card .form-group {
  margin-bottom: 18px;
}

.profile-card .aniba-member-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.profile-card .aniba-member-form label span {
  display: block;
  margin-bottom: 8px;
}

.profile-card .aniba-member-form input,
.profile-card .aniba-member-form select {
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.3;
  min-height: 44px;
  padding: 10px 14px;
  width: 100%;
}

.profile-card .aniba-profile-form .aniba-btn {
  min-height: 44px;
  width: 100%;
}

.aniba-profile-actions {
  display: grid;
  gap: 10px;
}

.profile-security-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aniba-profile-actions .aniba-btn {
  min-height: 44px;
  min-width: 0;
  width: 100%;
}

.aniba-danger-zone {
  border-top: 1px solid rgba(251, 113, 133, 0.2);
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  text-align: start;
}

.aniba-danger-zone strong {
  color: #fda4af;
  font-size: 14px;
}

.aniba-danger-zone p {
  color: var(--aniba-muted);
  margin: 0;
  max-width: 360px;
}

.aniba-danger-zone .aniba-btn {
  justify-self: start;
  min-height: 38px;
  min-width: 0;
  padding: 7px 12px;
  width: auto;
}

.saved-articles-section {
  margin-top: 24px;
}

.aniba-saved-grid {
  display: grid;
  gap: 14px;
}

.aniba-saved-grid.is-empty::before {
  color: var(--aniba-muted);
  content: "";
}

.aniba-saved-card {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--aniba-line);
  border-radius: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: 150px minmax(0, 1fr);
  overflow: hidden;
  padding: 12px;
}

.aniba-saved-card__media {
  background: rgba(56, 189, 248, 0.08);
  border-radius: 10px;
  min-height: 96px;
  overflow: hidden;
}

.aniba-saved-card__media img,
.aniba-saved-card__media span {
  aspect-ratio: 16 / 10;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.aniba-saved-card__body {
  align-content: start;
  display: grid;
  gap: 7px;
  min-width: 0;
  text-align: start;
}

.aniba-saved-card h3 {
  font-size: 17px;
  line-height: 1.22;
}

.aniba-saved-card a {
  color: var(--aniba-text);
  text-decoration: none;
}

.aniba-saved-card a:hover {
  color: var(--aniba-blue);
}

.aniba-saved-card span,
.aniba-saved-card time {
  color: var(--aniba-muted);
  font-size: 13px;
}

.aniba-saved-card span {
  color: var(--aniba-green);
  font-weight: 900;
  text-transform: uppercase;
}

.aniba-empty-state {
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  border: 1px dashed rgba(56, 189, 248, 0.24);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 190px;
  padding: clamp(22px, 5vw, 34px);
  text-align: center;
}

.aniba-empty-icon {
  align-items: center;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 999px;
  color: var(--aniba-blue);
  display: inline-flex;
  font-size: 28px;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.aniba-empty-state h3 {
  font-size: 20px;
}

.aniba-empty-state p {
  color: var(--aniba-muted);
  margin: 0;
  max-width: 360px;
}

.aniba-delete-form {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .profile-container {
    padding-block: 32px 52px;
  }

  .profile-settings-grid {
    grid-template-columns: 1fr;
  }

  .profile-summary {
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .aniba-member-shell {
    gap: 18px;
    padding: 22px 14px;
  }

  .aniba-member-brand img {
    width: 220px;
  }

  .aniba-member-card {
    border-radius: 18px;
    padding: 18px;
  }

  .aniba-auth-head h1,
  .aniba-profile-title h1 {
    font-size: 34px;
  }

  .profile-container {
    width: min(100% - 28px, 980px);
  }

  .aniba-avatar {
    font-size: 21px;
    height: 56px;
    width: 56px;
  }

  .aniba-profile-identity strong {
    font-size: 16px;
  }

  .aniba-saved-card {
    grid-template-columns: 1fr;
  }

  .profile-summary,
  .aniba-panel {
    padding: 18px;
  }

  .profile-security-actions {
    grid-template-columns: 1fr;
  }
}
