/* ==========================================================================
   SPARK.AI AUTH, PRICING & APP SHELL STYLES
   ========================================================================== */

/* Global resets for auth elements — prevent browser defaults */
.auth-overlay *,
.auth-overlay *::before,
.auth-overlay *::after {
  box-sizing: border-box;
}

.auth-overlay button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.auth-overlay input {
  font-family: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* ══════════════════════════════════════════════════════════════
   AUTH PAGE — Full-screen login (OpenAI-style, Spark.Ai palette)
   ══════════════════════════════════════════════════════════════ */

/* Brand in top-left corner of auth page */
.auth-brand {
  position: fixed;
  top: 20px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
  font-weight: 600;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
}

.auth-brand .spark-star {
  width: 22px;
  height: 22px;
}

.auth-brand .brand-wrapper {
  position: relative;
  display: inline-block;
  line-height: 1;
  font-size: 20px;
}

.auth-brand .brand-name {
  color: #fff;
  font-weight: 600;
}

.auth-brand .brand-arrow {
  position: absolute;
  bottom: -6px;
  left: 6%;
  width: 88%;
  height: 8px;
  pointer-events: none;
}

/* Ensure star-dot on the 'i' is visible and positioned correctly */
.auth-brand .star-dot {
  opacity: 1 !important;
  transform: translateX(-50%) scale(1) !important;
  top: -6px;
  left: 58%;
  width: 8px;
  height: 8px;
  position: absolute;
  z-index: 10;
}

.auth-brand .star-dot::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #f59e0b 100%);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: rotateStar 4s linear infinite;
  filter: drop-shadow(0 0 2px rgba(236, 72, 153, 0.9)) drop-shadow(0 0 4px rgba(99, 102, 241, 0.5));
}

/* Full-page container — replaces the landing page */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.auth-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Invisible card wrapper — just centers content, no visible box */
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 0 24px;
  margin: 0 auto;
  position: relative;
  /* Push content down to approximately center vertically */
  padding-top: clamp(60px, 12vh, 140px);
  padding-bottom: 40px;
  /* Reset any card-like styles */
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Close / back button — top-left of the page */
.auth-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  font-size: 28px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  z-index: 10;
  opacity: 0.7;
}

.auth-close:hover {
  opacity: 1;
}

/* ---- Toast / Error Messages ---- */
.auth-toast {
  display: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
  animation: authFadeIn 0.3s ease;
}

.auth-toast.error {
  display: block;
  background: rgba(234, 67, 53, 0.08);
  border: 1px solid rgba(234, 67, 53, 0.2);
  color: #f87171;
}

.auth-toast.info {
  display: block;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.auth-toast.success {
  display: block;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

/* ---- Auth Header ---- */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-title {
  font-size: 32px;
  color: #fff;
  margin: 0 0 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  color: #777;
  font-size: 14px;
  margin: 0;
}

/* ---- Auth Steps ---- */
.auth-step {
  display: none;
}

.auth-step.active {
  display: block;
  animation: authFadeIn 0.3s ease forwards;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Inputs ---- */
.input-group {
  margin-bottom: 16px;
}

.auth-input {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 14px 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
  box-sizing: border-box;
}

.auth-input::placeholder {
  color: #555;
}

.auth-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

/* ---- Primary Submit Button (Continue / Create Account) ---- */
.auth-submit-btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  margin-top: 4px;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: #000;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.auth-submit-btn:hover {
  background: #e0e0e0;
}

.auth-submit-btn:active {
  background: #ccc;
}

/* ---- Switch Text (Don't have an account? Sign up) ---- */
.auth-switch-text {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-top: 20px;
  margin-bottom: 0;
}

.auth-switch-text a {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-switch-text a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* ---- OR Divider ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: #555;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* ---- Social Login Buttons ---- */
.social-logins {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.06);
}

.social-btn:active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.social-btn svg {
  flex-shrink: 0;
}

/* ---- Footer Links (Terms / Privacy) ---- */
.auth-footer-links {
  text-align: center;
  font-size: 13px;
  color: #444;
  padding-top: 8px;
}

.auth-footer-links a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.auth-footer-sep {
  margin: 0 8px;
  color: #333;
}

/* ---- ROLE SELECTION ---- */
.role-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.role-card {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 24px 20px;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.role-card:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.role-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}

.role-title {
  font-weight: 600;
  color: #fff;
  font-size: 15px;
  display: block;
  margin-bottom: 6px;
}

.role-desc {
  font-size: 12px;
  color: #777;
  line-height: 1.4;
}

/* ---- PULSE CHECK (Job Holder) ---- */
.pulse-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pulse-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.25s;
  color: #fff;
}

.pulse-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.pulse-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.pulse-label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.pulse-sub {
  display: block;
  font-size: 12px;
  color: #777;
}

/* ==========================================================================
   PRICING OVERLAY
   ========================================================================== */
.pricing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  overflow-y: auto;
  padding: 60px 20px 40px;
  display: none;
  justify-content: center;
}

.pricing-overlay.active {
  display: flex;
}

.pricing-container {
  max-width: 1000px;
  width: 100%;
  position: relative;
}

.pricing-header {
  text-align: center;
  margin-bottom: 40px;
}

.pricing-close {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.pricing-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 800px) {
  .plans-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}

