/* Страницы аккаунта: вход, профиль, политика, 404. Цвета и общие элементы — в base.css */

.account-shell {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 60px;
}

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

.back-link {
  color: var(--muted);
  font-size: 14px;
}

.back-link:hover {
  color: var(--cyan);
}

.account-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 22px;
  align-items: stretch;
}

.account-intro,
.account-panel,
.profile-card,
.favorites-panel,
.doc {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.23);
  backdrop-filter: blur(18px);
}

.account-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 540px;
  padding: 42px;
  background:
    radial-gradient(circle at 90% 10%, rgba(116, 227, 255, 0.17), transparent 15rem),
    radial-gradient(circle at 0% 100%, rgba(255, 121, 173, 0.12), transparent 16rem),
    var(--panel);
}

.account-intro h1 {
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.account-intro h1 span {
  color: var(--cyan);
}

.account-intro p {
  max-width: 390px;
  margin-top: 25px;
  color: var(--muted);
  line-height: 1.7;
}

.not-found {
  align-items: flex-start;
  min-height: 420px;
}

.not-found-button {
  margin-top: 28px;
}

/* ==================== ФОРМА ==================== */

.account-panel {
  align-self: center;
  padding: 34px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 28px;
  border-radius: 14px;
  background: var(--panel-soft);
}

.mode-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
}

.mode-switch button[aria-selected="true"] {
  color: #07101b;
  background: var(--cyan);
  font-weight: 900;
}

.form-title {
  margin-bottom: 8px;
  font-size: 28px;
}

.form-description {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.field {
  margin-bottom: 16px;
}

.field[hidden],
.consent[hidden],
.field-hint[hidden] {
  display: none;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(116, 227, 255, 0.15);
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.consent input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--cyan);
}

.consent a {
  color: var(--cyan);
  text-decoration: underline;
}

.forgot-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--cyan);
  font-size: 13px;
}

.forgot-link[hidden] {
  display: none;
}

/* Восстановление пароля: одна панель по центру */
.reset-layout {
  max-width: 520px;
  margin: 0 auto;
}

.form-message a {
  color: var(--cyan);
  text-decoration: underline;
}

.field textarea {
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  line-height: 1.5;
  resize: vertical;
}

.field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(116, 227, 255, 0.15);
}

.field-hint a {
  color: var(--cyan);
  text-decoration: underline;
}

/* Форма жалобы под текстом страницы «Правообладателям» */
.copyright-panel {
  margin-top: 22px;
}

.turnstile:empty {
  display: none;
}

.turnstile {
  margin-bottom: 12px;
}

.main-button {
  width: 100%;
  min-height: 49px;
  margin-top: 8px;
  border: 0;
  border-radius: 13px;
  color: #07101b;
  background: linear-gradient(135deg, var(--cyan), #c5f6ff);
  font-weight: 900;
  transition: 0.2s ease;
}

.main-button:hover:not(:disabled) {
  box-shadow: 0 0 25px rgba(116, 227, 255, 0.3);
  transform: translateY(-2px);
}

.form-message {
  min-height: 20px;
  margin-top: 15px;
  color: var(--pink);
  font-size: 13px;
  line-height: 1.4;
}

.form-message.success {
  color: var(--green);
}

/* ==================== ПРОФИЛЬ ==================== */

.profile-layout {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 22px;
  align-items: start;
}

.profile-card,
.favorites-panel {
  padding: 30px;
}

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

.avatar {
  display: grid;
  width: 100px;
  height: 100px;
  margin: 0 auto 18px;
  place-items: center;
  border: 2px solid rgba(116, 227, 255, 0.55);
  border-radius: 50%;
  color: #07101b;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  box-shadow: 0 0 35px rgba(116, 227, 255, 0.25);
  font-size: 34px;
  font-weight: 900;
}

.profile-card h1 {
  font-size: 27px;
  word-break: break-word;
}

.profile-email {
  margin: 8px 0 6px;
  color: var(--muted);
  font-size: 13px;
  word-break: break-word;
}

.profile-since {
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 12px;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 24px;
}

.stat {
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-soft);
}

.stat strong {
  display: block;
  color: var(--cyan);
  font-size: 22px;
}

.stat span {
  color: var(--muted);
  font-size: 11px;
}

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

.secondary-button,
.danger-button {
  min-height: 43px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: var(--panel-soft);
}

.secondary-button:hover {
  border-color: var(--cyan);
}

.danger-button {
  color: var(--pink);
}

/* Ссылка «Админка» в профиле выглядит как кнопка */
.admin-link {
  display: grid;
  place-items: center;
}

.admin-link[hidden] {
  display: none;
}

.danger-button:hover {
  border-color: var(--pink);
  background: rgba(255, 121, 173, 0.08);
}

.edit-form {
  margin-top: 20px;
  text-align: left;
}

.edit-form[hidden] {
  display: none;
}

.edit-form h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.favorites-panel h2 {
  margin-bottom: 6px;
  font-size: 29px;
}

.panel-description {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.library-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.library-tabs button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}

.library-tabs button[aria-pressed="true"] {
  border-color: transparent;
  color: var(--bg);
  background: var(--cyan);
  font-weight: 800;
}

.favorite-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.favorite-card {
  position: relative;
  display: flex;
  align-items: end;
  min-height: 170px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--poster, var(--bg-soft));
  transition: 0.2s ease;
}

.favorite-card:hover,
.favorite-card:focus-visible {
  border-color: rgba(116, 227, 255, 0.5);
  transform: translateY(-3px);
}

.favorite-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(4, 7, 18, 0.95), transparent);
}

.favorite-card div {
  position: relative;
  z-index: 1;
}

.favorite-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.favorite-card small {
  color: var(--yellow);
}

.empty-state {
  padding: 45px 20px;
  border: 1px dashed var(--border);
  border-radius: 17px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.empty-state a {
  color: var(--cyan);
  font-weight: 800;
}

/* ==================== ДОКУМЕНТЫ ==================== */

.doc {
  padding: 40px;
  line-height: 1.75;
}

.doc h1 {
  margin-bottom: 8px;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.04em;
}

.doc h2 {
  margin: 28px 0 8px;
  font-size: 21px;
}

.doc p,
.doc li {
  color: var(--muted);
}

.doc ul {
  padding-left: 22px;
}

.doc a {
  color: var(--cyan);
}

.doc-updated {
  margin-bottom: 20px;
  font-size: 13px;
}

@media (max-width: 760px) {
  .account-shell {
    width: min(100% - 22px, 560px);
    padding-top: 18px;
  }

  .account-nav {
    margin-bottom: 30px;
  }

  .account-layout,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .account-intro {
    min-height: auto;
    padding: 30px;
  }

  .account-panel,
  .profile-card,
  .favorites-panel,
  .doc {
    padding: 24px;
  }

  .account-intro h1 {
    font-size: 55px;
  }

  .favorite-list {
    grid-template-columns: 1fr;
  }
}
