/* =========================================================
   SarkariAura — core stylesheet
   Identity: a soft "aura" gradient glow + glass cards, with
   functional per-category colour coding for fast scanning.
   No external font/CSS dependencies (loads fast on mobile).
   ========================================================= */

:root {
  --bg:        #f6f7fb;
  --bg-tint:   #eef0fa;
  --surface:   rgba(255, 255, 255, 0.72);
  --surface-2: #ffffff;
  --border:    rgba(20, 22, 50, 0.10);
  --text:      #181a2e;
  --muted:     #5a5f7a;
  --faint:     #8b90ab;
  --brand-1:   #6d5efc;   /* indigo  */
  --brand-2:   #a855f7;   /* violet  */
  --brand-3:   #22d3ee;   /* cyan    */
  --ring:      rgba(109, 94, 252, 0.45);
  --shadow:    0 10px 30px -12px rgba(24, 26, 70, 0.25);
  --radius:    18px;
  --maxw:      1140px;

  /* category accents (functional colour coding) */
  --c-violet:  #7c5cff;
  --c-emerald: #10b981;
  --c-amber:   #f59e0b;
  --c-sky:     #0ea5e9;
  --c-rose:    #f43f5e;
  --c-teal:    #14b8a6;
}

[data-theme="dark"] {
  --bg:        #0b0d1a;
  --bg-tint:   #11142a;
  --surface:   rgba(24, 27, 51, 0.66);
  --surface-2: #161a33;
  --border:    rgba(255, 255, 255, 0.10);
  --text:      #eef0fb;
  --muted:     #a3a8c8;
  --faint:     #6f75a0;
  --brand-1:   #8b7dff;
  --brand-2:   #c084fc;
  --brand-3:   #34e0f2;
  --ring:      rgba(160, 120, 255, 0.5);
  --shadow:    0 18px 40px -16px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient aura behind everything */
body::before {
  content: "";
  position: fixed;
  inset: -20vh -10vw auto -10vw;
  height: 70vh;
  z-index: -1;
  background:
    radial-gradient(40vw 40vw at 18% 0%, color-mix(in srgb, var(--brand-1) 38%, transparent), transparent 70%),
    radial-gradient(38vw 38vw at 82% 8%, color-mix(in srgb, var(--brand-3) 30%, transparent), transparent 70%);
  filter: blur(10px);
  opacity: 0.9;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 18px; }

img { max-width: 100%; display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 0.92rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s;
  background: var(--surface-2); color: var(--text); border-color: var(--border);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: #fff; border: 0;
  background: linear-gradient(120deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 8px 22px -8px var(--ring);
}
.btn-primary:hover { box-shadow: 0 12px 28px -8px var(--ring); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 11px; font-size: 0.82rem; border-radius: 10px; }
.btn-danger { color: #fff; background: linear-gradient(120deg, #ef4444, #f43f5e); border: 0; }

/* =========================================================
   Header / nav
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(1.4);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 18px; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.32rem; letter-spacing: -0.03em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: conic-gradient(from 200deg, var(--brand-1), var(--brand-2), var(--brand-3), var(--brand-1));
  box-shadow: 0 6px 18px -6px var(--ring);
}
.brand .word {
  background: linear-gradient(100deg, var(--brand-1), var(--brand-2) 55%, var(--brand-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav-links { display: flex; gap: 4px; margin-left: 8px; flex: 1; flex-wrap: wrap; }
.nav-links a {
  padding: 8px 12px; border-radius: 10px; font-size: 0.9rem; font-weight: 500; color: var(--muted);
  transition: background .15s, color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface); }

.nav-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; color: var(--text);
  font-size: 1.05rem; transition: transform .15s, background .2s;
}
.icon-btn:hover { transform: translateY(-1px); }

.menu-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 18px 16px;
    transform: translateY(-130%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px; }
  .menu-toggle { display: grid; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero { padding: 54px 0 30px; position: relative; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.05; letter-spacing: -0.035em;
  margin: 0 0 14px; font-weight: 800; max-width: 16ch;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--brand-1), var(--brand-2) 50%, var(--brand-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); font-size: 1.08rem; max-width: 56ch; margin: 0 0 22px; }
.hero-search { display: flex; gap: 10px; max-width: 540px; }
.hero-search input {
  flex: 1; padding: 13px 16px; border-radius: 13px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 1rem;
}
.hero-search input:focus { outline: 3px solid var(--ring); outline-offset: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-size: 0.82rem; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 500;
}
.chip:hover { color: var(--text); }

/* =========================================================
   Section heads
   ========================================================= */
.section { padding: 26px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.section-head h2 { font-size: 1.3rem; margin: 0; letter-spacing: -0.02em; display: flex; align-items: center; gap: 9px; }
.section-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent, var(--brand-2)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, var(--brand-2)) 22%, transparent); }
.section-head a.more { font-size: 0.86rem; color: var(--muted); font-weight: 600; }
.section-head a.more:hover { color: var(--text); }

/* =========================================================
   Home grid of category panels
   ========================================================= */
.home-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 760px) { .home-grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 16px 8px; backdrop-filter: blur(8px); box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.panel::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.panel-head .title { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.02rem; }
.panel-head .badge { font-size: 0.78rem; color: var(--accent); font-weight: 700; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-top: 1px solid var(--border); }
.post-list li:first-child { border-top: 0; }
.post-list a { display: flex; align-items: baseline; gap: 8px; padding: 11px 4px; transition: padding-left .15s; }
.post-list a:hover { padding-left: 9px; }
.post-list .ptitle { flex: 1; font-size: 0.93rem; color: var(--text); }
.post-list .ptag {
  font-size: 0.66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 6px; white-space: nowrap;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.post-list .new {
  font-size: 0.6rem; font-weight: 900; color: #fff; background: #ef4444;
  padding: 1px 5px; border-radius: 5px; letter-spacing: .05em; animation: blink 1.4s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.35; } }
.post-list .pdate { font-size: 0.74rem; color: var(--faint); white-space: nowrap; }

/* accent classes — the only place colour coding is wired up */
.accent-violet  { --accent: var(--c-violet);  }
.accent-emerald { --accent: var(--c-emerald); }
.accent-amber   { --accent: var(--c-amber);   }
.accent-sky     { --accent: var(--c-sky);     }
.accent-rose    { --accent: var(--c-rose);    }
.accent-teal    { --accent: var(--c-teal);    }

/* =========================================================
   Generic card grid (lists, pdfs, quizzes, CA)
   ========================================================= */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; backdrop-filter: blur(8px); box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s; position: relative; overflow: hidden;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent, var(--brand-2)) 50%, var(--border));
  box-shadow: 0 22px 44px -20px color-mix(in srgb, var(--accent, var(--brand-2)) 55%, transparent);
}
.card .kicker { font-size: 0.7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent, var(--brand-2)); }
.card h3 { font-size: 1.04rem; margin: 8px 0 6px; letter-spacing: -0.01em; line-height: 1.3; }
.card p { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }
.card .meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; color: var(--faint); }

