/* =========================================================
   AUTH PAGES — Log In & Sign Up
   Glass-morphism dark palette + full-screen hero
   ========================================================= */

/* ---------- Global palette (mirrors style.css) ---------- */
:root {
  /* Inherit main vars from style.css, define specific auth states */
  --success: #66bb6a;
  --error: #e57373;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-900);
  color: var(--text-100);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
  "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}

/* =========================================================
   HERO — full-viewport, fixed background
   (re-uses .about-hero so header stays intact)
   ========================================================= */
.about-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("../img/hero3.jpg") center/cover fixed no-repeat;
  overflow: hidden;
}

.about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 0;
}

.about-hero > * {
  position: relative;
  z-index: 1;
}

/* =========================================================
   GENERIC GLASS CARD
   ========================================================= */
.glass-card {
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: var(--glass-bg);
  background-image: var(--glass-highlight);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  padding: 2.5rem 2.5rem;
  box-shadow: var(--glass-shadow);
}

/* =========================================================
   AUTH CARD
   ========================================================= */
.hero-card {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-card h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
}

.hero-card p {
  margin: 0;
  font-size: 1rem;
  text-align: center;
  color: var(--text-300);
}

.hero-card hr {
  margin: 1.25rem 0;
  border: 0;
  border-top: 1px solid var(--glass-border);
}

/* =========================================================
   FORM ELEMENTS
   ========================================================= */
.hero-card form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-card input {
  padding: 1rem 1.2rem;
  border: 1px solid var(--glass-border);
  border-radius: .75rem;
  background: rgba(0, 0, 0, 0.2); /* Darker for better input contrast */
  color: var(--text-100);
  font-size: 1rem;
  transition: all .25s ease;
}

.hero-card input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.hero-card input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 0 2px rgba(89, 220, 225, 0.2);
}

/* ---------- NEW: success / error borders ---------- */
input.available {
  border-color: var(--success);
  box-shadow: 0 0 0 1px var(--success);
}

input.taken {
  border-color: var(--error);
  box-shadow: 0 0 0 1px var(--error);
}

/* =========================================================
   BASE BUTTONS
   ========================================================= */

.hero-card input[type="text"],
.hero-card input[type="email"],
.hero-card input[type="password"]{
  display: block;
  width: 100%; /* Fix width */
  box-sizing: border-box;
}

.btn-primary, .btn-secondary {
  display: block;
  padding: 1rem 1.5rem;
  font-weight: 700;
  border-radius: .75rem;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: #000;
  box-shadow: 0 4px 12px rgba(89, 220, 225, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(89, 220, 225, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-100);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* =========================================================
   SOCIAL BUTTONS
   ========================================================= */
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: .75rem;
  text-decoration: none;
  transition: transform 0.2s;
}

.btn-social:hover {
  transform: translateY(-2px);
}

.btn-icon {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
  filter: none; /* Reset global icon filter for brand colors */
}

/* Google */
.btn-google {
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Facebook */
.btn-facebook {
  background: #1877f2;
  color: #ffffff;
  border: 1px solid transparent;
}

.btn-facebook:hover {
  background: #166fe0;
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
}

/* =========================================================
   LINKS INSIDE CARD
   ========================================================= */
.hero-card a:not(.btn-social):not(.btn-primary):not(.btn-secondary) {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: text-shadow 0.2s;
}

.hero-card a:not(.btn-social):not(.btn-primary):not(.btn-secondary):hover {
  text-decoration: none;
  text-shadow: 0 0 8px rgba(89, 220, 225, 0.5);
}

/* =========================================================
   SMALL-SCREEN TWEAKS
   ========================================================= */
@media (max-width: 600px) {
  .hero-card {
    padding: 1.75rem 1.25rem;
  }

  .hero-card h1 {
    font-size: 1.75rem;
  }

  .hero-card input {
    font-size: .95rem;
  }
}

/* =========================================================
   USERNAME FEEDBACK LINE
   ========================================================= */
.username-feedback {
  font-size: .85rem;
  margin-top: -0.35rem;
  margin-bottom: 0.25rem;
  min-height: 1.2rem; /* keeps layout from shifting */
  color: var(--text-300);
  transition: color .25s ease;
}

input.available + .username-feedback {
  color: var(--success);
}

input.taken + .username-feedback {
  color: var(--error);
}

/* =========================================================
   USER DASHBOARD
   ========================================================= */
.user-dashboard-card {
  align-items: flex-start;
  gap: 1.5rem;
}

.user-dashboard-card p {
  color: var(--text-300);
  text-align: left;
}

.user-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.user-dashboard-actions .btn-primary,
.user-dashboard-actions .btn-secondary {
  min-width: 140px;
}

@media (max-width: 600px) {
  .user-dashboard-actions {
    flex-direction: column;
    width: 100%;
  }

  .user-dashboard-actions .btn-primary,
  .user-dashboard-actions .btn-secondary {
    width: 100%;
  }
}

/* =========================================================
   SCROLLBAR THEMING
   ========================================================= */
::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 3px;
}

::-webkit-scrollbar-track {
  background: transparent;
}
