/* ─── Animations ────────────────────────────────────────────── */
@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 0 15px rgba(220,20,60,0.6); }
  50%       { box-shadow: 0 0 30px rgba(220,20,60,0.8); }
}

/* ─── Auth Page Layout ─────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 40px 20px;
  position: relative;
}

/* ─── Card ─────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 3rem 2rem;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 4px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 40px rgba(0,0,0,1);
  text-align: center;
}

/* ─── Header (icon + title) ─────────────────────────────────── */
.auth-header {
  margin-bottom: 2rem;
}
.auth-header i {
  font-size: 3rem;
  color: var(--gold-primary);
  display: block;
  margin-bottom: 1rem;
}
.auth-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 0;
}

/* ─── Tabs ─────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid #333;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #888;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  transition: color 0.3s, border-color 0.3s;
  margin-bottom: -1px;
  user-select: none;
}

.auth-tab:hover { color: #fff; }

.auth-tab.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
}

/* ─── Forms ────────────────────────────────────────────────── */
.auth-form { display: none; text-align: left; }
.auth-form.active { display: block; }

/* Override global form-group/label/input to match pirata-site */
.auth-form .form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}
.auth-form .form-label {
  display: block;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.auth-form .form-input {
  width: 100%;
  padding: 1rem;
  background: #000;
  border: 1px solid #222;
  color: #fff;
  border-radius: 2px;
  transition: border-color 0.3s;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 500;
}
.auth-form .form-input:focus {
  outline: none;
  border-color: var(--red-bright);
}

.pwd-wrap {
  position: relative;
}
.pwd-wrap .form-input {
  padding-right: 42px;
}
.pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  font-size: 14px;
  transition: color 0.2s;
}
.pwd-toggle:hover { color: #fff; }

.forgot-link {
  text-align: right;
  margin-bottom: 16px;
}
.forgot-link a {
  font-size: 0.8rem;
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}
.forgot-link a:hover { color: #fff; }

/* ─── Submit button ─────────────────────────────────────────── */
.auth-form .btn-gold {
  background: linear-gradient(45deg, #8B0000, #ff0000);
  color: #fff;
  border: 1px solid #ff4d4d;
  border-radius: 4px;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
  animation: pulse-btn 2.5s infinite;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.auth-form .btn-gold::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  transition: 0.5s;
}
.auth-form .btn-gold:hover:not(:disabled)::before { left: 150%; }
.auth-form .btn-gold:hover:not(:disabled) {
  transform: scale(1.03) translateY(-2px);
  box-shadow: 0 0 30px rgba(255,0,0,0.8);
}
.auth-form .btn-gold:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  animation: none;
  filter: grayscale(100%);
  pointer-events: none;
}

/* ─── Divider ───────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #222;
}
.auth-divider span {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ─── Switch / inline links ─────────────────────────────────── */
.auth-switch-text {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}
.auth-switch-text a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-switch-text a:hover { color: #fff; }

/* ─── Back link ─────────────────────────────────────────────── */
.auth-back {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}
.auth-back a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-back a:hover { color: #fff; }

/* ─── Strength indicator ──────────────────────────────────── */
.pwd-strength {
  margin-top: 6px;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.pwd-strength-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease, background 0.3s ease;
  width: 0;
}

/* ─── Submit button loading state ───────────────────────────── */
.btn-loading {
  pointer-events: none;
  opacity: 0.7;
}
.btn-loading::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 2rem 1.2rem; }
}