/* =========================================================
   Two column layout (list page + sidebar)
   ========================================================= */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
@media (max-width: 940px) { .layout { grid-template-columns: 1fr; } }
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 80px; }
@media (max-width: 940px) { .sidebar { position: static; } }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.widget h4 { margin: 0 0 10px; font-size: 0.95rem; }

/* =========================================================
   Single post
   ========================================================= */
.post-head { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.post-head h1 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 8px 0 10px; letter-spacing: -0.02em; }
.post-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 0.85rem; }
.post-body { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.post-body h2, .post-body h3 { letter-spacing: -0.01em; }
.post-body table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.92rem; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.post-body th { background: var(--bg-tint); }
.post-body a { color: var(--brand-1); font-weight: 600; text-decoration: underline; }
.links-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* =========================================================
   Tools
   ========================================================= */
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.tool h3 { margin: 0 0 4px; }
.tool .hint { color: var(--muted); font-size: 0.86rem; margin: 0 0 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  padding: 11px 13px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 0.95rem; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--ring); outline-offset: 1px; }
.result-box { margin-top: 12px; padding: 14px 16px; border-radius: 12px; background: var(--bg-tint); border: 1px solid var(--border); font-size: 0.95rem; }
.result-box strong { color: var(--brand-1); }

/* =========================================================
   Quiz player
   ========================================================= */
.quiz-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.quiz-q { font-size: 1.1rem; font-weight: 600; margin: 0 0 16px; }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  text-align: left; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 0.96rem; cursor: pointer; transition: border-color .15s, background .15s;
}
.quiz-opt:hover { border-color: var(--ring); }
.quiz-opt.correct { border-color: var(--c-emerald); background: color-mix(in srgb, var(--c-emerald) 14%, transparent); }
.quiz-opt.wrong { border-color: var(--c-rose); background: color-mix(in srgb, var(--c-rose) 14%, transparent); }
.quiz-opt:disabled { cursor: default; }
.quiz-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; gap: 12px; }
.quiz-expl { margin-top: 14px; padding: 12px 14px; border-radius: 11px; background: var(--bg-tint); border: 1px solid var(--border); font-size: 0.9rem; color: var(--muted); }
.quiz-progress { font-size: 0.85rem; color: var(--faint); }

/* =========================================================
   Ads + alerts
   ========================================================= */
.ad { margin: 18px 0; border-radius: 14px; overflow: hidden; }
.ad--placeholder {
  display: grid; place-items: center; min-height: 90px; font-size: 0.78rem; letter-spacing: .04em;
  color: var(--faint); background: repeating-linear-gradient(45deg, var(--bg-tint), var(--bg-tint) 12px, transparent 12px, transparent 24px);
  border: 1px dashed var(--border);
}
.ad--sidebar.ad--placeholder { min-height: 250px; }

.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 0.9rem; border: 1px solid var(--border); }
.alert-info { background: color-mix(in srgb, var(--brand-1) 10%, var(--surface)); }
.alert-success { background: color-mix(in srgb, var(--c-emerald) 14%, transparent); border-color: var(--c-emerald); }
.alert-error { background: color-mix(in srgb, var(--c-rose) 14%, transparent); border-color: var(--c-rose); }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { margin-top: 40px; border-top: 1px solid var(--border); background: var(--surface); backdrop-filter: blur(10px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; padding: 36px 0 18px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h5 { margin: 0 0 12px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.footer-grid a { display: block; color: var(--muted); font-size: 0.9rem; padding: 4px 0; }
.footer-grid a:hover { color: var(--text); }
.disclaimer { font-size: 0.82rem; color: var(--muted); border-top: 1px solid var(--border); padding: 16px 0; line-height: 1.6; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 14px 0 28px; font-size: 0.82rem; color: var(--faint); }

/* =========================================================
   Pagination
   ========================================================= */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 38px; height: 38px; display: grid; place-items: center; padding: 0 10px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 0.9rem; font-weight: 600;
}
.pager .current { background: linear-gradient(120deg, var(--brand-1), var(--brand-2)); color: #fff; border: 0; }
.pager a:hover { border-color: var(--ring); }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
