/* ==========================================================================
   Mahadev ID — mahadevid.it.com
   Theme: "Imperial" — Royal Purple & Gold (distinct from sites 86/87/88)
   Fonts: Bricolage Grotesque (display) + Manrope (body)
   ========================================================================== */

:root {
  --bg:        #120726;
  --bg-2:      #1b0d38;
  --surface:   #23124a;
  --surface-2: #2c1758;
  --gold:      #f6c945;
  --gold-2:    #e0a92b;
  --gold-soft: rgba(246, 201, 69, 0.14);
  --magenta:   #ff2e7e;
  --magenta-2: #d81b64;
  --violet:    #8b5cf6;
  --text:      #f4eeff;
  --muted:     #b8a7d6;
  --line:      rgba(246, 201, 69, 0.20);
  --line-soft: rgba(180, 160, 220, 0.16);
  --ok:        #38d996;
  --shadow:    0 18px 45px rgba(0, 0, 0, 0.45);
  --radius:    16px;
  --wrap:      1180px;
  --head: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 82% -8%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(900px 520px at 6% 4%, rgba(255, 46, 126, 0.14), transparent 58%),
    var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { font-family: var(--head); font-weight: 800; line-height: 1.12; letter-spacing: -0.01em; }

.gold { color: var(--gold); }
.accent { color: var(--magenta); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--head); font-weight: 700; font-size: 1rem;
  padding: 13px 26px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #2a1706; box-shadow: 0 12px 26px rgba(246, 201, 69, 0.28);
}
.btn-pink {
  background: linear-gradient(135deg, var(--magenta), var(--magenta-2));
  color: #fff; box-shadow: 0 12px 26px rgba(255, 46, 126, 0.30);
}
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--line);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(18, 7, 38, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 44px; width: auto; }
.brand .bname { font-family: var(--head); font-weight: 800; font-size: 1.15rem; letter-spacing: .3px; }
.brand .bname i { color: var(--gold); font-style: normal; }

.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a {
  font-family: var(--head); font-weight: 600; font-size: .98rem;
  padding: 9px 16px; border-radius: 999px; color: var(--muted);
  transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--gold-soft); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; color: var(--gold);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--bg-2); padding: 14px 20px 20px;
    border-bottom: 1px solid var(--line); gap: 4px;
  }
  .nav-links.open a { padding: 13px 14px; }
}

/* ---------- Hero ---------- */
.hero { padding: 74px 0 60px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 46px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-soft); color: var(--gold);
  border: 1px solid var(--line); padding: 7px 15px; border-radius: 999px;
  font-family: var(--head); font-weight: 600; font-size: .82rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.7rem); margin: 20px 0 16px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--gold), var(--magenta));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { color: var(--muted); font-size: 1.12rem; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-stats { display: flex; gap: 30px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .s b { font-family: var(--head); font-size: 1.7rem; color: var(--gold); display: block; }
.hero-stats .s span { color: var(--muted); font-size: .9rem; }

.hero-card {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: 22px; padding: 10px;
  box-shadow: var(--shadow); position: relative;
}
.hero-card img { border-radius: 16px; width: 100%; }
.hero-badge {
  position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #2a1706;
  font-family: var(--head); font-weight: 800; padding: 10px 22px; border-radius: 999px;
  font-size: .92rem; box-shadow: 0 12px 24px rgba(0,0,0,.4); white-space: nowrap;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero { padding: 46px 0 40px; }
}

/* ---------- Section shells ---------- */
.section { padding: 66px 0; }
.section.alt { background: linear-gradient(180deg, transparent, rgba(43, 23, 88, 0.35), transparent); }
.sec-head { text-align: center; max-width: 700px; margin: 0 auto 46px; }
.sec-head .pill { margin-bottom: 14px; }
.sec-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.sec-head p { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 22px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 26px; transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line); }
.card .ic {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold); font-size: 1.5rem; margin-bottom: 16px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .98rem; }

/* image gallery cards */
.game-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); position: relative; background: var(--bg-2); }
.game-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.game-card:hover img { transform: scale(1.06); }
.game-card .lbl {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 14px;
  background: linear-gradient(transparent, rgba(18,7,38,.92));
  font-family: var(--head); font-weight: 700;
}

