/* ============================================================
   ZENITH RESUME BUILDER PRO — Shared Design System
   Prime Tools Hub | support@primetoolshub.in
   ============================================================
   This file is the FOUNDATION of the entire UI.
   It contains:
     1. Google Fonts Import
     2. CSS Custom Properties (Design Tokens)
     3. Reset & Base Styles
     4. Utility Classes
     5. Typography
     6. Button Styles
     7. Badge & Tag Styles
     8. Toast Notifications
     9. Modal Styles
    10. Scrollbar Styles
    11. Keyframe Animations
   ============================================================ */


/* ── 1. GOOGLE FONTS ──────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');


/* ── 2. DESIGN TOKENS (CSS Custom Properties) ─────────────── */
/* ============================================================
   [EDIT HERE] - CHANGE THEME COLORS
   If you want to change the app's purple/pink branding to your 
   own colors, just edit --brand and --brand-2 below. All buttons, 
   glows, and gradients will automatically update!
   ============================================================ */
:root {

  /* --- Brand Colors --- */
  --brand:          #8b5cf6;          /* Primary purple */
  --brand-2:        #ec4899;          /* Secondary pink */
  --brand-hover:    #7c3aed;
  --brand-glow:     rgba(139, 92, 246, 0.35);
  --brand-light:    rgba(139, 92, 246, 0.12);
  --gradient:       linear-gradient(135deg, #8b5cf6, #ec4899);
  --gradient-hover: linear-gradient(135deg, #7c3aed, #db2777);
  --gradient-text:  linear-gradient(135deg, #a78bfa, #f472b6);
  --gradient-soft:  linear-gradient(135deg, rgba(139,92,246,0.15), rgba(236,72,153,0.15));

  /* --- Semantic Colors --- */
  --success:        #10b981;
  --success-light:  rgba(16, 185, 129, 0.12);
  --warning:        #f59e0b;
  --warning-light:  rgba(245, 158, 11, 0.12);
  --danger:         #ef4444;
  --danger-light:   rgba(239, 68, 68, 0.12);
  --info:           #38bdf8;
  --info-light:     rgba(56, 189, 248, 0.12);

  /* --- Background Layers --- */
  --bg:             #0b1120;          /* Main page background */
  --bg-surface:     #0f172a;          /* Card/surface background */
  --bg-elevated:    #1e293b;          /* Elevated elements */
  --bg-glass:       rgba(15, 23, 42, 0.80);    /* Glassmorphism base */
  --bg-glass-light: rgba(255, 255, 255, 0.04); /* Light glass overlay */
  --bg-hover:       rgba(255, 255, 255, 0.06);
  --bg-active:      rgba(139, 92, 246, 0.10);

  /* --- Text Colors --- */
  --text:           #f1f5f9;          /* Primary text */
  --text-secondary: #cbd5e1;          /* Secondary text */
  --text-muted:     #94a3b8;          /* Muted/hint text */
  --text-faint:     #475569;          /* Very faint text */
  --text-inverse:   #0b1120;          /* Text on light bg */

  /* --- Border Colors --- */
  --border:         rgba(255, 255, 255, 0.07);
  --border-strong:  rgba(255, 255, 255, 0.14);
  --border-brand:   rgba(139, 92, 246, 0.40);

  /* --- Shadows --- */
  --shadow-xs:    0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm:    0 2px 4px rgba(0, 0, 0, 0.5);
  --shadow-md:    0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg:    0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-xl:    0 20px 50px rgba(0, 0, 0, 0.7);
  --shadow-brand: 0 0 30px rgba(139, 92, 246, 0.30);
  --shadow-brand-lg: 0 0 60px rgba(139, 92, 246, 0.25);
  --shadow-pink:  0 0 30px rgba(236, 72, 153, 0.25);
  --glow-btn:     0 4px 20px rgba(139, 92, 246, 0.50);
  --glow-btn-hover: 0 6px 30px rgba(139, 92, 246, 0.70);

  /* --- Border Radius --- */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 9999px;

  /* --- Transitions --- */
  --t-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:   250ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:   400ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* --- Spacing Scale --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* --- Typography Scale --- */
  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.25rem;   /* 20px */
  --text-2xl:  1.5rem;    /* 24px */
  --text-3xl:  1.875rem;  /* 30px */
  --text-4xl:  2.25rem;   /* 36px */
  --text-5xl:  3rem;      /* 48px */
  --text-6xl:  3.75rem;   /* 60px */
  --text-7xl:  4.5rem;    /* 72px */

  /* --- Resume Builder Scale --- */
  --fs-sm: 13.5px;
  --fs-md: 16px;
  --fs-lg: 18.5px;

  --lh-compact: 1.25;
  --lh-normal: 1.6;
  --lh-airy: 1.9;

  /* --- Z-Index Scale --- */
  --z-base:    1;
  --z-raised:  10;
  --z-sticky:  100;
  --z-overlay: 200;
  --z-modal:   300;
  --z-toast:   400;
  --z-top:     500;
}


/* ── 3. RESET & BASE STYLES ───────────────────────────────── */

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

/* Root font size & scrolling */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Body defaults */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Media defaults */
img, video, svg { max-width: 100%; display: block; }

/* Form element font inheritance */
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Anchor reset */
a { color: inherit; text-decoration: none; }

/* List reset */
ul, ol { list-style: none; }

/* Button reset */
button { cursor: pointer; border: none; background: none; }


/* ── 4. UTILITY CLASSES ───────────────────────────────────── */

/* --- Accessibility --- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Display --- */
.hidden        { display: none !important; }
.flex          { display: flex; }
.inline-flex   { display: inline-flex; }
.grid          { display: grid; }
.block         { display: block; }

/* --- Flex Helpers --- */
.items-center  { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col      { flex-direction: column; }
.flex-1        { flex: 1; }
.gap-1         { gap: var(--space-1); }
.gap-2         { gap: var(--space-2); }
.gap-3         { gap: var(--space-3); }
.gap-4         { gap: var(--space-4); }

/* --- Sizing --- */
.w-full        { width: 100%; }
.h-full        { height: 100%; }

/* --- Spacing Helpers --- */
.mt-1  { margin-top: var(--space-1); }
.mt-2  { margin-top: var(--space-2); }
.mt-3  { margin-top: var(--space-3); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }

/* --- Text Utilities --- */
.text-center   { text-align: center; }
.text-muted    { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* --- Gradient Text Effect --- */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── 5. TYPOGRAPHY ────────────────────────────────────────── */

/* Heading font = Outfit */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: var(--text-6xl); font-weight: 800; }
h2 { font-size: var(--text-4xl); font-weight: 700; }
h3 { font-size: var(--text-2xl); font-weight: 600; }
h4 { font-size: var(--text-xl);  font-weight: 600; }
h5 { font-size: var(--text-lg);  font-weight: 600; }
h6 { font-size: var(--text-base); font-weight: 600; }

p  { color: var(--text-secondary); line-height: 1.7; }


/* ── 6. BUTTON STYLES ─────────────────────────────────────── */

/* --- Base Button --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 11px 22px;
  font-family: 'Outfit', sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border-radius: var(--r-full);
  cursor: pointer;
  border: none;
  transition:
    transform var(--t-fast),
    box-shadow var(--t-fast),
    background var(--t-base),
    opacity var(--t-base),
    border-color var(--t-base);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  text-decoration: none;
}

/* Active scale effect */
.btn:active { transform: scale(0.97); }

/* Disabled state */
.btn:disabled, .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Shimmer overlay on hover */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--t-fast);
}
.btn:hover::after { background: rgba(255, 255, 255, 0.08); }

/* --- Button Sizes --- */
.btn-sm  { padding: 8px 16px;  font-size: var(--text-xs); }
.btn-md  { padding: 12px 24px; font-size: var(--text-sm); }
.btn-lg  { padding: 14px 32px; font-size: var(--text-base); }
.btn-xl  { padding: 18px 40px; font-size: var(--text-lg); font-weight: 700; }
.btn-icon { padding: 0; width: 42px; height: 42px; border-radius: 50%; }

/* --- Primary Button (Gradient Glow) --- */
.btn-primary {
  background: var(--gradient);
  color: #ffffff;
  box-shadow: var(--glow-btn);
}
.btn-primary:hover {
  box-shadow: var(--glow-btn-hover);
  transform: translateY(-1px);
}

/* --- Secondary Button --- */
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-brand);
}

