.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 120px);
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.25rem 2rem;
}

.auth-card h1 {
  font-size: 1.55rem;
  margin: 0 0 0.35rem;
  text-align: center;
}

.auth-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.93rem;
  margin: 0 0 1.5rem;
}

/* Google button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 1rem;
  background: #fff;
  color: #1f2937;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: box-shadow 0.15s, border-color 0.15s;
  font-family: var(--font);
}

.btn-google:hover {
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.18);
  border-color: #4285f4;
}

/* Divider */
.auth-divider {
  position: relative;
  text-align: center;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  position: relative;
  background: var(--surface);
  padding: 0 0.65rem;
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.auth-form input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-auth {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent);
  color: #0a0e17;
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.3rem;
  transition: opacity 0.15s;
}

.btn-auth:hover {
  opacity: 0.88;
}

.auth-switch {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 1.1rem 0 0;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-forgot {
  margin: -0.35rem 0 0;
  text-align: right;
  font-size: 0.85rem;
}

.auth-forgot a {
  color: var(--text-muted);
  text-decoration: none;
}

.auth-forgot a:hover {
  color: var(--accent);
}

/* Flash messages */
.flash {
  padding: 0.75rem 1rem;
  border-radius: 9px;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.flash--error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.flash--success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

/* User dashboard */
.user-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.user-hero__title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  margin-bottom: 0.35rem;
}

.user-hero__title-row h1 {
  margin: 0;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.85rem;
  border: 3px solid var(--border);
}

.user-avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #0a0e17;
  font-size: 2rem;
  font-weight: 700;
}

.user-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #c4a574 0%, #e2c08a 100%);
  color: #0a0e17;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.user-plan-badge--free {
  background: rgba(126, 184, 218, 0.16);
  color: var(--accent);
  border: 1px solid rgba(126, 184, 218, 0.35);
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 1rem;
}

.user-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.85);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.user-btn:hover,
.user-btn.is-active {
  border-color: rgba(126, 184, 218, 0.45);
  background: rgba(126, 184, 218, 0.12);
  color: var(--accent);
}

.user-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0e17;
}

.user-btn--primary:hover {
  background: #93c5e4;
  border-color: #93c5e4;
  color: #0a0e17;
}

.user-btn--ghost {
  background: transparent;
}

.user-btn--premium {
  border-color: rgba(196, 165, 116, 0.55);
  color: #e2c08a;
  background: rgba(196, 165, 116, 0.1);
}

.user-btn--premium:hover,
.user-btn--premium.is-active {
  border-color: rgba(196, 165, 116, 0.8);
  background: rgba(196, 165, 116, 0.18);
  color: #f0d7a8;
}

.user-btn--premium-badge {
  border-color: rgba(196, 165, 116, 0.45);
  background: linear-gradient(135deg, rgba(196, 165, 116, 0.25), rgba(226, 192, 138, 0.15));
  color: #e2c08a;
  cursor: default;
}

.user-btn--danger {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.08);
}

.user-btn--danger:hover {
  border-color: rgba(248, 113, 113, 0.7);
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
}

.user-space .user-nav-links {
  margin-top: 1.15rem;
}

.user-area-controls .user-nav-links,
.user-area-controls .user-actions {
  justify-content: flex-start;
}

.user-garage__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.user-garage__head .section-title {
  margin: 0 0 0.35rem;
}

.user-garage__intro {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.user-empty {
  margin-top: 1rem;
  padding: 1.75rem 1.25rem;
  border-radius: 16px;
  border: 1px dashed var(--border);
  background: rgba(17, 24, 39, 0.55);
  text-align: center;
}

.user-empty p {
  margin: 0 0 0.5rem;
}

.user-empty__hint {
  color: var(--text-muted);
  margin-bottom: 1.1rem !important;
}

.user-panel-card {
  max-width: 520px;
  margin: 1.5rem auto 0;
}

.user-events {
  max-width: 720px;
  margin: 1.5rem auto 0;
}

.user-events__head {
  margin-bottom: 1rem;
  text-align: center;
}

.user-events__head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.user-events__head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.user-events__list {
  display: grid;
  gap: 1rem;
}

.user-event-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(196, 165, 116, 0.28);
  background:
    linear-gradient(160deg, rgba(196, 165, 116, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(10, 14, 23, 0.98));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.user-event-card__glow {
  position: absolute;
  inset: auto -20% -40% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 184, 218, 0.22), transparent 68%);
  pointer-events: none;
}