.plan-card {
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 32px 24px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.plan-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.plan-card.popular {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 40px rgba(255, 255, 255, 0.03);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-name {
  font-size: 16px;
  color: #888;
  margin-bottom: 12px;
  font-weight: 500;
}

.plan-price {
  font-size: 40px;
  color: #fff;
  font-weight: 700;
  margin-bottom: 24px;
  font-family: 'Space Grotesk', sans-serif;
}

.plan-price span {
  font-size: 16px;
  color: #555;
  font-weight: 400;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}

.plan-features li {
  margin-bottom: 12px;
  color: #bbb;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-features li::before {
  content: '\2713';
  color: #fff;
  font-weight: bold;
  flex-shrink: 0;
}

/* Plan Select Buttons */
.plans-grid .btn.primary,
.plans-grid .btn.secondary {
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.plans-grid .btn.primary {
  background: #fff;
  color: #000;
  border: none;
}

.plans-grid .btn.primary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.08);
}

.plans-grid .btn.secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.plans-grid .btn.secondary:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.06);
}

.pricing-skip {
  display: block;
  margin: 0 auto;
  background: none;
  border: none;
  color: #555;
  font-size: 14px;
  cursor: pointer;
  padding: 10px 20px;
  transition: color 0.2s;
}

.pricing-skip:hover {
  color: #fff;
}

/* ==========================================================================
   APP SHELL (Post-Login Interface)
   ========================================================================== */
.app-shell {
  display: none;
  position: fixed;
  inset: 0;
  background: #050505;
  z-index: 5000;
  flex-direction: row;
}

.app-shell.active {
  display: flex;
}

/* ---- Sidebar ---- */
.app-sidebar {
  width: 250px;
  background: #0a0a0a;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
}

.sidebar-brand {
  margin-bottom: 36px;
  padding-left: 12px;
  display: flex;
  align-items: center;
}

/* Sidebar Brand Styling to match Hero */
.sidebar-brand .brand-wrapper {
  position: relative;
  display: inline-block;
  font-size: 22px;
}

.sidebar-brand .brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #fff;
  position: relative;
  display: inline-block;
}

/* Ensure the star is visible immediately in sidebar */
.sidebar-brand .star-dot {
  opacity: 1 !important;
  transform: translateX(-50%) scale(1) !important;
  top: -4px;
  left: 58%;
  width: 8px;
  height: 8px;
}

/* Rotating star effect */
.sidebar-brand .star-dot::before {
  animation: rotateStar 4s linear infinite;
  filter: drop-shadow(0 0 2px rgba(236, 72, 153, 0.9))
          drop-shadow(0 0 4px rgba(99, 102, 241, 0.5));
}

.sidebar-brand .brand-arrow {
  position: absolute;
  bottom: -4px;
  left: 6%;
  width: 88%;
  height: 12px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 12px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  position: relative;
}

.menu-item svg {
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.25s;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
}

.menu-item:hover svg {
  opacity: 0.8;
}

.menu-item.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-item.active svg {
  opacity: 1;
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: #fff;
  border-radius: 0 3px 3px 0;
}

/* ---- Main Content ---- */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Top Bar */
.app-topbar {
  height: 56px;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  padding: 0 24px;
  flex-shrink: 0;
  gap: 16px;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 4px;
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.topbar-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  flex: 1;
}

.topbar-actions {
  display: flex;
  gap: 8px;
}

.topbar-icon-btn {
  background: rgba(255,255,255,0.05);
  border: none;
  color: #888;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.topbar-icon-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Dashboard Content */
.dashboard-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

.dashboard-locked .dashboard-content {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #111;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 22px;
}

.stat-label {
  color: #777;
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-value {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}

.stat-value.accent {
  color: #FF9900;
}

/* Feed Card */
.feed-card {
  background: #111;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 22px;
}

.feed-title {
  color: #777;
  font-size: 13px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.feed-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #ccc;
  font-size: 14px;
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-item strong {
  color: #fff;
}

/* ---- Lock Overlay ---- */
.lock-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 5, 0.75);
  backdrop-filter: blur(4px);
  z-index: 10;
}

.lock-overlay.active {
  display: flex;
}

.lock-message {
  background: #111;
  padding: 40px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  max-width: 440px;
}

.lock-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.lock-message h3 {
  color: #fff;
  font-size: 22px;
  margin-bottom: 12px;
  font-family: 'Space Grotesk', sans-serif;
}

.lock-message p {
  color: #888;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Unlock button - subtle light style */
.lock-message .btn.primary {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lock-message .btn.primary:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.06);
}

/* ---- Bottom Nav (Mobile) ---- */
.app-bottom-nav {
  height: 60px;
  background: #0a0a0a;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: none;
  align-items: center;
  justify-content: space-around;
  flex-shrink: 0;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #555;
  text-decoration: none;
  font-size: 10px;
  transition: color 0.2s;
  padding: 6px 12px;
}

.bottom-nav-item svg {
  opacity: 0.5;
}

.bottom-nav-item.active {
  color: #FF9900;
}

.bottom-nav-item.active svg {
  opacity: 1;
}

.bottom-nav-item.create-btn {
  background: #FF9900;
  color: #000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin-top: -18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
}

.bottom-nav-item.create-btn svg {
  opacity: 1;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .app-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.5);
  }

  .app-sidebar.open {
    left: 0;
  }

  .hamburger-btn {
    display: flex;
  }

  .app-bottom-nav {
    display: flex;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-content {
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding-left: 16px;
    padding-right: 16px;
  }
}
