/* =====================================================
   NexGenTools.io — Global Design System v2
   Pure CSS, no frameworks, no CDN
   ===================================================== */

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

/* ----- CSS Custom Properties ----- */
:root {
  --bg: #f0f4ff;
  --bg2: #e8eeff;
  --primary: #5b5ef4;
  --primary-hover: #4a4dd6;
  --primary-light: #eef0fe;
  --primary-glow: rgba(91,94,244,.18);
  --accent: #06c0d9;
  --accent-hover: #05a8bf;
  --accent-light: #e0f9fd;
  --dark: #0d1117;
  --dark2: #161b22;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-hover-border: #c7cafc;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --max-width: 1200px;
  --radius: 18px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 1px 4px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 16px 32px rgba(91,94,244,.12), 0 4px 8px rgba(0,0,0,.06);
  --shadow-glow: 0 0 0 3px var(--primary-glow);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  --transition: .2s ease;
  --transition-md: .35s cubic-bezier(.4,0,.2,1);
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ----- Layout ----- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 64px 0; }

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,.85);
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.site-logo {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -.03em;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo span { color: var(--primary); }

/* Header search */
.header-search {
  flex: 1;
  max-width: 360px;
  position: relative;
}
.header-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1.5px solid var(--card-border);
  border-radius: 100px;
  font-size: .85rem;
  font-family: var(--font);
  background: #f8fafc;
  color: var(--text);
  transition: all var(--transition);
  outline: none;
}
.header-search input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: var(--shadow-glow);
}
.header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}
.header-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.header-nav a:hover { color: var(--primary); }

/* ----- Hero ----- */
.hero {
  position: relative;
  text-align: center;
  padding: 96px 0 80px;
  background: linear-gradient(135deg, #0d1117 0%, #161b33 40%, #1a1040 70%, #0d1117 100%);
  overflow: hidden;
}

/* Animated grid dots background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(91,94,244,.22) 1px, transparent 1px);
  background-size: 36px 36px;
  animation: gridMove 20s linear infinite;
  opacity: .7;
  pointer-events: none;  /* CRITICAL: must not block hero buttons/links */
}

/* Gradient orbs */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 50%, rgba(91,94,244,.2) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 30%, rgba(6,192,217,.15) 0%, transparent 70%);
  pointer-events: none;
}

@keyframes gridMove {
  0%   { background-position: 0 0; }
  100% { background-position: 36px 36px; }
}

.hero .container { position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(91,94,244,.2);
  border: 1px solid rgba(91,94,244,.4);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: .78rem;
  font-weight: 600;
  color: #a5b4fc;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}
.hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #818cf8;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(1.4); }
}

.hero h1 {
  font-size: 3.6rem;
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.08;
  margin-bottom: 12px;
  color: #fff;
}
.hero h1 span {
  background: linear-gradient(90deg, #818cf8, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1.15rem;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  margin-bottom: 28px;
  letter-spacing: .01em;
}

.hero .description {
  max-width: 580px;
  margin: 0 auto 40px;
  color: rgba(255,255,255,.6);
  font-size: 1rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: .9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-md);
  font-family: var(--font);
  text-align: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(91,94,244,.35);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91,94,244,.45);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(6,192,217,.3);
}
.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6,192,217,.4);
  color: #fff;
}

.btn-outline {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.5);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline-dark {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline-dark:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: .8rem;
  border-radius: 100px;
}
.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
}

