/* IsItDown — dark premium theme. Plain CSS, no build step. */
:root {
  --bg: #070b12;
  --bg2: #0b111b;
  --card: rgba(255, 255, 255, 0.035);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #e8edf5;
  --muted: #8b94a7;
  --accent: #22d3ee;
  --accent2: #3b82f6;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --radius: 16px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { 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;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(600px 300px at 15% -5%, rgba(34, 211, 238, 0.08), transparent),
    radial-gradient(700px 350px at 85% 0%, rgba(59, 130, 246, 0.09), transparent);
  background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 11, 18, 0.82);
  border-bottom: 1px solid var(--card-border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.pulse-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--muted); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
@media (max-width: 640px) { .nav-links { gap: 14px; } .nav-links a { font-size: 0.85rem; } .lang-select { max-width: 110px; font-size: 0.78rem; padding: 7px 6px; } }

/* ---------- Ad slots ---------- */
.ad-slot {
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
  text-align: center;
  padding: 18px 12px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 26px auto;
  max-width: var(--maxw);
}
.ad-slot.leaderboard { min-height: 90px; display: flex; align-items: center; justify-content: center; }
.ad-slot.incontent { max-width: 720px; }
.ad-slot.inarticle { max-width: 720px; }
.ad-label { display: block; font-size: 0.65rem; opacity: 0.7; margin-bottom: 4px; }