/* --- Ghost Button --- */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--border-strong);
}

/* --- Danger Button --- */
.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

/* --- Success Button --- */
.btn-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.btn-success:hover {
  background: var(--success);
  color: #fff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}


/* ── 7. BADGE & TAG STYLES ────────────────────────────────── */

/* --- Pill Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  border-radius: var(--r-full);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-brand {
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid var(--border-brand);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* --- Section Label Badge --- */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--gradient-soft);
  border: 1px solid var(--border-brand);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: #a78bfa;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

/* --- Divider --- */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: var(--space-4) 0;
}


/* ── 8. TOAST NOTIFICATION SYSTEM ─────────────────────────── */

/* Container (fixed bottom-right) */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

/* Individual Toast */
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-width: 260px;
  max-width: 380px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  pointer-events: all;
  animation: toastIn 0.35s var(--t-bounce) forwards;
}

/* Toast variants */
.toast.success { border-color: rgba(16, 185, 129, 0.3); }
.toast.success .toast-icon { color: var(--success); }
.toast.error   { border-color: rgba(239, 68, 68, 0.3); }
.toast.error   .toast-icon { color: var(--danger); }
.toast.warn    { border-color: rgba(245, 158, 11, 0.3); }
.toast.warn    .toast-icon { color: var(--warning); }
.toast.info    { border-color: var(--border-brand); }
.toast.info    .toast-icon { color: var(--brand); }