@media (max-width: 900px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid.c4, .grid.c3, .grid.c2 { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; padding: 26px 22px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--head); font-weight: 800; font-size: 1.5rem; color: var(--gold);
  display: block; margin-bottom: 10px;
}
.step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .94rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Tools ---------- */
.tools-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 28px; }
.tab-btn {
  font-family: var(--head); font-weight: 700; font-size: .96rem;
  padding: 11px 20px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line-soft);
  transition: all .15s;
}
.tab-btn.active { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #2a1706; border-color: transparent; }
.tool-panel { display: none; }
.tool-panel.active { display: block; }
.tool-box {
  max-width: 720px; margin: 0 auto;
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: 20px; padding: 30px;
  box-shadow: var(--shadow);
}
.tool-box h3 { font-size: 1.35rem; margin-bottom: 6px; }
.tool-box .hint { color: var(--muted); font-size: .95rem; margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--head); font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: var(--muted); }
.field input, .field select {
  width: 100%; padding: 13px 14px; border-radius: 11px;
  background: var(--bg); border: 1.5px solid var(--line-soft); color: var(--text);
  font-family: var(--body); font-size: 1rem; transition: border-color .15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); }
.tool-result {
  margin-top: 20px; padding: 20px; border-radius: 14px;
  background: var(--gold-soft); border: 1px dashed var(--line);
}
.tool-result .big { font-family: var(--head); font-weight: 800; font-size: 2rem; color: var(--gold); }
.tool-result .rows { display: grid; gap: 6px; margin-top: 10px; color: var(--muted); font-size: .95rem; }
.tool-result .rows b { color: var(--text); }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } .tool-box { padding: 22px; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line-soft); border-radius: 14px; margin-bottom: 12px; overflow: hidden; background: var(--surface); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer; color: var(--text);
  font-family: var(--head); font-weight: 700; font-size: 1.05rem; padding: 18px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq-q span.plus { color: var(--gold); font-size: 1.5rem; transition: transform .2s; flex-shrink: 0; }
.faq-item.open .faq-q span.plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a p { padding: 0 20px 18px; color: var(--muted); }

/* ---------- Content prose ---------- */
.prose { max-width: 860px; margin: 0 auto; }
.prose h2 { font-size: 1.7rem; margin: 34px 0 12px; }
.prose h3 { font-size: 1.28rem; margin: 26px 0 10px; color: var(--gold); }
.prose p { color: var(--muted); margin-bottom: 14px; }
.prose ul, .prose ol { color: var(--muted); margin: 0 0 16px 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.prose a { color: var(--gold); text-decoration: underline; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding: 56px 0 30px; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.page-hero p { color: var(--muted); margin-top: 12px; max-width: 640px; margin-inline: auto; }
.crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.crumbs a { color: var(--gold); }

/* ---------- Auth (login/signup) ---------- */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 40px 0 70px; }
.auth-side h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 14px; }
.auth-side p { color: var(--muted); margin-bottom: 20px; }
.auth-side .ticks { list-style: none; display: grid; gap: 12px; }
.auth-side .ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.auth-side .ticks li::before { content: "✓"; color: var(--ok); font-weight: 800; }
.auth-card {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: 20px; padding: 34px;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.7rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: .95rem; margin-bottom: 22px; }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.auth-alt { text-align: center; color: var(--muted); margin-top: 18px; font-size: .95rem; }
.auth-alt a { color: var(--gold); font-weight: 700; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 14px; text-align: center; }
.checkbox-row { display: flex; gap: 9px; align-items: flex-start; margin: 6px 0 4px; color: var(--muted); font-size: .9rem; }
.checkbox-row input { margin-top: 5px; }
@media (max-width: 820px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { order: 2; } }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--line); border-radius: 22px; padding: 44px 34px; text-align: center;
  box-shadow: var(--shadow);
}
.cta-band h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); margin-bottom: 12px; }
.cta-band p { color: var(--muted); max-width: 560px; margin: 0 auto 22px; }
.cta-band .btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-2); padding: 50px 0 26px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; }
.footer-grid .brand { margin-bottom: 14px; }
.footer-about p { color: var(--muted); font-size: .95rem; max-width: 40ch; }
.footer-col h4 { font-family: var(--head); font-size: 1.05rem; margin-bottom: 14px; color: var(--gold); }
.footer-col ul { list-style: none; display: grid; gap: 9px; }
.footer-col a { color: var(--muted); font-size: .95rem; }
.footer-col a:hover { color: var(--text); }
.age-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  border: 1px solid var(--magenta); color: var(--magenta); border-radius: 999px;
  padding: 6px 14px; font-family: var(--head); font-weight: 700; font-size: .85rem;
}
.footer-bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: .88rem;
}
.disclaimer-strip { background: rgba(255,46,126,.08); border-top: 1px solid rgba(255,46,126,.2); }
.disclaimer-strip p { color: var(--muted); font-size: .85rem; text-align: center; padding: 14px 0; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-40 { margin-top: 40px; }
.disc-note { background: var(--gold-soft); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; color: var(--muted); font-size: .92rem; margin: 20px 0; }
.disc-note strong { color: var(--gold); }
