.auth-page,
.account-page {
  display: grid;
  place-items: center;
  min-height: min(720px, calc(100vh - 190px));
  padding: 48px 18px 72px;
  background:
    radial-gradient(ellipse at 50% 0, rgba(255, 143, 143, 0.09), transparent 48%),
    #000;
}

.account-page {
  display: block;
  min-height: calc(100vh - 160px);
  padding: 34px 20px 72px;
  background:
    radial-gradient(ellipse at 72% 0, rgba(255, 143, 143, 0.07), transparent 42%),
    #000;
}

.auth-card,
.account-card {
  width: min(100%, 460px);
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid #292929;
  border-radius: 12px;
  background: linear-gradient(145deg, #141414, #090909);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
}

.auth-logo {
  display: block;
  width: min(200px, 68%);
  height: 72px;
  object-fit: contain;
  object-position: left center;
  margin: 0 auto 16px 0;
}

.auth-eyebrow {
  margin: 0 0 8px;
  color: #ff9b9b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-card h1,
.account-card h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(25px, 5vw, 32px);
  line-height: 1.2;
}

.auth-description {
  margin: 10px 0 24px;
  color: #aaa;
  font-size: 14px;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  margin-top: 8px;
  color: #e8e8e8;
  font-size: 13px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #373737;
  border-radius: 6px;
  outline: none;
  background: #0b0b0b;
  color: #fff;
  font: inherit;
}

.auth-form input:focus {
  border-color: #ff8f8f;
  box-shadow: 0 0 0 3px rgba(255, 143, 143, 0.12);
}

.auth-form input::placeholder {
  color: #777;
}

.auth-help {
  margin-top: -6px;
  color: #888;
  font-size: 12px;
}

.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px !important;
  color: #bdbdbd !important;
  font-weight: 500 !important;
  line-height: 1.45;
}

.auth-checkbox input {
  flex: 0 0 17px;
  width: 17px;
  min-height: 17px;
  height: 17px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: #ff8f8f;
}

.auth-submit {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  margin-top: 14px;
  padding: 11px 18px;
  border: 1px solid #ff8f8f;
  border-radius: 6px;
  background: #ff8f8f;
  color: #151010;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.auth-submit:hover {
  background: #ffc1c1;
  transform: translateY(-1px);
}

.auth-message {
  margin: 0 0 18px;
  padding: 11px 13px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 13px;
}

.auth-message-error {
  border-color: rgba(255, 143, 143, 0.45);
  background: rgba(255, 143, 143, 0.08);
  color: #ffc1c1;
}

.auth-switch,
.auth-legal {
  margin: 20px 0 0;
  color: #a5a5a5;
  font-size: 13px;
  text-align: center;
}

.auth-switch a {
  color: #ffc1c1;
  font-weight: 700;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-legal {
  margin-top: 12px;
  color: #777;
  font-size: 12px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  width: min(440px, calc(100% - 28px));
  max-width: none;
  max-height: min(90dvh, 680px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #383236;
  border-radius: 14px;
  background: #101010;
  color: #fff;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.75);
}

.auth-modal::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
}

.auth-modal-content {
  position: relative;
  padding: 24px;
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 13px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #393538;
  border-radius: 50%;
  background: #191719;
  color: #c5c0c4;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.auth-modal-close:hover {
  border-color: #ff8f8f;
  color: #fff;
}

.auth-modal-logo {
  display: block;
  width: 148px;
  height: 42px;
  margin: 0 0 16px;
  object-fit: contain;
  object-position: left center;
}

.auth-modal-panel h2 {
  margin: 0;
  color: #fff;
  font-size: 25px;
  line-height: 1.2;
}

.auth-modal-description {
  margin: 6px 0 16px;
  color: #aaa;
  font-size: 13px;
}

.auth-modal .auth-message {
  margin-bottom: 12px;
}

.auth-modal-form {
  gap: 7px;
}

.auth-modal-form label {
  margin-top: 5px;
  font-size: 12px;
}

.auth-modal-form input:not([type="checkbox"]) {
  min-height: 42px;
  padding: 9px 11px;
  font-size: 14px;
}

.auth-modal-form .auth-submit {
  min-height: 43px;
  margin-top: 8px;
}

.auth-modal .auth-switch {
  margin-top: 14px;
  font-size: 12px;
}

.auth-switch button {
  padding: 0;
  border: 0;
  background: none;
  color: #ffc1c1;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-switch button:hover {
  text-decoration: underline;
}

.auth-register-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}

.auth-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.auth-field .auth-help {
  margin-top: -3px;
  line-height: 1.35;
}

