:root {
  --bg-primary: #0a0f1d;
  --bg-card: #151c30;
  --card-border: rgba(12, 217, 244, 0.15);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --cyan-primary: #0cd9f4;
  --gradient-cyan: linear-gradient(135deg, #0cd9f4 0%, #78cbff 100%);
  --accent-pink: #ec4899;
}

body.lightmode {
  --bg-primary: #e9ecfb;
  --bg-card: #ffffff;
  --card-border: rgba(0, 0, 0, 0.08);
  --text-primary: #151d38;
  --text-secondary: #64748b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Background glowing orbs */
.bg-glow-1 {
  position: absolute;
  top: -100px;
  left: -100px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(12, 217, 244, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.bg-glow-2 {
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 35px 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 10;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.auth-logo {
  text-align: center;
  margin-bottom: 20px;
}

.auth-logo img {
  max-height: 46px;
  width: auto;
}

.url-check {
  font-size: 0.85rem;
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.green-url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-family: monospace;
  font-weight: 600;
  width: fit-content;
  margin: 0 auto 20px;
}

.auth-alert {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #fbbf24;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.8rem;
  line-height: 1.5;
  margin-bottom: 22px;
}

.auth-alert strong {
  color: #f59e0b;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: #ffffff;
  color: #374151;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 11px 16px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.google-btn:hover {
  background: #f9fafb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  color: #111827;
}

.google-btn svg {
  width: 20px;
  height: 20px;
}

.divider-text {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 15px 0 20px;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.divider-text::before {
  margin-right: 12px;
}

.divider-text::after {
  margin-left: 12px;
}

.form-group {
  margin-bottom: 18px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.input-wrap {
  position: relative;
}

.input-wrap input,
.input-wrap select {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

body.lightmode .input-wrap input,
body.lightmode .input-wrap select {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.input-wrap input:focus,
.input-wrap select:focus {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 0 3px rgba(12, 217, 244, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.forgot-link {
  display: block;
  text-align: right;
  font-size: 0.85rem;
  color: var(--accent-pink);
  margin-top: 6px;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
  color: #f472b6;
}

/* Dynamic Captcha System */
.captcha-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(12, 217, 244, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.captcha-container.verified {
  border-color: rgba(16, 185, 129, 0.6) !important;
  background: rgba(16, 185, 129, 0.06) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

.captcha-container.shake-error {
  animation: captcha-shake 0.4s ease-in-out;
  border-color: #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
}

@keyframes captcha-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.captcha-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.captcha-instruction-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.captcha-instruction {
  font-size: 0.8rem;
  color: #10b981;
  font-weight: 600;
}

.captcha-target-name {
  color: #ffd700;
  font-weight: 700;
  text-transform: capitalize;
  background: rgba(255, 215, 0, 0.12);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(255, 215, 0, 0.25);
}

.captcha-reload-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 3px 6px;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.captcha-reload-btn:hover {
  color: #0cd9f4;
  transform: rotate(90deg);
}

.captcha-reload-btn.spin-anim {
  transform: rotate(360deg);
  transition: transform 0.4s ease;
}

.captcha-icons-row {
  display: flex;
  gap: 10px;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.captcha-icon-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  -webkit-user-select: none;
  user-select: none;
}

.captcha-icon-btn:hover {
  background: rgba(12, 217, 244, 0.15);
  border-color: rgba(12, 217, 244, 0.5);
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 4px 12px rgba(12, 217, 244, 0.2);
}

.captcha-icon-btn.selected {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.22);
  color: #10b981;
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}

.captcha-icon-btn.selected::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  background: #10b981;
  color: #fff;
  border-radius: 50%;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0f172a;
}

.submit-btn {
  width: 100%;
  padding: 13px;
  background: var(--gradient-cyan);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(12, 217, 244, 0.35);
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(12, 217, 244, 0.5);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--accent-pink);
  font-weight: 600;
  text-decoration: underline;
}

.auth-footer a:hover {
  color: #f472b6;
}

.terms-note {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 14px;
  line-height: 1.4;
}

.terms-note a {
  color: var(--cyan-primary);
  text-decoration: underline;
}

/* ==========================================
   Google OAuth Modal & Account Picker Styles
   ========================================== */
.google-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
}

.google-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.google-modal-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  color: #202124;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0,0,0,0.2);
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.google-modal-overlay.active .google-modal-card {
  transform: scale(1) translateY(0);
}

.google-modal-header {
  padding: 24px 24px 16px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid #f1f3f4;
}

.google-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #5f6368;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.google-modal-close:hover {
  background: #f1f3f4;
  color: #202124;
}

.google-logo-svg {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
}

.google-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #202124;
  margin-bottom: 4px;
}

.google-modal-subtitle {
  font-size: 0.85rem;
  color: #5f6368;
}

.google-modal-body {
  padding: 16px 20px 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.google-account-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.google-account-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #dadce0;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.google-account-item:hover {
  background: #f8fafd;
  border-color: #4285f4;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.15);
  transform: translateY(-1px);
}

.google-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.google-account-info {
  flex: 1;
  min-width: 0;
}

.google-account-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: #202124;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.google-account-email {
  font-size: 0.8rem;
  color: #5f6368;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.google-badge {
  font-size: 0.7rem;
  background: #e8f0fe;
  color: #1a73e8;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.google-use-another-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed #dadce0;
  background: transparent;
  color: #1a73e8;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  justify-content: center;
}

.google-use-another-btn:hover {
  background: #f8fafd;
  border-color: #1a73e8;
}

.google-custom-form {
  margin-top: 14px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e8eaed;
}

.google-custom-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #dadce0;
  background: #ffffff;
  color: #202124;
  font-size: 0.9rem;
  margin-bottom: 10px;
  outline: none;
  transition: border-color 0.2s;
}

.google-custom-form input:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.google-submit-custom-btn {
  width: 100%;
  padding: 10px;
  background: #1a73e8;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.google-submit-custom-btn:hover {
  background: #1557b0;
}

.google-loading-state {
  display: none;
  text-align: center;
  padding: 30px 15px;
}

.google-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4285f4;
  border-right: 4px solid #34a853;
  border-bottom: 4px solid #fbbc05;
  border-left: 4px solid #ea4335;
  border-radius: 50%;
  animation: google-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes google-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.google-loading-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #202124;
}

.google-loading-sub {
  font-size: 0.8rem;
  color: #5f6368;
  margin-top: 4px;
}



/* ==========================================
   Register Bonus Badge & Utility Classes
   ========================================== */
.bonus-badge-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(12, 217, 244, 0.12) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

.bonus-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #10b981;
  flex-shrink: 0;
}

.bonus-badge-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bonus-tag {
  background: #10b981;
  color: #052e16;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.bonus-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: 2px;
}

.text-cyan-highlight {
  color: #0cd9f4;
}

.input-icon-cyan {
  color: #0cd9f4;
}

.referrer-info-banner {
  display: none;
  font-size: 0.8rem;
  border-radius: 6px;
  background: rgba(12, 217, 244, 0.12);
  color: #0cd9f4;
  border: 1px solid rgba(12, 217, 244, 0.3);
}

.reg-feedback-box,
.login-feedback-box {
  display: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.back-to-home-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-feedback-link {
  color: #0cd9f4;
  text-decoration: underline;
}
