@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* ── Material Symbols base ── */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  user-select: none;
}

/* ── Design tokens ── */
:root {
  --auth-primary:       #3b82f6;
  --auth-primary-dark:  #2563eb;
  --auth-accent:        #60a5fa;
  --auth-surface:       #ffffff;
  --auth-bg:            #eff6ff;
  --auth-border:        #c7d2fe;
  --auth-text:          #1e293b;
  --auth-muted:         #64748b;
  --auth-error-bg:      #fff1f2;
  --auth-error-border:  #fca5a5;
  --auth-error-text:    #991b1b;
  --auth-radius-card:   20px;
  --auth-radius-input:  10px;
  --auth-radius-btn:    999px;
}

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

body.udemy-auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--auth-text);
  overflow-x: hidden;
}

/* ══════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════ */
.udemy-auth-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(199,210,254,0.5);
}

.udemy-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--auth-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.udemy-logo-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.udemy-logo-icon svg { fill: #fff; }

/* ══════════════════════════════════════════
   FULL-PAGE LAYOUT
══════════════════════════════════════════ */
.udemy-auth-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 480px;
  min-height: 100vh;
  padding-top: 60px;
}

/* ══════════════════════════════════════════
   LEFT – ANIMATED HERO PANEL
══════════════════════════════════════════ */
.auth-hero {
  position: relative;
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 40%, #93c5fd 72%, #bfdbfe 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 56px;
  overflow: hidden;
}

/* Subtle dot-grid overlay */
.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
}

/* Animated gradient orbs */
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: orb-float 8s ease-in-out infinite;
  z-index: 0;
}

.auth-orb--1 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #bfdbfe, #3b82f6);
  top: -80px; left: -80px;
  animation-delay: 0s;
}

.auth-orb--2 {
  width: 220px; height: 220px;
  background: radial-gradient(circle, #7dd3fc, #3b82f6);
  bottom: 60px; right: -40px;
  animation-delay: 2s;
  animation-duration: 10s;
}

.auth-orb--3 {
  width: 160px; height: 160px;
  background: radial-gradient(circle, #93c5fd, #60a5fa);
  top: 50%; left: 55%;
  animation-delay: 4s;
  animation-duration: 7s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(18px, -22px) scale(1.05); }
  66%       { transform: translate(-12px, 14px) scale(0.97); }
}

/* Floating ring shapes */
.auth-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.12);
  animation: ring-spin linear infinite;
  z-index: 0;
}

.auth-ring--1 { width: 200px; height: 200px; top: 10%; right: 12%; animation-duration: 18s; }
.auth-ring--2 { width: 120px; height: 120px; bottom: 18%; left: 8%;  animation-duration: 12s; animation-direction: reverse; }
.auth-ring--3 { width: 340px; height: 340px; top: 40%; left: 30%;   animation-duration: 25s; opacity: 0.5; }

@keyframes ring-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Hero content */
.auth-hero__content {
  position: relative;
  z-index: 1;
}

.auth-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #e0e7ff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.auth-hero__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a5f3fc;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.auth-hero__title {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.auth-hero__title span {
  background: linear-gradient(90deg, #a5f3fc, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-hero__sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  max-width: 380px;
  margin-bottom: 36px;
}

/* Feature list */
.auth-hero__features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-hero__feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.88);
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-hero__feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.auth-hero__feature-icon .material-symbols-outlined {
  font-size: 20px;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  color: #fff;
}

/* Animated stat chips at bottom */
.auth-hero__stats {
  display: flex;
  gap: 12px;
  margin-top: 44px;
  flex-wrap: wrap;
}

.auth-hero__stat {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 10px 16px;
  text-align: center;
}

