/* =====================================================
   STAR ACADEMY — Shared Base Styles
   ===================================================== */

:root {
  --gold: #FFD700;
  --gold-dark: #e6c000;
  --purple: #6C63FF;
  --purple-dark: #5A52E0;
  --coral: #FF6B6B;
  --teal: #4ECDC4;
  --green: #48BB78;
  --orange: #FF8C42;
  --yellow: #FFC107;
  --danger: #e53e3e;
  --success-bg: #f0fff4;
  --success-border: #9ae6b4;
  --success-text: #276749;
  --error-bg: #fff5f5;
  --error-border: #fc8181;
  --error-text: #c53030;
  --font: 'Nunito', 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: var(--font); line-height: 1.6; }

a { text-decoration: none; color: inherit; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary  { background: var(--purple); color: #fff; }
.btn-primary:hover  { background: var(--purple-dark); }
.btn-secondary { background: #e2e8f0; color: #2d3748; }
.btn-secondary:hover { background: #cbd5e0; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover   { background: #c53030; }
.btn-gold     { background: linear-gradient(135deg, var(--gold), #ffb700); color: #1a1a1a; box-shadow: 0 4px 20px rgba(255,215,0,.4); }
.btn-gold:hover     { background: linear-gradient(135deg, #ffe033, var(--gold)); }
.btn-orange   { background: var(--orange); color: #fff; }
.btn-orange:hover   { background: #e07a38; }
.btn-yellow   { background: var(--yellow); color: #1a1a1a; }
.btn-yellow:hover   { background: #e6ac00; }
.btn-green    { background: var(--green); color: #fff; }
.btn-green:hover    { background: #38a169; }

.btn-full { width: 100%; }
.btn-lg   { padding: 14px 28px; font-size: 1.1rem; border-radius: 16px; }
.btn-sm   { padding: 6px 14px; font-size: 0.875rem; border-radius: 8px; }

/* ---- Alerts ---- */
.alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}
.alert-success { background: var(--success-bg); border: 1.5px solid var(--success-border); color: var(--success-text); }
.alert-error   { background: var(--error-bg);   border: 1.5px solid var(--error-border);   color: var(--error-text); }

/* ---- Flash Toast ---- */
.flash-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1a202c;
  color: #fff;
  padding: 14px 24px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1rem;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  z-index: 999;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}
.flash-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.flash-toast.flash-success { background: #276749; }
.flash-toast.flash-error   { background: #c53030; }

/* ---- Avatars ---- */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.avatar-initials {
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--teal));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
}

/* ---- Utilities ---- */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.p-2  { padding: 16px; }
.text-muted { color: #718096; }

/* =====================================================
   LOGIN PAGE
   ===================================================== */

.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0d0d2b 0%, #1a1a3e 40%, #0f3460 70%, #1a0533 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Star particles background */
.stars-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.star-particle {
  position: absolute;
  animation: twinkle linear infinite;
  user-select: none;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.3); }
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 28px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-star-anim {
  font-size: 3.5rem;
  display: block;
  animation: starBounce 1.5s ease-in-out infinite;
  margin-bottom: 8px;
}
@keyframes starBounce {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%       { transform: translateY(-10px) rotate(5deg); }
}
.login-logo h1 {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
}
.login-subtitle {
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Login form */
.login-form .form-group { margin-bottom: 18px; }
.login-form label {
  display: block;
  color: rgba(255,255,255,0.8);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.login-form input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  outline: none;
  transition: border-color .2s, background .2s;
}
.login-form input::placeholder { color: rgba(255,255,255,0.35); }
.login-form input:focus {
  border-color: var(--gold);
  background: rgba(255,255,255,0.15);
}

.login-form .btn-primary {
  margin-top: 8px;
  background: linear-gradient(135deg, var(--gold), #ffb700);
  color: #1a1a1a;
  font-size: 1.1rem;
  padding: 14px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(255,215,0,.3);
}
.login-form .btn-primary:hover {
  box-shadow: 0 6px 28px rgba(255,215,0,.5);
}