.auth-modal-form .auth-checkbox {
  margin-top: 7px !important;
}

.auth-modal-form .auth-checkbox input {
  width: 17px;
  min-height: 17px;
  height: 17px;
}

.auth-modal :focus-visible {
  outline: 2px solid #ff8f8f;
  outline-offset: 3px;
}

@media (max-width: 420px) {
  .auth-modal-content {
    padding: 20px;
  }

  .auth-register-fields {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.account-card {
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-color: #272326;
  border-radius: 14px;
  background: linear-gradient(145deg, #121112, #0b0b0b);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
}

.account-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  width: min(100%, 1120px);
  margin: 0 auto;
}

.account-sidebar {
  position: sticky;
  top: 102px;
  display: grid;
  gap: 20px;
  padding: 18px 14px;
  border: 1px solid #272326;
  border-radius: 14px;
  background: #101010;
}

.account-sidebar-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 3px 4px 16px;
  border-bottom: 1px solid #292629;
  color: #fff;
  text-decoration: none;
}

.account-sidebar-identity img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid #3b3438;
  border-radius: 50%;
  background: #1b1719;
}

.account-sidebar-identity span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.account-sidebar-identity strong,
.account-sidebar-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-sidebar-identity strong {
  font-size: 13px;
}

.account-sidebar-identity small {
  color: #929092;
  font-size: 12px;
}

.account-nav {
  display: grid;
  gap: 5px;
}

.account-nav a,
.account-back-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #bdb9bc;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.account-nav a:hover,
.account-nav a:focus-visible,
.account-back-link:hover,
.account-back-link:focus-visible {
  border-color: rgba(255, 143, 143, 0.16);
  background: rgba(255, 143, 143, 0.08);
  color: #ffc1c1;
}

.account-back-link {
  min-height: 38px;
  border-top: 1px solid #292629;
  border-radius: 0;
  color: #8f8b8e;
}

.account-nav a:focus-visible,
.account-back-link:focus-visible,
.account-sidebar-identity:focus-visible,
.account-overview-meta a:focus-visible,
.account-logout:focus-visible {
  outline: 2px solid #ff8f8f;
  outline-offset: 3px;
}