.btn-danger  { background: var(--danger);  color: #fff; border-radius: var(--radius-sm); }
.btn-danger:hover  { background: #dc2626; color: #fff; }
.btn-success { background: var(--success); color: #fff; border-radius: var(--radius-sm); }
.btn-success:hover { background: #059669; color: #fff; }

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ----- Stats Bar (hero bottom) ----- */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.1);
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
  color: rgba(255,255,255,.9);
}
.hero-stat .stat-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(90deg, #818cf8, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat .stat-label {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  margin-top: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ----- Privacy Banner ----- */
.privacy-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 32px 40px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.privacy-banner .shield { width: 44px; height: 44px; flex-shrink: 0; color: var(--success); }
.privacy-banner-text { text-align: left; }
.privacy-banner h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; color: #065f46; }
.privacy-banner p { color: #047857; font-size: .9rem; }

/* ----- Section ----- */
.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  color: var(--dark);
  letter-spacing: -.02em;
}
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-size: 1rem;
}

/* ----- Category Filter Pills ----- */
.category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}
.filter-pill {
  padding: 7px 18px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 600;
  border: 1.5px solid var(--card-border);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ----- Category Group Header ----- */
.category-group { margin-bottom: 52px; }
.category-group:last-child { margin-bottom: 0; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 20px;
}

/* ----- Cards ----- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition-md);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(91,94,244,.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-md);
  pointer-events: none;  /* CRITICAL: must not block inputs/buttons inside cards */
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--card-hover-border);
}
.card:hover::before { opacity: 1; }

/* ----- Clickable Card (entire card = link) ----- */
/* The .btn-sm inside gets a ::before that stretches to cover the full card.
   The card needs position:relative (already set). z-index keeps text above the overlay. */
.card.card-link {
  cursor: pointer;
}
.card.card-link h3,
.card.card-link p,
.card.card-link .card-icon,
.card.card-link .badge {
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.card.card-link .btn-sm {
  position: relative;
  z-index: 2;
}
.card.card-link .btn-sm::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Expand to fill the entire card by using negative offsets based on card padding (28px) */
  top: calc(-28px - 20px - 18px - 1px);   /* card-icon height + gap + top padding + border */
  left: calc(-28px - 1px);
  right: calc(-28px - 1px);
  bottom: calc(-28px - 1px);
  border-radius: var(--radius);
  z-index: -1;
}
.card.card-link:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--card-hover-border);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}
.card-icon svg { width: 24px; height: 24px; }

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
  letter-spacing: -.01em;
}
.card p {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.65;
}

/* ----- Value Cards ----- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.value-card { text-align: center; padding: 36px 28px; }
.value-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.6rem;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--dark);
  padding: 48px 0 32px;
  margin-top: 40px;
}
.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}
.footer-brand span { color: var(--accent); }

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  color: #64748b;
  font-size: .85rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: #fff; }
.footer-copy {
  font-size: .78rem;
  width: 100%;
  text-align: center;
  margin-top: 24px;
  color: #475569;
}

/* ----- Tool Page Layout ----- */
.tool-page { padding: 36px 0 80px; }
.tool-header { margin-bottom: 32px; }
.tool-header h1 {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -.02em;
  color: var(--dark);
}
.tool-header p { color: var(--text-secondary); font-size: .95rem; }
.tool-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-weight: 500;
  border-radius: 100px;
  background: #f1f5f9;
  padding: 6px 14px;
}
.tool-back:hover { color: var(--primary); background: var(--primary-light); }

/* ----- Forms ----- */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: .83rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--dark);
  letter-spacing: .01em;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="color"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: all var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-mono);
  font-size: .85rem;
  line-height: 1.55;
}

input[type="color"] {
  height: 44px;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

/* ----- Range / Slider ----- */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--card-border);
  outline: none;
  border: none;
  box-shadow: none;
  padding: 0;
}
input[type="range"]:focus { box-shadow: none; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(91,94,244,.4);
}

/* ----- Tabs ----- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--card-border);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab-btn {
  padding: 10px 20px;
  border: none;
  background: none;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: var(--font);
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ----- Tables ----- */
.table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
}
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
thead { background: #f8fafc; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--card-border); }
th { font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); }
tbody tr:hover { background: #f8fafc; }
tbody tr:last-child td { border-bottom: none; }

/* ----- Toggle Switch ----- */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--card-border);
  border-radius: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ----- Split Layout ----- */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }

/* ----- Action Bar ----- */
.action-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

