.is-hidden {
  display: none !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav-link,
.account-trigger,
.ghost-button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: #c7c0cf;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: 160ms ease;
}

.header-nav-link,
.account-trigger {
  padding: 11px 16px;
}

.account-trigger {
  border-color: rgba(183, 147, 255, 0.3);
  background: rgba(139, 92, 246, 0.12);
  color: #e5d9ff;
}

.header-nav-link:hover,
.account-trigger:hover,
.ghost-button:hover {
  border-color: rgba(183, 147, 255, 0.55);
  color: #fff;
}

.header-nav-link.is-active {
  border-color: rgba(183, 147, 255, 0.38);
  background: rgba(139, 92, 246, 0.11);
  color: #f0e9ff;
}

.account-menu {
  position: fixed;
  z-index: 120;
  padding: 12px;
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  border: 1px solid rgba(183, 147, 255, 0.28);
  border-radius: 18px;
  background: rgba(17, 16, 23, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(18px);
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
  transition: opacity 150ms ease, transform 150ms ease;
}

.account-menu.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.account-menu-user {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 13px;
}

.account-menu-user strong,
.account-menu-user small { display: block; }
.account-menu-user strong { font-size: 14px; }
.account-menu-user small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.account-menu-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(183, 147, 255, 0.38);
  border-radius: 13px;
  background: rgba(139, 92, 246, 0.18) center / cover;
  color: #e3d5ff;
  font-weight: 800;
}

.account-menu-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 13px 14px;
  border: 1px solid rgba(101, 230, 169, 0.18);
  border-radius: 12px;
  background: rgba(101, 230, 169, 0.055);
}

.account-menu-balance span { color: var(--muted); font-size: 11px; font-weight: 700; }
.account-menu-balance strong { color: var(--green); font-size: 14px; }
.account-menu-balance strong span { color: inherit; font-size: inherit; }

.account-menu-links { display: grid; gap: 4px; }
.account-menu-links a {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
}
.account-menu-links a:hover,
.account-menu-links a:focus-visible { outline: 0; background: rgba(139, 92, 246, 0.12); }
.account-menu-links a > span:first-child { color: var(--purple-light); text-align: center; }
.account-menu-links strong,
.account-menu-links small { display: block; }
.account-menu-links strong { font-size: 12px; }
.account-menu-links small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.account-menu-links .account-menu-topup { margin-top: 4px; background: linear-gradient(135deg, rgba(134, 89, 237, 0.24), rgba(112, 67, 207, 0.14)); }

.account-menu-logout {
  width: 100%;
  margin-top: 8px;
  padding: 11px;
  border: 1px solid rgba(255, 126, 145, 0.18);
  border-radius: 10px;
  background: rgba(220, 70, 92, 0.06);
  color: #eea5af;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.account-menu-logout:hover { border-color: rgba(255, 126, 145, 0.4); color: #fff; }

.plans-section.compact-section {
  padding-top: 78px;
}

.plans-section,
.account-section {
  padding-top: 110px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.plan-card {
  position: relative;
  display: flex;
  min-height: 360px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  flex-direction: column;
  background: var(--surface);
}

.plan-card.is-featured {
  border-color: rgba(183, 147, 255, 0.38);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.16), transparent 55%), var(--surface);
}

