/* Page background - black space theme */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', sans-serif;
  min-height: 100vh;
  background: #000000;
  background-image:
    radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(2px 2px at 60% 70%, white, transparent),
    radial-gradient(1px 1px at 50% 50%, white, transparent),
    radial-gradient(1px 1px at 80% 10%, white, transparent),
    radial-gradient(2px 2px at 90% 60%, white, transparent),
    radial-gradient(1px 1px at 33% 80%, white, transparent),
    radial-gradient(1px 1px at 75% 40%, white, transparent);
  background-size: 200% 200%;
  background-position: 0% 0%;
  animation: stars-drift 120s ease-in-out infinite;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

@keyframes stars-drift {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

/* Stars container */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Individual star styles */
.star {
  position: absolute;
  color: rgba(255, 255, 255, 0.8);
  font-size: 28px;
  font-weight: 200;
  animation: rotate 8s linear infinite;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Rotation animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Position each star uniquely across the space */
.star-1 { top: 5%; left: 8%; animation-duration: 10s; }
.star-2 { top: 15%; right: 12%; animation-duration: 12s; animation-direction: reverse; }
.star-3 { top: 25%; left: 85%; animation-duration: 9s; }
.star-4 { top: 40%; left: 5%; animation-duration: 11s; animation-direction: reverse; }
.star-5 { top: 55%; right: 90%; animation-duration: 13s; }
.star-6 { top: 70%; left: 15%; animation-duration: 8s; animation-direction: reverse; }
.star-7 { top: 80%; right: 20%; animation-duration: 14s; }
.star-8 { top: 35%; right: 85%; animation-duration: 10s; animation-direction: reverse; }
.star-9 { top: 60%; left: 50%; animation-duration: 9s; }
.star-10 { top: 10%; left: 45%; animation-duration: 11s; animation-direction: reverse; }
.star-11 { top: 12%; left: 30%; animation-duration: 15s; }
.star-12 { top: 45%; right: 15%; animation-duration: 9s; animation-direction: reverse; }
.star-13 { top: 75%; left: 60%; animation-duration: 13s; }
.star-14 { top: 22%; left: 70%; animation-duration: 10s; animation-direction: reverse; }
.star-15 { top: 88%; right: 45%; animation-duration: 12s; }
.star-16 { top: 50%; left: 25%; animation-duration: 14s; animation-direction: reverse; }
.star-17 { top: 65%; right: 70%; animation-duration: 11s; }
.star-18 { top: 8%; right: 35%; animation-duration: 16s; animation-direction: reverse; }
.star-19 { top: 92%; left: 80%; animation-duration: 10s; }
.star-20 { top: 30%; left: 92%; animation-duration: 13s; animation-direction: reverse; }

/* Two equal halves; page width 90% (5% margins both sides) */
.page {
  width: 90%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr; /* halves */
  gap: 0;                         /* clean split */
  align-items: center;             /* vertical align of inner content */
  position: relative;
  z-index: 1;
}

/* ---- LEFT HALF (branding) ---- */
.left-half {
  display: flex;
  justify-content: flex-start;  /* align to the left */
  padding-left: 5%;             /* add some padding from the edge */
}

.branding {
  width: 60%;               /* increased from 40% for bigger text */
  min-width: 400px;         /* increased for larger text */
}

.branding h1 {
  font-size: 160px;         /* increased from 120px */
  font-weight: 600;
  color: #ffffff;           /* white text on black background */
  margin: 0;
  letter-spacing: -4px;     /* adjusted for larger size */
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}

/* ---- RIGHT HALF (auth card) ---- */
.right-half {
  display: flex;
  justify-content: center;   /* center the card within its half */
}

/* Single white outline that contains both Login + Signup */
.auth-card {
  width: 40%;                /* use ~40% of the right half */
  min-width: 680px;          /* so both panes have room */
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr; /* login | divider | signup */
  column-gap: 28px;
}

/* Single auth card (for login-only or signup-only pages) */
.auth-card-single {
  width: 35%;
  min-width: 360px;
  max-width: 420px;
  grid-template-columns: 1fr;
  column-gap: 0;
}

/* Gray vertical divider between panes */
.v-divider {
  width: 1px;
  background: #d8d8d8;
}

/* Panes (login & signup) share look */
.pane h2 {
  margin: 0 0 18px 0;
  text-align: center;
}

.form-group {
  margin-bottom: 14px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .half {
  flex: 1 1 0;
  min-width: 0; /* prevent overflow when space gets tight */
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
  font-weight: 600;
}

input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.98rem;
}

button {
  width: 100%;
  padding: 12px;
  background: #1a73e8;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 6px;
}

button:hover {
  background: #155ab6;
}

.error {
  color: #c0392b;
  margin-top: 10px;
  font-size: 0.92rem;
}

.success {
  color: #1b7e2d;
  margin-top: 10px;
  font-size: 0.92rem;
}

/* Divider with text (e.g., "or") */
.divider-with-text {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #666;
  font-size: 0.9rem;
}

.divider-with-text::before,
.divider-with-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #ddd;
}

.divider-with-text span {
  padding: 0 12px;
}

/* Google Sign-In button */
.google-signin-btn {
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  color: #3c4043;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.google-signin-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-signin-btn svg {
  flex-shrink: 0;
}

/* Auth link (for Sign up / Log in links) */
.auth-link {
  margin-top: 16px;
  text-align: center;
  font-size: 0.92rem;
  color: #666;
}

.auth-link a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 600;
}

.auth-link a:hover {
  text-decoration: underline;
}

/* ---- Responsiveness ---- */
@media (max-width: 1200px) {
  .branding { width: 55%; }
  .auth-card { width: 55%; min-width: 620px; }
}

@media (max-width: 980px) {
  .page {
    grid-template-columns: 1fr;    /* stack halves */
    row-gap: 28px;
  }
  .branding { width: 80%; min-width: 0; }
  .auth-card {
    width: 90%;
    min-width: 0;
    grid-template-columns: 1fr;    /* stack panes */
    row-gap: 20px;
  }
  .v-divider { display: none; }
}