/* Toast exit animation */
.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }


/* ── 9. MODAL STYLES ──────────────────────────────────────── */

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-base), visibility var(--t-base);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Modal Box */
.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  padding: var(--space-8);
  max-width: 440px;
  width: 90%;
  box-shadow: var(--shadow-xl), var(--shadow-brand);
  transform: scale(0.92) translateY(10px);
  transition: transform var(--t-bounce);
}

.modal-overlay.show .modal-box {
  transform: scale(1) translateY(0);
}

/* Confirm Modal Specific */
.confirm-modal-icon {
  width: 56px;
  height: 56px;
  background: var(--warning-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warning);
  font-size: 1.5rem;
  margin: 0 auto var(--space-4);
}

.confirm-modal-icon.danger {
  background: var(--danger-light);
  color: var(--danger);
}

.confirm-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: var(--text-xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-2);
}

.confirm-modal-message {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.confirm-modal-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}


/* ── 10. SCROLLBAR STYLES ─────────────────────────────────── */

/* Firefox */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

/* Webkit */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: var(--bg-elevated);
  border-radius: var(--r-full);
  border: 1px solid var(--border);
}
::-webkit-scrollbar-thumb:hover { background-color: var(--border-strong); }


/* ── 11. KEYFRAME ANIMATIONS ──────────────────────────────── */

/* Toast enter */
@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* Toast exit */
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(30px) scale(0.9); }
}

/* Fade in up (for scroll reveal) */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Float (for background orbs) */
@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-20px) scale(1.05); }
}

/* Slow float (larger orbs) */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-30px) rotate(5deg); }
  66%       { transform: translateY(15px) rotate(-3deg); }
}

/* Pulse glow */
@keyframes pulseGlow {
  0%, 100% { box-shadow: var(--glow-btn); }
  50%       { box-shadow: var(--glow-btn-hover); }
}

/* Shimmer (for skeleton loading) */
@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

/* Spin */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Strength meter fill */
@keyframes meterFill {
  from { width: 0%; }
  to   { width: var(--target-width); }
}

/* ATS ring fill */
@keyframes ringFill {
  from { stroke-dashoffset: 314; }
  to   { stroke-dashoffset: var(--target-offset); }
}

/* Typing cursor blink */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Reveal from left */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Reveal from right */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Scale in */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}


/* ── 12. SCROLL REVEAL (used by landing page JS) ──────────── */

/* Elements with this class start hidden */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  /* Delay support via CSS variable */
  transition-delay: var(--delay, 0s);
}

/* When IntersectionObserver adds .visible class */
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── 13. GLASSMORPHISM CARD (reusable) ────────────────────── */

.glass-card {
  background: var(--bg-glass-light);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  transition:
    border-color var(--t-base),
    box-shadow var(--t-base),
    transform var(--t-base);
}

.glass-card:hover {
  border-color: var(--border-brand);
  box-shadow: var(--shadow-brand);
  transform: translateY(-2px);
}


/* ── 14. FORM COMPONENTS (shared between landing & builder) ── */

/* Input field */
.field-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: var(--text-sm);
  color: var(--text);
  outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

.field-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}

.field-input::placeholder { color: var(--text-faint); }


/* ── END OF SHARED.CSS ────────────────────────────────────── */