.account-content {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.account-page .account-card {
  margin: 0;
}

.account-page .account-card[id] {
  scroll-margin-top: 110px;
}

.account-overview {
  position: relative;
  min-height: 225px;
  padding: 0 28px 18px;
}

.account-cover {
  height: 93px;
  margin: 0 -28px;
  background:
    radial-gradient(ellipse at 82% 12%, rgba(255, 193, 193, 0.25), transparent 42%),
    linear-gradient(115deg, #2a171c 0%, #201416 48%, #171315 100%);
}

.account-content > .auth-message {
  margin: 0;
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: -38px;
}

.account-identity > img {
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  padding: 4px;
  border: 3px solid #121112;
  border-radius: 50%;
  background: #1a1719;
}

.account-identity > div {
  min-width: 0;
  padding-top: 23px;
}

.account-identity .auth-eyebrow {
  margin-bottom: 4px;
  font-size: 10px;
}

.account-identity h1 {
  overflow-wrap: anywhere;
  font-size: clamp(23px, 4vw, 29px);
}

.account-username {
  margin: 3px 0 0;
  color: #aaa1a5;
  font-size: 13px;
}

.account-overview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 0 99px;
  padding-top: 13px;
  border-top: 1px solid #292629;
  color: #8e898d;
  font-size: 12px;
}

.account-overview-meta a {
  color: #ffc1c1;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.account-overview-meta a:hover {
  color: #fff;
}

.account-overview-meta a span {
  margin-left: 4px;
}

.account-panel {
  padding: 24px 26px;
}

.account-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.account-panel-kicker {
  margin: 0 0 3px;
  color: #b78188;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-panel-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #332a2d;
  border-radius: 10px;
  color: #9e7f84;
  font-size: 11px;
  font-weight: 750;
}

.account-page .account-section-title {
  font-size: 18px;
}

.account-details {
  display: grid;
  gap: 0;
  margin: 8px 0 18px;
}

.account-details > div {
  display: grid;
  grid-template-columns: minmax(130px, 0.65fr) 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #252525;
}

.account-details > div:first-child {
  border-top: 1px solid #252525;
}
.account-details dt {
  color: #888;
  font-size: 13px;
}

.account-details dd {
  margin: 0;
  color: #eee;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.account-settings {
  display: grid;
  gap: 18px;
  padding-top: 22px;
}

.account-section-title {
  margin: 0;
  color: #f4f1f4;
  font-size: 15px;
  font-weight: 750;
}

.account-edit-form {
  gap: 8px;
}

.account-edit-row {
  display: flex;
  align-items: stretch;
  gap: 9px;
}

.account-edit-row > input,
.account-username-input {
  flex: 1;
  min-width: 0;
}

.account-username-input {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 46px;
  padding-left: 13px;
  border: 1px solid #373737;
  border-radius: 6px;
  background: #0b0b0b;
  color: #888;
}

.account-username-input:focus-within {
  border-color: #ff8f8f;
  box-shadow: 0 0 0 3px rgba(255, 143, 143, 0.12);
}

.account-username-input input {
  min-height: 42px;
  padding-left: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.account-username-input input:focus {
  border: 0;
  box-shadow: none;
}

.account-save-button {
  min-width: 84px;
  padding: 0 14px;
  border: 1px solid #373737;
  border-radius: 6px;
  background: #1a1a1a;
  color: #eee;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.account-save-button:hover:not(:disabled) {
  border-color: #ff8f8f;
  background: #241919;
}

.account-save-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.account-tool {
  margin-top: 24px;
  border: 1px solid #292929;
  border-radius: 8px;
  background: #080808;
}

.account-tool > summary {
  padding: 14px 16px;
  color: #f1eeee;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.account-tool[open] > summary {
  border-bottom: 1px solid #252525;
}

.account-tool-content {
  padding: 16px;
}

.account-tool-note {
  margin: 0 0 16px;
  color: #999;
  font-size: 12px;
  line-height: 1.6;
}

.dmca-form {
  gap: 8px;
}

.dmca-form label:not(.auth-checkbox) {
  margin-top: 4px;
  color: #e8e8e8;
  font-size: 12px;
  font-weight: 700;
}

.dmca-form textarea {
  width: 100%;
  min-height: 88px;
  padding: 11px 13px;
  border: 1px solid #373737;
  border-radius: 6px;
  outline: none;
  background: #0b0b0b;
  color: #fff;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}

.dmca-form textarea:focus {
  border-color: #ff8f8f;
  box-shadow: 0 0 0 3px rgba(255, 143, 143, 0.12);
}

.dmca-form .auth-checkbox {
  margin-top: 8px !important;
}

.account-requests {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.account-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #252525;
  border-radius: 7px;
  background: #080808;
}

.account-request > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.account-request a {
  overflow: hidden;
  color: #e6b0b0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-request time {
  color: #888;
  font-size: 11px;
}

.request-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(255, 193, 193, 0.22);
  border-radius: 99px;
  color: #ffc1c1;
  font-size: 10px;
  text-transform: capitalize;
}

.auth-message-success {
  border-color: rgba(132, 218, 164, 0.35);
  background: rgba(80, 180, 110, 0.08);
  color: #a8e6bb;
}

.account-logout {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #393235;
  border-radius: 8px;
  background: #131112;
  color: #d6cdd0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.account-logout:hover {
  border-color: rgba(255, 143, 143, 0.45);
  background: rgba(255, 143, 143, 0.08);
  color: #ffc1c1;
}

.account-logout-form {
  justify-self: end;
}

@media (max-width: 760px) {
  .account-page {
    padding: 22px 14px 48px;
  }

  .account-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .account-sidebar {
    position: static;
    gap: 10px;
    padding: 11px;
  }

  .account-sidebar-identity {
    display: none;
  }

  .account-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .account-nav a {
    min-height: 38px;
    flex: 0 0 auto;
    padding-inline: 11px;
    white-space: nowrap;
  }

  .account-back-link {
    min-height: 30px;
    padding: 5px 7px 0;
    border-top: 0;
  }
}

@media (max-width: 480px) {
  .account-page {
    padding: 26px 12px 48px;
  }

  .account-overview {
    min-height: auto;
    padding: 0 17px 15px;
  }

  .account-cover {
    height: 76px;
    margin-inline: -17px;
  }

  .account-identity {
    gap: 11px;
    margin-top: -31px;
  }

  .account-identity > img {
    width: 68px;
    height: 68px;
  }

  .account-identity > div {
    padding-top: 17px;
  }

  .account-identity h1 {
    font-size: 22px;
  }

  .account-overview-meta {
    align-items: flex-start;
    margin-left: 0;
    font-size: 11px;
  }

  .account-panel {
    padding: 19px 17px;
  }

  .account-edit-row {
    flex-wrap: wrap;
  }

  .account-edit-row > input,
  .account-edit-row > .account-username-input {
    flex-basis: 100%;
  }

  .account-save-button {
    min-height: 40px;
    margin-left: auto;
  }

  .account-page {
    min-height: auto;
  }

  .account-details > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