/* ----- Badges ----- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: #065f46; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-danger  { background: var(--danger-light);  color: #991b1b; }
.badge-new {
  background: linear-gradient(90deg, #818cf8, #38bdf8);
  color: #fff;
  font-size: .65rem;
  padding: 2px 8px;
  vertical-align: middle;
  margin-left: 6px;
}

/* ----- Messages / Toast ----- */
.msg {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 16px;
}
.msg-error   { background: var(--danger-light);  color: #991b1b; border: 1px solid #fecaca; }
.msg-success { background: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; }
.msg-info    { background: var(--primary-light); color: var(--primary); border: 1px solid #c7d2fe; }

/* ----- Bar Chart ----- */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding: 16px 0;
}
.bar-chart .bar {
  flex: 1;
  min-width: 28px;
  background: linear-gradient(180deg, var(--primary) 0%, #818cf8 100%);
  border-radius: 6px 6px 0 0;
  position: relative;
  transition: height .4s cubic-bezier(.4,0,.2,1);
}
.bar-chart .bar-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .65rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.bar-chart .bar-value {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .65rem;
  font-weight: 700;
  color: var(--dark);
  white-space: nowrap;
}

/* ----- Result Box ----- */
.result-box {
  background: linear-gradient(135deg, #f8fafc 0%, var(--primary-light) 100%);
  border: 1.5px solid #c7d2fe;
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-top: 20px;
}
.result-box .result-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.result-box .result-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.02em;
}

/* ----- Resume / Print ----- */
.resume-preview {
  background: #fff;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 44px;
  min-height: 600px;
  font-size: .9rem;
  line-height: 1.65;
}
.resume-preview h2 {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.resume-preview h3 {
  font-size: .9rem;
  color: var(--primary);
  margin-top: 22px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.resume-preview .resume-item { margin-bottom: 14px; }
.resume-preview .resume-item-title { font-weight: 700; }
.resume-preview .resume-item-sub { font-size: .85rem; color: var(--text-secondary); }

/* ----- File Upload Area ----- */
.upload-area {
  border: 2px dashed var(--card-border);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-md);
  background: #fafbfc;
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-area p { color: var(--text-secondary); font-size: .9rem; margin-top: 10px; }
.upload-area input[type="file"] { display: none; }

/* ----- Image Preview Grid ----- */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.preview-item {
  background: #fff;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}
.preview-item img { width: 100%; height: 120px; object-fit: cover; }
.preview-item .preview-info { padding: 8px; font-size: .75rem; color: var(--text-secondary); }
.preview-item .preview-actions { padding: 0 8px 8px; display: flex; gap: 4px; }

/* ----- Password Strength ----- */
.strength-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--card-border);
  overflow: hidden;
  margin-top: 8px;
}
.strength-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease, background .4s ease;
}

/* ----- Color Swatch ----- */
.swatch {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--card-border);
  cursor: pointer;
  transition: transform var(--transition);
}
.swatch:hover { transform: scale(1.12); }
.swatches-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ----- Fade In ----- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s ease, transform .55s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ----- No Results ----- */
.no-results {
  display: none;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.no-results.show { display: block; }
.no-results svg { width: 48px; height: 48px; margin: 0 auto 16px; opacity: .3; }
.no-results p { font-size: 1rem; }

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.4rem; }
  .hero { padding: 70px 0 60px; }
  .hero-stats { gap: 24px; }
  .split-layout { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .header-search { max-width: 200px; }
  .privacy-banner { flex-direction: column; text-align: center; }
  .privacy-banner-text { text-align: center; }
}

@media (max-width: 580px) {
  .hero h1 { font-size: 2rem; }
  .hero-stats { display: none; }
  .container { padding: 0 16px; }
  .card { padding: 22px; }
  .header-search { display: none; }
  .tabs { gap: 0; }
  .tab-btn { padding: 8px 12px; font-size: .8rem; }
}

/* ----- Print Styles ----- */
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .tool-back, .action-bar, .no-print { display: none !important; }
  .resume-preview, .invoice-preview { border: none; padding: 0; box-shadow: none; }
  .split-layout { grid-template-columns: 1fr; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}