.plan-card.is-current::after {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(101, 230, 169, 0.12);
  color: var(--green);
  content: "Активний";
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.plan-kicker,
.account-label {
  color: var(--purple-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.plan-card h3 {
  margin: 20px 0 4px;
  font-size: 28px;
}

.plan-price {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 12px 0 20px;
}

.plan-price strong {
  font-size: 50px;
  letter-spacing: -0.06em;
}

.plan-price span {
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
}

.plan-card p,
.account-card p,
.form-heading p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.plan-points {
  margin-top: auto;
  color: #cfc6d8;
  font-size: 12px;
}

.plan-action,
.primary-small,
.auth-submit {
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #8659ed, #7043cf);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.auth-secondary,
.auth-link {
  border: 0;
  color: var(--purple-light);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.auth-secondary {
  padding: 12px 14px;
  border: 1px solid rgba(183, 147, 255, 0.25);
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.1);
}

.auth-secondary:disabled { cursor: wait; opacity: .55; }
.auth-link { justify-self: center; padding: 3px; background: transparent; }
.auth-link:hover { color: #fff; }

.reset-heading { display: grid; gap: 5px; }
.reset-heading strong { font-size: 16px; }
.reset-heading span { color: var(--muted); font-size: 12px; line-height: 1.5; }

.plan-action {
  margin-top: 18px;
  padding: 13px 16px;
}

.plan-action:disabled {
  cursor: default;
  background: rgba(255, 255, 255, 0.07);
  color: #77717f;
}

.account-section {
  scroll-margin-top: 20px;
}

.account-summary,
.profile-form,
.account-card {
  border: 1px solid var(--line);
  background: var(--surface);
}

.account-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 28px;
  border-radius: 22px;
}

.account-summary h2 {
  margin: 8px 0 5px;
  font-size: 32px;
}

.account-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-avatar {
  display: grid;
  width: 64px;
  height: 64px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(183, 147, 255, 0.35);
  border-radius: 19px;
  background: rgba(139, 92, 246, 0.16);
  color: #d9c6ff;
  font-size: 24px;
  font-weight: 800;
  background-position: center;
  background-size: cover;
}

.ghost-button {
  padding: 10px 15px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.account-card {
  min-height: 170px;
  padding: 24px;
  border-radius: 18px;
}

.status-badge,
.balance-card strong {
  display: block;
  margin-top: 18px;
  font-size: 28px;
}

.status-badge {
  color: var(--purple-light);
}

.balance-card small {
  color: var(--muted);
  font-size: 12px;
}

.connections-card > div {
  margin-top: 20px;
  color: #d8d1df;
  font-size: 13px;
  line-height: 1.8;
}

.profile-form {
  margin-top: 14px;
  padding: 28px;
  border-radius: 20px;
}

.form-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.form-heading h3 {
  margin: 0;
  font-size: 20px;
}

.form-heading p {
  margin: 7px 0 0;
}

.primary-small {
  padding: 12px 17px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.form-grid label,
.auth-form label {
  display: grid;
  gap: 8px;
  color: #bbb3c4;
  font-size: 11px;
  font-weight: 700;
}

.form-grid input,
.auth-form input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #0d0b12;
  color: #fff;
}

.form-grid input:focus,
.auth-form input:focus {
  border-color: rgba(183, 147, 255, 0.55);
}

.form-grid input:disabled {
  color: #77717f;
}

.form-message {
  min-height: 18px;
  margin: 14px 0 0;
  color: var(--green);
  font-size: 12px;
}

.form-message.is-error {
  color: #ff8c9b;
}

.auth-dialog {
  width: min(480px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 32px;
  overflow-y: auto;
  border: 1px solid rgba(183, 147, 255, 0.25);
  border-radius: 22px;
  background: #111017;
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
}

.auth-dialog::backdrop {
  background: rgba(4, 3, 7, 0.78);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: absolute;
  top: 15px;
  right: 17px;
  border: 0;
  background: transparent;
  color: #8d8596;
  cursor: pointer;
  font-size: 25px;
}

.auth-intro h2 {
  margin: 16px 0 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.auth-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.oauth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}

.oauth-button {
  padding: 13px;
  border-radius: 10px;
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.oauth-button.discord { background: #5865f2; }
.oauth-button.twitch { background: #9146ff; }
.oauth-button.is-disabled { opacity: .42; cursor: not-allowed; filter: grayscale(.35); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  color: #6e6876;
  font-size: 10px;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 11px;
  background: #0c0a10;
}

.auth-tab {
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.auth-tab.is-active {
  background: rgba(139, 92, 246, 0.17);
  color: #e8ddff;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-submit {
  margin-top: 4px;
  padding: 14px;
}

@media (max-width: 920px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
  .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-header { height: auto; min-height: 76px; padding: 14px 0; flex-wrap: wrap; gap: 12px; }
  .header-actions { width: 100%; padding-bottom: 2px; overflow-x: auto; scrollbar-width: none; }
  .header-actions::-webkit-scrollbar { display: none; }
  .header-nav-link { display: inline-flex; flex: 0 0 auto; padding: 9px 11px; white-space: nowrap; }
  .account-trigger { flex: 0 0 auto; padding: 9px 12px; white-space: nowrap; }
  .plans-section,
  .account-section { padding-top: 82px; }
  .plans-grid,
  .form-grid { grid-template-columns: 1fr; }
  .account-summary { grid-template-columns: auto 1fr; }
  .account-summary .ghost-button { grid-column: 1 / -1; }
  .form-heading { flex-direction: column; }
  .primary-small { width: 100%; }
  .auth-dialog { padding: 28px 20px 22px; }
}
