:root {
  --bg: #050508;
  --bg-secondary: #0a0a12;
  --surface: #111118;
  --surface-light: #1a1a25;
  --gold: #c9a84c;
  --gold-light: #e8cc6e;
  --gold-dark: #8b6914;
  --gold-ghost: rgba(201, 168, 76, 0.15);
  --text: #e8e6e1;
  --text-muted: #a8a7a5;
  --text-dim: #6b6b70;
  --accent: #c9a84c;
  --danger: #e05555;
  --blue-accent: #4a90d9;
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(17, 17, 24, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== HERO-STYLE ANIMATED BACKGROUND ========== */
.hero-bg-animation {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Vertical floating lines */
.hero-bg-line {
  position: absolute;
  width: 2px;
  height: 140%;
  top: -20%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(212, 168, 83, 0.6) 30%,
    rgba(212, 168, 83, 0.8) 50%,
    rgba(212, 168, 83, 0.6) 70%,
    transparent 100%
  );
  animation: heroLineFloat 5s infinite ease-in-out;
  opacity: 0;
  box-shadow: 0 0 12px rgba(212, 168, 83, 0.4);
}

.hero-bg-line:nth-child(1) { left: 10%; animation-delay: 0s; }
.hero-bg-line:nth-child(2) { left: 30%; animation-delay: -0.8s; }
.hero-bg-line:nth-child(3) { left: 50%; animation-delay: -1.6s; }
.hero-bg-line:nth-child(4) { left: 70%; animation-delay: -2.4s; }
.hero-bg-line:nth-child(5) { left: 90%; animation-delay: -3.2s; }

@keyframes heroLineFloat {
  0% { transform: translateY(100%); opacity: 0; }
  20% { opacity: 0.7; }
  50% { opacity: 0.9; }
  80% { opacity: 0.7; }
  100% { transform: translateY(-100%); opacity: 0; }
}

/* Pulsing circles */
.hero-bg-circle {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.5);
  animation: heroCirclePulse 6s infinite ease-in-out;
  opacity: 0;
  box-shadow: 0 0 25px rgba(201, 168, 76, 0.3), inset 0 0 25px rgba(201, 168, 76, 0.1);
}

.hero-bg-circle:nth-child(6) { 
  width: 400px; height: 400px; 
  top: -150px; left: -100px; 
  animation-delay: 0s; 
}
.hero-bg-circle:nth-child(7) { 
  width: 350px; height: 350px; 
  bottom: -130px; right: -80px; 
  animation-delay: -3s; 
}
.hero-bg-circle:nth-child(8) { 
  width: 250px; height: 250px; 
  top: 60%; left: 75%; 
  animation-delay: -1.5s; 
  border-color: rgba(74, 144, 217, 0.5); 
  box-shadow: 0 0 25px rgba(74, 144, 217, 0.3), inset 0 0 25px rgba(74, 144, 217, 0.1); 
}
.hero-bg-circle:nth-child(9) { 
  width: 300px; height: 300px; 
  top: 15%; right: 65%; 
  animation-delay: -4.5s; 
  border-color: rgba(224, 85, 85, 0.5); 
  box-shadow: 0 0 25px rgba(224, 85, 85, 0.3), inset 0 0 25px rgba(224, 85, 85, 0.1); 
}

@keyframes heroCirclePulse {
  0% { transform: scale(0.6); opacity: 0; }
  30% { opacity: 0.35; }
  50% { opacity: 0.5; }
  70% { opacity: 0.35; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ========== AMBIENT ORBS ========== */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(160px);
  opacity: 0.07;
  animation: orbFloat 22s ease-in-out infinite;
  will-change: transform;
}

.orb-1 { 
  width: 700px; height: 700px; 
  background: radial-gradient(circle, #d4a85330, transparent 70%); 
  top: -20%; left: -15%; 
  animation-delay: 0s; animation-duration: 24s; 
}
.orb-2 { 
  width: 600px; height: 600px; 
  background: radial-gradient(circle, #4a90d925, transparent 70%); 
  bottom: -15%; right: -10%; 
  animation-delay: -8s; animation-duration: 20s; 
}
.orb-3 { 
  width: 500px; height: 500px; 
  background: radial-gradient(circle, #e0555520, transparent 70%); 
  top: 55%; left: 55%; 
  animation-delay: -15s; animation-duration: 28s; 
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(90px, -70px) scale(1.12); }
  50% { transform: translate(-50px, 60px) scale(0.88); }
  75% { transform: translate(-80px, -40px) scale(1.06); }
}

/* ========== GRID PATTERN ========== */
.grid-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.018;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
}

/* ========== LOGIN WRAPPER ========== */
.login-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 440px;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(35px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== LOGO ========== */
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon {
  width: 100px;
  height: 100px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: logoGlow 3s ease-in-out infinite;
  border-radius: 20px;
  overflow: hidden;
}

.logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 20px;
}

@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(201, 168, 76, 0.4)); }
  50% { filter: drop-shadow(0 0 20px rgba(201, 168, 76, 0.7)); }
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, #ffffff 0%, #d4c9a8 40%, #d4a853 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 12px rgba(201, 168, 76, 0.3));
}

/* ========== LOGIN CARD (GLASSMORPHISM) ========== */
.login-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color var(--transition-smooth);
}

.login-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== GOOGLE LOGIN BUTTON ========== */
.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.google-login-btn:hover {
  background: #f8f8f8;
  border-color: #c0c0c0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.google-login-btn:active {
  transform: translateY(0);
}

.google-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.google-btn-text {
  font-family: var(--font-body);
}

/* ========== LOGIN DIVIDER ========== */
.login-divider {
  text-align: center;
  margin: 24px 0;
  position: relative;
}

.login-divider::before,
.login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 80px);
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.login-divider::before {
  left: 0;
}

.login-divider::after {
  right: 0;
}

.login-divider span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 500;
}

/* ========== LOGIN INFO ========== */
.login-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.info-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ========== FOOTER ========== */
.login-footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

/* ========== LOADING OVERLAY ========== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  text-align: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(201, 168, 76, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== ERROR / SUCCESS MESSAGES ========== */
.error-message {
  background: rgba(224, 85, 85, 0.1);
  border: 1px solid rgba(224, 85, 85, 0.3);
  color: #e05555;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  text-align: center;
}

.success-message {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #4caf50;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  text-align: center;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 600px) {
  .login-container {
    max-width: 100%;
  }
  
  .login-card {
    padding: 28px 20px;
  }
  
  .logo-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
  }
  
  .logo-image {
    border-radius: 16px;
  }
  
  .logo-text {
    font-size: 1.5rem;
  }
  
  .login-header h2 {
    font-size: 1.3rem;
  }
}