:root {
  --yellow: #ffe600; --yellow-dim: rgba(255,230,0,.1);
  --bg: #050505; --surface: #0d0d0f; --border: rgba(255,255,255,.09);
  --muted: #a1a1aa; --text: #fafafa;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Poppins','Hind Siliguri',sans-serif; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.yl { color: var(--yellow); }
.muted { color: var(--muted); font-size: 14px; }
.eyebrow { color: var(--yellow); font-size: 12px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 12px; }
.h1 { font-size: clamp(38px, 7vw, 72px); font-weight: 800; line-height: 1.08; margin-bottom: 16px; }
.lede { color: var(--muted); font-size: 16px; max-width: 620px; margin: 0 auto; line-height: 1.7; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; background: rgba(5,5,5,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 800; font-size: 15px; letter-spacing: 1px; }
.brand img { border-radius: 8px; }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.main-nav a:hover { color: var(--yellow); }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; font-family: inherit; transition: all .2s; }
.btn-primary { background: var(--yellow); color: #111; padding: 12px 28px; font-size: 15px; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,230,0,.35); }
.btn-sm { padding: 9px 20px; font-size: 13.5px; }
.btn-ghost { background: rgba(255,255,255,.05); color: #fff; border-color: var(--border); padding: 9px 20px; font-size: 13.5px; }
.btn-ghost:hover, .btn-ghost.active { border-color: var(--yellow); color: var(--yellow); }

/* Hero */
.hero { padding: 70px 0 30px; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { background: rgba(255,255,255,.05); border: 1px solid var(--border); color: #fff; border-radius: 999px;
  padding: 10px 20px; font-size: 13.5px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .2s; }
.pill i { margin-right: 6px; color: var(--yellow); }
.pill:hover { border-color: rgba(255,230,0,.5); }
.pill.active { background: var(--yellow); color: #111; border-color: var(--yellow); }
.pill.active i { color: #111; }

/* Tools */
.tool-panel { display: none; padding: 34px 0 10px; }
.tool-panel.active { display: block; animation: fadeUp .35s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 30px; max-width: 760px; margin: 0 auto; }
.tool-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.tool-card h3 i { color: var(--yellow); margin-right: 8px; }
.tool-card .muted { margin-bottom: 16px; }
.hint { color: var(--yellow); font-size: 12.5px; }
.tool-input { width: 100%; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; color: #fff; font-size: 15px; font-family: inherit; margin-bottom: 12px; resize: vertical; }
.tool-input:focus { outline: none; border-color: rgba(255,230,0,.5); }
.tool-input::placeholder { color: #71717a; }
.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.tool-output-box { background: rgba(255,230,0,.05); border: 1px dashed rgba(255,230,0,.35); border-radius: 14px;
  padding: 16px; font-size: 17px; line-height: 1.9; min-height: 90px; margin-bottom: 12px; white-space: pre-wrap; }
.inv-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inv-item-row { display: grid; grid-template-columns: 1fr 90px 110px 36px; gap: 8px; margin-bottom: 8px; }
.inv-item-row .tool-input { margin-bottom: 0; padding: 10px 12px; font-size: 14px; }
.inv-item-row select.tool-input { padding: 10px 8px; }
.inv-logo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.logo-upload { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.05);
  border: 1px dashed rgba(255,230,0,.4); color: var(--yellow); border-radius: 12px; padding: 10px 18px;
  font-size: 13.5px; font-weight: 600; cursor: pointer; }
#invLogoPrev { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; padding: 4px; }
.color-themes { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ct-label { font-size: 13px; color: var(--muted); }
.ct-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.ct-dot.active { border-color: #fff; box-shadow: 0 0 0 2px var(--yellow); }
.inv-del { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); color: #f87171; border-radius: 10px; font-size: 14px; cursor: pointer; }
.inv-preview { background: #fff; color: #111; border-radius: 16px; padding: 34px; margin-top: 18px; }
.inv-preview h2 { font-size: 24px; font-weight: 800; margin-bottom: 2px; }
.inv-preview table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.inv-preview th, .inv-preview td { border-bottom: 1px solid #e5e5e5; padding: 10px 6px; text-align: left; }
.inv-preview th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #666; }
.inv-preview .inv-total { text-align: right; font-size: 15px; line-height: 2; }
.inv-preview .inv-grand { font-size: 20px; font-weight: 800; }
.prayer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.prayer-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.prayer-controls .tool-input { margin-bottom: 0; }
.prayer-cell { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 16px; padding: 16px; text-align: center; }
.prayer-cell.next { border-color: var(--yellow); background: rgba(255,230,0,.08); }
.prayer-cell .p-name { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.prayer-cell .p-time { font-size: 20px; font-weight: 800; color: var(--yellow); }
.news-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; max-height: 520px; overflow-y: auto; }
.news-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: rgba(255,255,255,.03);
  border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: inherit; transition: border-color .2s; }
.news-item:hover { border-color: rgba(255,230,0,.4); }
.news-item img { width: 84px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.news-item .n-title { font-size: 14.5px; font-weight: 700; line-height: 1.5; margin-bottom: 4px; }
.news-item .n-meta { font-size: 12px; color: var(--muted); }

/* Writing Studio */
.studio-card { max-width: 860px; }
.studio-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.studio-badge { background: linear-gradient(135deg, #ffe600, #ffb800); color: #111; font-size: 11px; font-weight: 800;
  letter-spacing: 1px; padding: 8px 16px; border-radius: 999px; white-space: nowrap; }
.studio-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.how-step { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px; font-size: 13.5px; color: var(--muted); }
.how-step span { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--yellow);
  color: #111; font-weight: 800; font-size: 13px; align-items: center; justify-content: center; margin-right: 8px; }
.how-step b { color: #fff; }
.studio-label { display: block; font-size: 13px; font-weight: 700; color: var(--yellow); margin-bottom: 8px; letter-spacing: .5px; }
.studio-input { font-size: 17px; min-height: 130px; line-height: 1.7; }
.studio-output { font-family: 'Hind Siliguri', sans-serif; font-size: 21px; line-height: 2; min-height: 150px;
  background: rgba(255,230,0,.06); border: 1px solid rgba(255,230,0,.25); }
.studio-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 16px; }
.stat { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px; text-align: center; }
.stat b { display: block; font-size: 24px; color: var(--yellow); }
.stat span { font-size: 12px; color: var(--muted); }
.studio-actions { margin: 6px 0 16px; }
.studio-tips { background: rgba(255,255,255,.02); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
.studio-tips p { font-size: 13px; color: var(--muted); line-height: 1.8; margin: 0; }
.studio-tips i { color: var(--yellow); margin-right: 6px; }
/* Multilingual typing + games */
.studio-tips code { background: rgba(255,230,0,.12); color: var(--yellow); padding: 2px 8px; border-radius: 6px; font-size: 12.5px; }
.lang-pills { justify-content: center; margin-bottom: 20px; }
.lang-pills .pill { font-size: 15px; padding: 10px 24px; }
.practice-wrap { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 24px; }
.practice-title { font-size: 19px; font-weight: 800; margin-bottom: 16px; }
.practice-title i { color: var(--yellow); margin-right: 8px; }
.games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.game-card { background: rgba(255,255,255,.02); border: 1px solid var(--border); border-radius: 20px; padding: 22px; }
.game-card h4 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.game-card h4 i { color: var(--yellow); margin-right: 6px; }
.game-card .muted { margin-bottom: 12px; }
.game-tag { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; background: var(--yellow-dim);
  border: 1px solid rgba(255,230,0,.35); color: var(--yellow); border-radius: 999px; padding: 3px 10px;
  vertical-align: middle; margin-left: 6px; }
.speed-target { font-size: 22px; font-weight: 700; line-height: 1.9; background: rgba(255,230,0,.05);
  border: 1px solid rgba(255,230,0,.2); border-radius: 14px; padding: 16px 18px; margin-bottom: 10px;
  font-family: 'Hind Siliguri', 'Poppins', sans-serif; }
.speed-roman { font-size: 13.5px; color: var(--muted); background: rgba(255,255,255,.03);
  border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; line-height: 1.8; letter-spacing: .3px; }
.speed-roman .ok { color: #4ade80; }
.speed-roman .bad { color: #f87171; background: rgba(248,113,113,.12); border-radius: 3px; }
.speed-roman .cur { border-bottom: 2px solid var(--yellow); }
#speedInput, #rainInput { margin-bottom: 10px; }
.speed-live { min-height: 30px; font-size: 15px; color: var(--muted); margin-bottom: 10px; line-height: 1.8;
  font-family: 'Hind Siliguri', sans-serif; }
.speed-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.speed-result { background: rgba(255,230,0,.07); border: 1px solid rgba(255,230,0,.35); border-radius: 16px;
  padding: 20px; text-align: center; margin-top: 6px; }
.speed-result h5 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.speed-result h5 i { color: var(--yellow); margin-right: 6px; }
.speed-result p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.speed-result .big { font-size: 42px; font-weight: 800; color: var(--yellow); }
.rain-area { position: relative; height: 300px; background: rgba(0,0,0,.35); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; margin-bottom: 10px; }
.rain-idle { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 15px; }
.rain-word { position: absolute; text-align: center; transform: translateX(-50%); transition: none; }
.rain-word .rw-w { font-size: 20px; font-weight: 700; color: #fff; font-family: 'Hind Siliguri', 'Poppins', sans-serif;
  text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.rain-word .rw-r { font-size: 11.5px; color: var(--yellow); opacity: .85; }
.rain-word.zap { animation: zap .25s ease; }
@keyframes zap { 0% { transform: translateX(-50%) scale(1); opacity: 1; } 100% { transform: translateX(-50%) scale(1.8); opacity: 0; } }
.rain-over { position: absolute; inset: 0; background: rgba(5,5,5,.88); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; z-index: 5; }
.rain-over h5 { font-size: 24px; font-weight: 800; }
.rain-over .big { font-size: 46px; font-weight: 800; color: var(--yellow); }
.rain-over p { color: var(--muted); font-size: 14px; }
.seo-para { margin-top: 22px; background: rgba(255,255,255,.02); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 20px; }
.seo-para p { font-size: 13.5px; color: var(--muted); line-height: 1.9; margin: 0; }
.seo-para b { color: #e4e4e7; }
@media (max-width: 720px) {
  .games-grid { grid-template-columns: 1fr; }
  .speed-target { font-size: 19px; }
  .rain-area { height: 260px; }
}
@media (max-width: 640px) {
  .studio-how { grid-template-columns: 1fr; }
  .studio-head { flex-direction: column; }
}
/* Language toggle */
.lang-toggle { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.05);
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-family: inherit; }
.lang-opt { font-size: 13px; font-weight: 700; color: var(--muted); }
.lang-opt.active { color: var(--yellow); }
.lang-sep { color: var(--border); font-size: 12px; }
/* MFS Guide */
.mfs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 6px; }
.mfs-card { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 18px; padding: 20px; display: flex; gap: 16px; transition: border-color .2s, transform .2s; }
.mfs-card:hover { border-color: rgba(255,230,0,.4); transform: translateY(-3px); }
.mfs-logo { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: #1a1a1d; flex: none; }
.mfs-logo-fb { width: 64px; height: 64px; border-radius: 16px; background: linear-gradient(135deg, #ffe600, #b8860b); color: #111; font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; flex: none; }
.mfs-name { font-size: 17px; font-weight: 800; }
.mfs-country { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.mfs-desc { font-size: 13.5px; color: #d4d4d8; line-height: 1.65; margin-bottom: 10px; }
.mfs-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.mfs-tag { font-size: 11.5px; background: rgba(255,230,0,.08); border: 1px solid rgba(255,230,0,.25); color: var(--yellow); border-radius: 999px; padding: 4px 10px; }
.mfs-features { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
@media (max-width: 640px) { .mfs-grid { grid-template-columns: 1fr; } }
.rank-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; max-height: 600px; overflow-y: auto; padding-right: 4px; }
.rank-row { display: grid; grid-template-columns: 44px 40px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 16px; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px; }
.rank-row.top3 { border-color: rgba(255,230,0,.45); background: rgba(255,230,0,.05); }
.rank-num { font-size: 15px; font-weight: 800; color: var(--yellow); }
.rank-row img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #222; }
.rank-name { font-weight: 700; font-size: 14.5px; }
.rank-sub { font-size: 12px; color: var(--muted); }
.rank-val { text-align: right; font-weight: 800; font-size: 14.5px; }
.rank-val .up { color: #4ade80; font-size: 12px; font-weight: 600; display: block; }
.rank-val .down { color: #f87171; font-size: 12px; font-weight: 600; display: block; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #4ade80;
  margin-left: 6px; animation: pulse 1.6s infinite; vertical-align: middle; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.crypto-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.convert-toggle { display: flex; gap: 10px; margin-bottom: 16px; }
/* Currency */
.fx-converter { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 18px; padding: 20px; margin-bottom: 20px; }
.fx-row { display: grid; grid-template-columns: 1fr 1fr auto 1fr; gap: 10px; align-items: center; }
.fx-swap { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,230,0,.4); background: rgba(255,230,0,.1);
  color: var(--yellow); font-size: 16px; cursor: pointer; transition: transform .3s; }
.fx-swap:hover { transform: rotate(180deg); }
.fx-result { text-align: center; font-size: 30px; font-weight: 800; color: var(--yellow); margin-top: 16px; min-height: 44px; }
.fx-result small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 4px; }
.fx-subhead { font-size: 15px; font-weight: 700; margin: 6px 0 10px; }
@media (max-width: 640px) { .fx-row { grid-template-columns: 1fr 1fr; } .fx-swap { grid-column: 1 / -1; margin: 0 auto; } }

/* Footer + toast */
.footer { border-top: 1px solid var(--border); padding: 34px 0; margin-top: 50px; }
.footer p { margin-bottom: 6px; }
.seo-content { max-width: 860px; margin: 0 auto 10px; }
.seo-content h2 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.seo-content h3 { font-size: 17px; font-weight: 700; margin: 18px 0 8px; color: var(--yellow); }
.seo-content p { color: var(--muted); font-size: 14.5px; line-height: 1.9; }
.seo-content strong { color: #fff; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: #1a1a1d;
  border: 1px solid rgba(255,230,0,.4); color: #fff; padding: 12px 24px; border-radius: 999px; font-size: 14px;
  font-weight: 600; opacity: 0; transition: all .3s; z-index: 200; pointer-events: none; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 640px) {
  .main-nav { display: none; }
  .tool-card { padding: 22px 18px; }
  .inv-row2 { grid-template-columns: 1fr; }
  .inv-item-row { grid-template-columns: 1fr 64px 84px 32px; }
  .prayer-grid { grid-template-columns: repeat(2, 1fr); }
  .inv-preview { padding: 22px 16px; }
  .rank-row { grid-template-columns: 34px 1fr auto; }
  .rank-row img { display: none; }
  #toolPills { justify-content: center; }
  #toolPills .pill { font-size: 12px; padding: 8px 14px; }
}
@media print {
  body * { visibility: hidden; }
  .inv-preview, .inv-preview * { visibility: visible; }
  .inv-preview { position: absolute; left: 0; top: 0; width: 100%; margin: 0; border-radius: 0; }
}
