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

:root {
  --header-height: 50px;
  --color-bg: #ffffff;
  --color-text: #1c1e24;
  --color-text-secondary: #6b707b;
  --color-primary: #4f6ef7;
  --color-border: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --radius-md: 10px;
  --transition: 0.2s ease;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: "Google Sans Flex", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

#app {
  height: 100vh;
}

/* ─── HEADER ─── */
#app {
  padding-top: var(--header-height);
}

.card {
  width: 100%;
  height: calc(100vh - var(--header-height));
  position: relative;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#app-header {
  height: var(--header-height);
  min-height: var(--header-height);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
}

.header-left {
  display: flex;
  align-items: baseline;
}

.header-logo {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--color-text);
}

.header-nav {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.header-left .header-nav {
  margin-left: 24px;
}

.header-nav a {
  font-size: 14px;
  font-weight: 600;
  font-optical-sizing: auto;
  font-variation-settings: 'slnt' 0, 'wdth' 100, 'GRAD' 0, 'ROND' 0;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background var(--transition);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── AUTH BUTTONS IN HEADER ─── */
.header-auth-btn {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.header-auth-btn:hover {
  background: #f3f4f6;
}

/* ─── AUTH DROPDOWNS ─── */
.auth-dropdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.auth-dropdown-overlay.closed {
  display: none;
}

.auth-dropdown-backdrop {
  position: absolute;
  inset: 0;
}

.auth-dropdown {
  position: absolute;
  top: calc(var(--header-height) + 8px);
  right: 24px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  width: 380px;
  max-width: 90vw;
  max-height: 400px;
  overflow-y: auto;
  padding: 24px;
}

#signup-overlay .auth-dropdown {
  max-height: none;
}

.auth-dropdown h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-text);
}

.auth-dropdown .subtitle {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

.auth-dropdown .auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-dropdown .form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-dropdown label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
}

.auth-dropdown input {
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-dropdown input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79,110,247,0.12);
}

.auth-dropdown .dropdown-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.auth-dropdown .btn-submit {
  flex: 1;
  padding: 10px 20px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  font-family: inherit;
}

.auth-dropdown .btn-submit:hover {
  background: #3b5de7;
}

.auth-dropdown .btn-submit:disabled {
  opacity: 0.7;
  cursor: default;
}

.auth-dropdown .btn-cancel {
  flex: 1;
  padding: 10px 20px;
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.auth-dropdown .btn-cancel:hover {
  background: #f3f4f6;
  color: var(--color-text);
}

.auth-dropdown .email-group {
  display: inline-flex;
  border: 1.5px solid var(--color-border);
  border-radius: 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.auth-dropdown .email-group:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79,110,247,0.12);
}

.auth-dropdown .email-group input {
  border: none;
  border-radius: 6px 0 0 6px;
  outline: none;
  flex: none;
  padding: 10px 0 10px 14px;
}

.auth-dropdown .email-group input:focus {
  box-shadow: none;
}

.auth-dropdown .email-domain {
  padding: 10px 14px 10px 0;
  font-size: 14px;
  color: var(--color-text);
  white-space: nowrap;
  user-select: none;
}

.auth-dropdown .auth-error {
  background: #fef2f2;
  color: #ef4444;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  display: none;
}

.auth-dropdown .auth-error.show {
  display: block;
}
