:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #f59e0b;
  --danger: #ef4444;
  --success: #10b981;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(37,99,235,.12);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* ── Layout ───────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

.page-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media(min-width:1024px) {
  .page-wrap { grid-template-columns: 1fr 300px; }
}

/* ── Header ───────────────────────────────────────── */
header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.logo-icon svg { width: 22px; height: 22px; color: #fff; }
.logo-name { font-size: 1.2rem; font-weight: 700; line-height: 1.1; }
.logo-name span { color: var(--primary); }

nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
nav a:hover { color: var(--primary); background: var(--primary-light); }

.lang-select {
  appearance: none;
  background: var(--primary-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-size: .875rem;
  font-weight: 600;
  padding: 6px 28px 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  min-width: 90px;
}
.lang-select:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
  color: #fff;
  padding: 56px 0 48px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}
.hero h1 em { font-style: normal; color: #fde68a; }
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,.85);
  max-width: 600px;
  margin: 0 auto 24px;
}
.hero-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.badge {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
}

/* ── Ad Slots ─────────────────────────────────────── */
.ad-slot {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  overflow: hidden;
}
.ad-slot-banner { width: 100%; min-height: 90px; margin: 16px 0; }
.ad-slot-rectangle { width: 100%; min-height: 250px; }
.ad-slot-sidebar { width: 100%; min-height: 600px; }

/* ── Generator Card ───────────────────────────────── */
.generator {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 8px;
}

.generator h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.generator h2 svg { color: var(--primary); width: 24px; height: 24px; flex-shrink: 0; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media(max-width:640px) { .form-grid { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

select, textarea {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font);
  font-size: .95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
select { cursor: pointer; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  appearance: none;
}
select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
textarea { resize: vertical; min-height: 80px; }

.btn-generate {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.btn-generate:hover { background: var(--primary-dark); box-shadow: 0 4px 16px rgba(37,99,235,.4); transform: translateY(-1px); }
.btn-generate:active { transform: translateY(0); }
.btn-generate svg { width: 18px; height: 18px; }

/* ── Result Card ──────────────────────────────────── */
.result-card {
  margin-top: 24px;
  background: var(--primary-light);
  border: 1.5px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 24px;
  display: none;
}
.result-card.visible { display: block; }
.result-card h3 {
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}
.excuse-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  border: 1px solid #bfdbfe;
  white-space: pre-wrap;
  position: relative;
}
.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.btn-copy, .btn-another {
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
}
.btn-copy {
  background: var(--primary);
  color: #fff;
}
.btn-copy:hover { background: var(--primary-dark); }
.btn-copy.copied { background: var(--success); }
.btn-another {
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-another:hover { background: var(--primary-light); }

/* ── Category Cards ───────────────────────────────── */
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}
.section-title span { color: var(--primary); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.cat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cat-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.cat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.cat-card h3 { font-size: 1rem; font-weight: 700; }
.cat-card p { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }
.cat-arrow { font-size: .8rem; color: var(--primary); font-weight: 600; margin-top: auto; }

/* Category color variants */
.cat-health .cat-icon { background: #fee2e2; }
.cat-family .cat-icon { background: #fef3c7; }
.cat-personal .cat-icon { background: #d1fae5; }
.cat-admin .cat-icon { background: #e0e7ff; }
.cat-mental .cat-icon { background: #fae8ff; }
.cat-social .cat-icon { background: #fff7ed; }
.cat-work .cat-icon { background: #f0fdf4; }
.cat-funny .cat-icon { background: #fef9c3; }

/* ── Sample Excuses Section ───────────────────────── */
.excuse-samples { margin-top: 8px; }
.sample-list { display: flex; flex-direction: column; gap: 12px; }
.sample-item {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  position: relative;
}
.sample-item:hover { border-color: var(--primary); }
.sample-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.sample-text { font-size: .9rem; line-height: 1.6; color: var(--text); }
.sample-copy {
  position: absolute;
  top: 12px; right: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: .75rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .15s;
}
.sample-copy:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ── Sidebar ──────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.sidebar-card h4 {
  font-size: .875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
}
.tip-list { display: flex; flex-direction: column; gap: 10px; }
.tip-item { display: flex; gap: 10px; font-size: .875rem; line-height: 1.5; }
.tip-item::before { content: "✓"; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ── SEO Content Sections ─────────────────────────── */
.content-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px;
}
.content-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}
.content-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 20px 0 10px;
  color: var(--text);
}
.content-section p { font-size: .95rem; line-height: 1.75; color: var(--text-muted); margin-bottom: 12px; }

/* ── Footer ───────────────────────────────────────── */
footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  padding: 40px 0 24px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 {
  font-size: .875rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}
.footer-col a, .footer-col p {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .875rem;
  display: block;
  margin-bottom: 8px;
  line-height: 1.5;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .8rem;
}

/* ── Category Page ────────────────────────────────── */
.page-hero {
  padding: 40px 0 32px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
}
.breadcrumb {
  font-size: .85rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 12px;
}
.breadcrumb a { color: rgba(255,255,255,.8); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.page-hero h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,.85); max-width: 640px; }

.excuse-block {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  position: relative;
}
.excuse-block-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.excuse-tag {
  background: var(--primary-light);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.excuse-block p { font-size: .95rem; line-height: 1.75; color: var(--text); }
.btn-copy-block {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all .15s;
  white-space: nowrap;
}
.btn-copy-block:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-copy-block.copied { border-color: var(--success); color: var(--success); }

/* ── Privacy Policy ───────────────────────────────── */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; font-weight: 700; margin: 28px 0 10px; }
.prose h3 { font-size: 1.05rem; font-weight: 700; margin: 20px 0 8px; }
.prose p, .prose li { font-size: .95rem; line-height: 1.8; color: var(--text-muted); margin-bottom: 10px; }
.prose ul { padding-left: 20px; }
.prose a { color: var(--primary); }

/* ── Misc ─────────────────────────────────────────── */
.section-gap { margin-top: 40px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  text-decoration: none;
}
.chip:hover { background: var(--primary); color: #fff; }
.flex-wrap-gap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

@media(max-width:768px) {
  .generator { padding: 20px; }
  .content-section { padding: 20px; }
  nav a { font-size: .78rem; padding: 5px 7px; }
  .logo-name { display: none; }
}
@media(max-width:480px) {
  nav a:not(.nav-keep) { display: none; }
}
