/* ═══════════════════════════════════════════════
   Resume Reviewer AI — Light Indigo Theme
   Matches JobHuntingHub main site theme
   ═══════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Palette */
  --white:          #ffffff;
  --bg:             #f8f9fb;
  --bg-card:        #ffffff;
  --bg-subtle:      #f1f3f6;
  --border:         #e4e7ed;
  --border-hover:   #cdd1d9;
  --text-primary:   #1a1d23;
  --text-secondary: #5b6170;
  --text-muted:     #8e94a3;
  --accent:         #4f46e5;
  --accent-hover:   #4338ca;
  --accent-light:   rgba(79, 70, 229, 0.08);
  --accent-mid:     rgba(79, 70, 229, 0.14);
  --green:          #059669;
  --green-bg:       rgba(5, 150, 105, 0.10);
  --green-border:   #34d399;
  --red:            #dc2626;
  --red-bg:         rgba(220, 38, 38, 0.08);
  --red-border:     #fca5a5;
  --orange:         #d97706;
  --orange-bg:      rgba(217, 119, 6, 0.10);

  /* Dimensions */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --max-w:     1040px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo span {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-sm);
}
.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 6px;
  transition: all 0.18s ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active {
  background: var(--white);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: 0.2s;
}

/* ── Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 28px;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 56px 0 40px;
}
.badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.35rem 0.9rem;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.hero .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 32px;
}
.hero .btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.hero .btn-secondary:hover {
  background: var(--accent);
  color: white;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.2s;
  line-height: 1.4;
}
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.2);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
}
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover {
  background: var(--accent);
  color: white;
}
.btn-full {
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* ── Features Grid ── */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.25s;
}
.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}
.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Pricing ── */
.pricing {
  text-align: center;
  margin: 3rem 0;
}
.pricing h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.pricing-card {
  background: var(--bg-card);
  border: 2px solid var(--accent-mid);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 380px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
}
.price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.price-note {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: normal;
}
.pricing-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.pricing-card .btn {
  margin-top: 1.5rem;
}

/* ── Upload Form ── */
.upload-form {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin: 2rem 0;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: var(--text-primary);
}
.file-input {
  width: 100%;
  padding: 1rem;
  background: var(--bg-subtle);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.file-input:hover {
  border-color: var(--accent);
}
.file-input:focus {
  outline: none;
  border-color: var(--accent);
}
.file-input::file-selector-button {
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin-right: 12px;
  transition: background 0.15s;
  font-family: inherit;
}
.file-input::file-selector-button:hover {
  background: var(--accent-mid);
}

textarea {
  width: 100%;
  padding: 1rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.6;
}
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
textarea::placeholder {
  color: var(--text-muted);
}

.hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.divider {
  text-align: center;
  margin: 1.5rem 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.divider span {
  background: var(--bg-card);
  padding: 0 1rem;
  position: relative;
  top: -0.7rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.error-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 1rem;
  transition: color 0.15s;
}
.back-link:hover {
  color: var(--accent);
}

/* ── Report Page ── */
.score-hero {
  text-align: center;
  margin: 2rem 0;
}

.big-score {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 4px solid;
  background: var(--bg-card);
  position: relative;
}
.big-score.score-good {
  border-color: var(--green);
  box-shadow: 0 0 0 6px var(--green-bg);
}
.big-score.score-ok {
  border-color: var(--orange);
  box-shadow: 0 0 0 6px var(--orange-bg);
}
.big-score.score-bad {
  border-color: var(--red);
  box-shadow: 0 0 0 6px var(--red-bg);
}

.score-number {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}
.score-label {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}
.score-text {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Score Grid */
.scores-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.score-card {
  background: var(--bg-card);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.score-card:hover {
  border-color: var(--border-hover);
}
.score-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}
.score-bar {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
  border-radius: 4px;
  transition: width 1s ease;
}
.score-value {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Section Cards */
.section-card {
  background: var(--bg-card);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
  transition: border-color 0.2s;
}
.section-card:hover {
  border-color: var(--border-hover);
}
.section-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.green-border {
  border-left: 4px solid var(--green);
}
.red-border {
  border-left: 4px solid var(--red);
}
.section-card ul, .section-card ol {
  padding-left: 1.4rem;
}
.section-card li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.section-card li::marker {
  color: var(--accent);
}
.section-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cta-section {
  text-align: center;
  margin: 2.5rem 0;
}

/* ── Improved Resume ── */
.improved-resume {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 2rem 0;
}
.improved-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.improved-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.improved-body {
  padding: 1.5rem;
  white-space: pre-wrap;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-primary);
  overflow-x: auto;
}

/* ── Success Page ── */
.success-page {
  text-align: center;
  padding: 3rem 0;
}
.success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}
.success-page h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}
.success-page .subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}
.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Header (sub-pages) ── */
header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
header .subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* ── Footer ── */
footer {
  padding: 36px 0 32px;
  border-top: 1px solid var(--border);
  text-align: center;
  margin-top: 2rem;
}
footer .footer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
footer .footer-brand {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}
footer .footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
footer .footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.15s;
}
footer .footer-links a:hover {
  color: var(--accent);
}

/* ── Loading Spinner ── */
.loading {
  text-align: center;
  padding: 3rem 0;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  body { font-size: 16px; }

  .nav-inner { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 4px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  }
  .nav-links.open a {
    padding: 12px 20px;
    border-radius: 6px;
  }
  .hamburger { display: flex; }

  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1rem; }

  h1 { font-size: 1.8rem; }
  .features { grid-template-columns: 1fr; }
  .scores-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }

  .success-page h1 { font-size: 1.8rem; }
  .success-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  body { font-size: 15px; }
  .hero h1 { font-size: 1.7rem; }
  .big-score { width: 140px; height: 140px; }
  .score-number { font-size: 3rem; }
}