/* ---------- AdSense: sticky footer anchor ---------- */
.ad-anchor {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: rgba(9, 14, 24, 0.97);
  border-top: 1px solid #1c2942;
  padding: 6px 44px 8px 12px;
  text-align: center;
}
.ad-anchor .ad-label { margin-bottom: 2px; }
.ad-anchor-body { max-width: 970px; margin: 0 auto; min-height: 50px; max-height: 110px; overflow: hidden; }
.ad-anchor-close {
  position: absolute; top: 2px; right: 6px;
  background: none; border: none; color: #8b94a7;
  font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.ad-anchor-close:hover { color: #fff; }
body.ad-anchor-on { padding-bottom: 120px; }
/* When ads are live (real publisher ID), drop the dashed placeholder chrome. */
body.ads-live .ad-slot {
  border: none; background: none; padding: 0; margin: 18px auto;
  text-transform: none; letter-spacing: normal; font-size: 1rem; color: inherit;
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 64px 20px 30px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.hero h1 .grad {
  background: linear-gradient(92deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub { color: var(--muted); margin: 14px auto 0; max-width: 560px; font-size: 1.05rem; }
.check-form { display: flex; gap: 10px; max-width: 640px; margin: 28px auto 0; }
.check-form input {
  flex: 1; padding: 15px 18px; font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border); border-radius: 12px; color: var(--text);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}
.check-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15); }
.check-form input::placeholder { color: #5b6478; }
.btn {
  padding: 15px 28px; font-size: 1rem; font-weight: 700; cursor: pointer;
  color: #04121a; border: none; border-radius: 12px;
  background: linear-gradient(92deg, var(--accent), var(--accent2));
  transition: transform 0.15s, filter 0.15s; white-space: nowrap;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.quick-label { margin-top: 26px; color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.platform-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--card-border);
  color: var(--text); font-size: 0.9rem; font-weight: 600;
  transition: border-color 0.2s, transform 0.15s;
}
.chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.chip .mono {
  width: 24px; height: 24px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 800; color: #04121a;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

/* ---------- Results ---------- */
.results { max-width: 760px; margin: 10px auto 0; padding: 0 20px; display: none; }
.results.show { display: block; animation: fadeUp 0.4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.verdict {
  border-radius: var(--radius); padding: 26px 22px; text-align: center;
  border: 1px solid var(--card-border); background: var(--card); margin-bottom: 16px;
}
.verdict .v-icon { font-size: 2.6rem; line-height: 1; }
.verdict h2 { font-size: 1.7rem; margin: 8px 0 4px; letter-spacing: -0.01em; }
.verdict p { color: var(--muted); font-size: 0.95rem; word-break: break-all; }
.verdict p.v-note { margin-top: 8px; word-break: normal; max-width: 560px; margin-left: auto; margin-right: auto; }
.verdict.up { border-color: rgba(34, 197, 94, 0.45); background: rgba(34, 197, 94, 0.07); }
.verdict.up h2 { color: var(--green); }
.verdict.down { border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.07); }
.verdict.down h2 { color: var(--red); }
.verdict.error { border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.07); }
.verdict.error h2 { color: var(--amber); }
.metric { background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.metric summary {
  list-style: none; cursor: pointer; padding: 15px 18px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-weight: 600; user-select: none;
}
.metric summary::-webkit-details-marker { display: none; }
.metric summary::after { content: "▾"; color: var(--muted); transition: transform 0.2s; }
.metric[open] summary::after { transform: rotate(180deg); }
.metric summary:hover { background: rgba(255, 255, 255, 0.02); }
.metric .m-val { color: var(--accent); font-weight: 700; font-size: 0.95rem; text-align: right; }
.metric .m-body { padding: 4px 18px 18px; color: var(--muted); font-size: 0.92rem; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 8px; }
.kv div { background: rgba(255, 255, 255, 0.03); border-radius: 8px; padding: 10px 12px; }
.kv span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }
.kv b { color: var(--text); font-size: 1rem; word-break: break-all; }
.hop { padding: 8px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.08); font-size: 0.88rem; word-break: break-all; }
.hop:last-child { border-bottom: none; }
.hop .code { display: inline-block; min-width: 44px; text-align: center; font-weight: 700; font-size: 0.78rem; border-radius: 6px; padding: 2px 6px; margin-right: 8px; background: rgba(34, 211, 238, 0.15); color: var(--accent); }
.spinner { text-align: center; padding: 30px; color: var(--muted); }
.spinner::after { content: ""; display: inline-block; width: 26px; height: 26px; margin-left: 10px; vertical-align: -6px; border: 3px solid rgba(255, 255, 255, 0.15); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.err-box { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; border-radius: 12px; padding: 16px 18px; }

/* ---------- Sections ---------- */
.section { padding: 54px 0 10px; }
.section h2.stitle { text-align: center; font-size: 1.7rem; letter-spacing: -0.01em; margin-bottom: 8px; }
.section p.ssub { text-align: center; color: var(--muted); max-width: 600px; margin: 0 auto 28px; }
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.pcard {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 12px;
  padding: 18px 14px; text-align: center; transition: transform 0.2s, border-color 0.2s;
  animation: fadeUp 0.5s ease backwards;
}
.pcard:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, 0.35); }
.pcard .pname { font-weight: 700; margin: 10px 0 4px; }
.pcard .pmeta { font-size: 0.78rem; color: var(--muted); min-height: 1.2em; }
.dot { width: 14px; height: 14px; border-radius: 50%; margin: 0 auto; background: #3a4356; }
.dot.up { background: var(--green); box-shadow: 0 0 12px rgba(34, 197, 94, 0.7); }
.dot.down { background: var(--red); box-shadow: 0 0 12px rgba(239, 68, 68, 0.7); }
.dot.error { background: var(--amber); box-shadow: 0 0 12px rgba(245, 158, 11, 0.7); }
.dot.checking { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tool-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px; transition: transform 0.2s, border-color 0.2s; }
.tool-card:hover { transform: translateY(-3px); border-color: rgba(34, 211, 238, 0.35); }
.tool-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.tool-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }
.tool-card .mini-form { display: flex; gap: 8px; }
.tool-card input {
  flex: 1; min-width: 0; padding: 10px 12px; font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--card-border);
  border-radius: 9px; color: var(--text); outline: none;
}
.tool-card input:focus { border-color: var(--accent); }
.tool-card .btn { padding: 10px 16px; font-size: 0.9rem; border-radius: 9px; }
.tool-card .mini-out { margin-top: 12px; font-size: 0.85rem; color: var(--muted); word-break: break-all; }
.badge { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.badge.live { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge.soon { background: rgba(245, 158, 11, 0.15); color: var(--amber); }

/* ---------- Content pages ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 46px 20px 30px; }
.page h1 { font-size: 2rem; letter-spacing: -0.01em; margin-bottom: 18px; }
.page h2 { font-size: 1.25rem; margin: 26px 0 10px; }
.page p, .page li { color: #c4ccdb; margin-bottom: 12px; }
.page ul { padding-left: 22px; }
.contact-form { display: grid; gap: 12px; margin-top: 18px; }
.contact-form input, .contact-form textarea, .contact-form select {
  padding: 13px 15px; font-size: 1rem; font-family: inherit;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--card-border);
  border-radius: 10px; color: var(--text); outline: none; width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--card-border); margin-top: 60px; padding: 34px 0 40px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 26px; justify-content: space-between; align-items: flex-start; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); font-size: 0.9rem; }
.copy { color: #5b6478; font-size: 0.82rem; margin-top: 18px; text-align: center; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Language switcher ---------- */
.lang-wrap { margin-inline-start: 12px; }
.lang-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 9px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 10px;
  cursor: pointer;
  outline: none;
  max-width: 150px;
}
.lang-select:focus { border-color: var(--accent); }
.lang-select option { background: #0b111b; color: var(--text); }

/* ---------- Smart language banner ---------- */
.lang-banner {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  background: rgba(34, 211, 238, 0.08);
  border-bottom: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--text);
  font-size: 0.88rem;
  padding: 10px 48px 10px 16px;
  position: relative;
  text-align: center;
}
.lang-banner[hidden] { display: none; }
.banner-btn {
  background: linear-gradient(92deg, var(--accent), var(--accent2));
  border: none; border-radius: 8px;
  color: #04121a; font-weight: 700; font-size: 0.85rem;
  padding: 7px 14px; cursor: pointer; white-space: nowrap;
}
.banner-btn:hover { filter: brightness(1.1); }
.banner-x {
  position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted);
  font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.banner-x:hover { color: var(--text); }

/* ---------- RTL adjustments ---------- */
[dir="rtl"] .metric .m-val { text-align: left; }
[dir="rtl"] .hop .code { margin-right: 0; margin-left: 8px; }
[dir="rtl"] .spinner::after { margin-left: 0; margin-right: 10px; }
[dir="rtl"] .page ul { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .metric summary::after { transform: scaleX(-1); }
[dir="rtl"] .metric[open] summary::after { transform: rotate(180deg) scaleX(-1); }

@media (max-width: 560px) {
  .check-form { flex-direction: column; }
  .btn { width: 100%; }
  .kv { grid-template-columns: 1fr; }
  .hero { padding-top: 44px; }
}

/* ---------- Speed test ---------- */
.speed-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 28px 24px; max-width: 660px; margin: 0 auto; text-align: center; }
.speed-number { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.speed-number small { font-size: 1rem; color: var(--muted); font-weight: 600; margin-left: 8px; }
.speed-phase { color: var(--muted); min-height: 1.6em; margin: 6px 0 12px; font-size: 0.9rem; }
.speed-bar { height: 8px; background: rgba(127,127,127,.18); border-radius: 99px; overflow: hidden; margin-bottom: 20px; }
.speed-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: 99px; transition: width .25s; }
.speed-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.speed-grid > div { background: rgba(127,127,127,.08); border-radius: 10px; padding: 10px 6px; }
.speed-grid span { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.speed-grid b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.speed-note { font-size: .8rem; color: var(--muted); margin-top: 14px; }
@media (max-width: 560px) {
  .speed-grid { grid-template-columns: repeat(2, 1fr); }
  .speed-number { font-size: 2.6rem; }
}
[dir="rtl"] .speed-number small { margin-left: 0; margin-right: 8px; }

/* ---------- SEO pages: service status, blog, article ---------- */
.breadcrumb { font-size: .85rem; color: #8b94a7; margin-bottom: 14px; }
.breadcrumb a { color: #7dd3fc; }
.svc-card { background: #101828; border: 1px solid #1f2b3f; border-radius: 14px;
  padding: 22px; margin: 20px 0 8px; border-top: 3px solid var(--svc, #22c55e); }
.svc-card .btn { margin-top: 14px; }
.svc-checking { color: #8b94a7; }
.live-verdict { display: flex; gap: 12px; align-items: flex-start; background: #0b1220;
  border-radius: 10px; padding: 14px 16px; }
.live-verdict strong { display: block; font-size: 1.1rem; }
.live-verdict span span, .live-verdict div span { color: #8b94a7; font-size: .88rem; }
.lv-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; flex: none; }
.live-verdict.up .lv-dot { background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.live-verdict.down .lv-dot { background: #ef4444; box-shadow: 0 0 10px #ef4444; }
.live-verdict.err .lv-dot { background: #f59e0b; box-shadow: 0 0 10px #f59e0b; }
.live-note { margin-top: 10px; font-size: .9rem; }
.causes { display: grid; gap: 12px; margin: 6px 0 4px; }
.cause { background: #0d1526; border: 1px solid #1c2942; border-radius: 10px; padding: 14px 16px; }
.cause h3 { font-size: 1rem; margin: 0 0 6px; color: #e8edf5; }
.cause p { margin: 0; font-size: .93rem; }
.steps { padding-left: 22px; }
.steps li { margin-bottom: 10px; }
.faq { display: grid; gap: 10px; }
.faq-item { background: #0d1526; border: 1px solid #1c2942; border-radius: 10px; padding: 4px 16px; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 12px 0; color: #e8edf5; }
.faq-item p { margin: 0 0 14px; font-size: .94rem; }
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 6px; }
.rel-card { background: #0d1526; border: 1px solid #1c2942; border-radius: 10px; padding: 12px 14px;
  display: block; transition: border-color .15s; }
.rel-card:hover { border-color: #38bdf8; }
.rel-card strong { display: block; color: #e8edf5; margin-bottom: 4px; }
.rel-card span { font-size: .82rem; color: #7dd3fc; }
.also-see { margin-top: 18px; font-size: .92rem; color: #8b94a7; }
.blog-grid { display: grid; gap: 14px; margin-top: 18px; }
.blog-card { background: #0d1526; border: 1px solid #1c2942; border-radius: 12px; padding: 18px;
  display: block; transition: border-color .15s, transform .15s; }
.blog-card:hover { border-color: #38bdf8; transform: translateY(-2px); }
.blog-card strong { display: block; font-size: 1.08rem; color: #e8edf5; margin: 6px 0 8px; }
.blog-card p { font-size: .93rem; margin: 0 0 10px; }
.blog-date { font-size: .78rem; color: #8b94a7; }
.blog-more { font-size: .88rem; color: #7dd3fc; }
.byline { color: #8b94a7; font-size: .88rem; margin-top: -8px; }
.lede { font-size: 1.06rem; color: #dbe2ef; }
.article h2 { margin-top: 30px; }
.article code { background: #0b1220; padding: 2px 7px; border-radius: 6px; font-size: .9em; }
.check-cta { background: linear-gradient(135deg, #0e2a1d, #101828); border: 1px solid #22c55e55;
  border-radius: 14px; padding: 22px; margin: 34px 0 10px; text-align: center; }
.check-cta strong { font-size: 1.15rem; }
.check-cta p { margin: 8px 0 16px; }
.foot-svc { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: .85rem; }
.foot-svc a { color: #8b94a7; }
@media (max-width: 640px) {
  .related { grid-template-columns: 1fr 1fr; }
  .svc-card { padding: 16px; }
}