.auth-hero__stat-val {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.auth-hero__stat-lbl {
  display: block;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ══════════════════════════════════════════
   RIGHT – FORM PANEL
══════════════════════════════════════════ */
.udemy-auth-card {
  background: var(--auth-surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 48px;
  min-height: calc(100vh - 60px);
  border-left: 1px solid var(--auth-border);
}

/* ── Title & subtitle ── */
.udemy-auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--auth-text);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.udemy-auth-subtitle {
  font-size: 0.875rem;
  color: var(--auth-muted);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* Accent bar */
.auth-accent-bar {
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, var(--auth-primary), var(--auth-accent));
  border-radius: 4px;
  margin-bottom: 24px;
}

/* ── Error alert ── */
.udemy-auth-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: var(--auth-error-bg);
  border: 1px solid var(--auth-error-border);
  border-radius: 10px;
  font-size: 0.875rem;
  color: var(--auth-error-text);
  line-height: 1.5;
}

.udemy-auth-error::before { content: "⚠"; flex-shrink: 0; }

/* ── Form ── */
.udemy-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.udemy-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.udemy-auth-field span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--auth-text);
  letter-spacing: 0.02em;
}

.udemy-auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--auth-radius-input);
  font-size: 0.9375rem;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--auth-text);
  background: #f8fafc;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  outline: none;
}

.udemy-auth-field input:focus {
  border-color: var(--auth-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29,78,216,0.10);
}

.udemy-auth-field input::placeholder { color: #94a3b8; }

/* ── Primary button ── */
.udemy-auth-button {
  margin-top: 6px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border: none;
  border-radius: var(--auth-radius-btn);
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-accent) 100%);
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: box-shadow 0.15s, transform 0.1s;
  box-shadow: 0 2px 10px rgba(29,78,216,0.3);
  position: relative;
  overflow: hidden;
}

/* Shimmer effect on button */
.udemy-auth-button::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-20deg);
  animation: btn-shimmer 3s ease-in-out infinite;
}

@keyframes btn-shimmer {
  0%   { left: -100%; }
  50%, 100% { left: 160%; }
}

.udemy-auth-button:hover {
  box-shadow: 0 6px 20px rgba(29,78,216,0.38);
  transform: translateY(-1px);
}

.udemy-auth-button:active { transform: translateY(0); }

.udemy-auth-button:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* ── Footer link ── */
.udemy-auth-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--auth-muted);
}

.udemy-auth-footer a {
  color: var(--auth-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.12s;
}

.udemy-auth-footer a:hover { color: var(--auth-primary-dark); text-decoration: underline; }

/* ── Divider ── */
.udemy-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  font-size: 0.78rem;
  color: var(--auth-muted);
  font-weight: 500;
}

.udemy-auth-divider::before,
.udemy-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* ── OAuth button ── */
.udemy-auth-oauth-buttons { display: flex; flex-direction: column; gap: 10px; }

.udemy-auth-oauth-button {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--auth-radius-input);
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--auth-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .12s ease, color .2s ease;
}

.udemy-auth-oauth-button:hover {
  border-color: #c7d2fe;
  background: #f8faff;
  color: var(--auth-text);
  transform: translateY(-1px);
}

.udemy-auth-oauth-button--disabled {
  cursor: not-allowed !important;
  opacity: 0.72;
}

.udemy-auth-oauth-button--disabled:hover {
  transform: none;
  border-color: #e2e8f0;
  background: #fff;
  color: var(--auth-muted);
}

.auth-google-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #ea4335;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 860px) {
  .udemy-auth-main { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .udemy-auth-card {
    padding: 40px 28px;
    border-left: none;
    min-height: calc(100vh - 60px);
    justify-content: flex-start;
    padding-top: 48px;
    background: var(--auth-bg);
  }
  /* Show mini gradient bar at top on mobile */
  .udemy-auth-card::before {
    content: "";
    display: block;
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, var(--auth-primary), var(--auth-accent));
    position: fixed;
    top: 60px; left: 0; right: 0;
  }
  .udemy-auth-form, .auth-accent-bar,
  .udemy-auth-title, .udemy-auth-subtitle { max-width: 420px; }
}