.user-event-card__body {
  position: relative;
  padding: 1.35rem 1.4rem 1.45rem;
}

.user-event-card__eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c4a574;
}

.user-event-card h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.user-event-card__subtitle {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.user-event-card__meta {
  margin: 0.75rem 0 0;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.user-event-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.user-event-card__btn {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.user-event-card__btn:hover {
  transform: translateY(-1px);
}

.user-event-card__btn--primary {
  color: #0a0e17;
  background: linear-gradient(135deg, #c4a574 0%, #e2c08a 100%);
  border: 1px solid transparent;
}

.user-event-card__btn--ghost {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.user-event-card__btn--ghost:hover {
  border-color: rgba(126, 184, 218, 0.45);
  background: rgba(126, 184, 218, 0.12);
}

.user-event-card__btn-label {
  font-weight: 700;
  font-size: 0.95rem;
}

.user-event-card__btn-hint {
  font-size: 0.78rem;
  opacity: 0.78;
  line-height: 1.3;
}

.user-panel-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.35rem 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.user-panel-divider::before,
.user-panel-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.user-premium-card h2 {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
}

.user-premium-list {
  margin: 0 0 1.35rem;
  padding-left: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.user-premium-list li {
  margin-bottom: 0.25rem;
}

.user-premium-active {
  text-align: center;
}

.user-premium-active p {
  margin: 0.85rem 0 1.15rem;
  color: var(--text-muted);
}

.user-btn--premium-submit {
  background: linear-gradient(135deg, #c4a574 0%, #e2c08a 100%) !important;
  color: #0a0e17 !important;
  border: 0 !important;
  width: 100%;
}

body.user-modal-open {
  overflow: hidden;
}

.user-modal.hidden,
.user-modal[hidden] {
  display: none !important;
}

.user-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.user-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 14, 0.72);
}

.user-modal__card {
  position: relative;
  width: min(420px, 100%);
  background: #121a28;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem 1.35rem 1.35rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.user-modal__card h2 {
  margin: 0 2rem 0.45rem 0;
  font-size: 1.2rem;
}

.user-modal__lead {
  margin: 0 0 1.15rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.user-modal__close {
  position: absolute;
  right: 0.75rem;
  top: 0.65rem;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #1a2332;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.user-premium-channels {
  display: grid;
  gap: 0.75rem;
}

.user-premium-channel {
  margin: 0;
}

.user-premium-channel__btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: inherit;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(17, 24, 39, 0.85);
  cursor: pointer;
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
  font: inherit;
}

.user-premium-channel__btn:hover {
  border-color: rgba(196, 165, 116, 0.55);
  background: rgba(26, 35, 50, 0.95);
  transform: translateY(-1px);
}

.user-premium-channel__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(196, 165, 116, 0.14);
  color: #e2c08a;
}

.user-premium-channel__text {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.user-premium-channel__text strong {
  font-size: 1rem;
}

.user-premium-channel__text small {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.section-title {
  font-size: 1.25rem;
  margin: 2rem 0 1.1rem;
}

.exclusive-badge {
  display: inline-block;
  background: linear-gradient(135deg, #7eb8da 0%, #a78bfa 100%);
  color: #0a0e17;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.product-card--exclusive {
  border-color: rgba(167, 139, 250, 0.35);
}

/* Responsive */
@media (max-width: 480px) {
  .auth-wrap {
    padding: 1.25rem 0.85rem;
    min-height: calc(100dvh - 100px);
  }

  .auth-card {
    padding: 1.5rem 1.15rem;
    border-radius: 16px;
  }

  .auth-card h1 {
    font-size: 1.35rem;
  }

  .btn-google {
    font-size: 0.88rem;
    padding: 0.65rem 0.85rem;
  }

  .user-avatar {
    width: 64px;
    height: 64px;
  }

  .user-event-card__actions {
    grid-template-columns: 1fr;
  }

  .user-avatar--initials {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .user-actions {
    width: 100%;
  }

  .user-actions .user-btn {
    flex: 1 1 calc(50% - 0.55rem);
  }

  .user-garage__head {
    align-items: flex-start;
  }
}
