/* ECHO Proxy — iOS look and feel.
 * Loaded after each page's own styles. ":root" raises specificity so these rules also win
 * over the style blocks that sit inside <body>. Colors follow Apple's dark-mode system palette;
 * the brand blue stays as the tint color. */
:root {
  --ios-bg: #000000;
  --ios-card: #1C1C1E;
  --ios-card2: #2C2C2E;
  --ios-sep: rgba(84, 84, 88, 0.6);
  --ios-label: #FFFFFF;
  --ios-label2: rgba(235, 235, 245, 0.6);
  --ios-label3: rgba(235, 235, 245, 0.3);
  --ios-fill: rgba(118, 118, 128, 0.24);
  --ios-tint: #1D9BF0;
  --ios-green: #30D158;
  --ios-bar: rgba(22, 22, 24, 0.78);
  color-scheme: dark;
  -webkit-tap-highlight-color: transparent;
}
html, :root body { background: var(--ios-bg); }
/* Never scroll sideways (clip keeps the sticky top bar working, unlike hidden) */
:root, :root body { overflow-x: clip; }

/* Native page transitions between pages (Safari 18.2+, Chrome 126+) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

/* System font on iPhone/iPad */
@supports (-webkit-touch-callout: none) {
  :root body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, Tahoma, sans-serif; }
}

/* Urdu in Noto Sans Arabic: a modern, clean style that reads well in app buttons and lists.
 * Self-hosted (trimmed to Arabic-script letters, 115 KB) so every phone shows the same font;
 * unicode-range plus the :lang(ur) rule mean it downloads only on Urdu pages.
 * Latin text (city names, MTPROTO) stays in the normal font. */
@font-face {
  font-family: "Echo Urdu";
  src: url("/assets/fonts/NotoSansArabic-urdu.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
:root:lang(ur) body {
  font-family: "Inter", "Echo Urdu", Tahoma, sans-serif;
  line-height: 1.75;
}
:root:lang(ur) :is(.hero h1, .onetap-title, .list-head-title, .seo-h h2, h1, h2) { line-height: 1.45; }
:root:lang(ur) .page-hero h1 { margin-bottom: 12px; }

/* Controls highlight like iOS when pressed */
:root a, :root button { -webkit-tap-highlight-color: transparent; }
:root button, :root .px-go, :root .btab { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
:root .px-go:active, :root .opts-btn:active, :root .lang-btn:active, :root .more button:active,
:root .country-card:active, :root .foot-navlink:active, :root .faq-item summary:active,
:root .foot-langs a:active, :root .foot-powered:active, :root .px-copy:active { opacity: .55; transform: none; }

/* ---------- Navigation bar ---------- */
:root .accent-bar { display: none; }
:root .topbar {
  background: var(--ios-bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--ios-sep);
  padding: calc(6px + env(safe-area-inset-top, 0px)) 16px 6px;
}
:root .lang-btn { background: var(--ios-fill); border: 0; height: 32px; border-radius: 16px; }

/* ---------- Large title ---------- */
:root .hero { flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 20px 12px; }
:root .hero h1 {
  font-size: 2.125rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.12;
  background: none; -webkit-text-fill-color: var(--ios-label); color: var(--ios-label);
}
:root .hero-live { font-size: .8125rem; color: var(--ios-green); }
:root .hero h1 .h1-date { margin-top: 8px !important; font-size: .8125rem !important; } /* inline styles from the edge script */

/* ---------- One-tap card ---------- */
:root .onetap { background: var(--ios-card); border: 0; border-radius: 20px; box-shadow: none; padding: 20px 16px 16px; }
:root .onetap-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
:root .onetap-btn { background: var(--ios-tint); border-radius: 14px; min-height: 52px; font-size: 1.0625rem; font-weight: 700; box-shadow: none; }
:root .onetap-btn:active { opacity: .7; transform: none; }
:root .onetap-meta { color: var(--ios-label2); }

/* Three steps as an iOS grouped list */
:root .onetap-steps { display: flex; flex-direction: column; gap: 0; background: var(--ios-card); border-radius: 14px; overflow: hidden; }
:root .onetap-step {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-align: start;
  background: none; border: 0; border-radius: 0; border-bottom: .5px solid var(--ios-sep);
  font-size: .9375rem; color: var(--ios-label);
}
:root .onetap-step:last-child { border-bottom: 0; }
:root .onetap-step b { flex-shrink: 0; margin: 0; width: 28px; height: 28px; background: var(--ios-tint); color: #fff; font-size: .8125rem; }

/* ---------- Proxy list ---------- */
:root .list-head-title { font-size: 1.1875rem; font-weight: 800; letter-spacing: -.02em; color: var(--ios-label); }
:root .opts-btn { background: var(--ios-fill); border: 0; border-radius: 16px; min-height: 32px; padding: 6px 12px; color: var(--ios-tint); font-weight: 600; }
:root .opts-btn[aria-expanded="true"] { background: var(--ios-tint); color: #fff; border: 0; }

:root #proxy-list .px { background: var(--ios-card); border: 0; border-radius: 18px; box-shadow: none; }
:root #proxy-list .px:hover { border: 0; transform: none; box-shadow: none; }
:root #proxy-list .px.fastest { background: var(--ios-card); box-shadow: inset 0 0 0 1.5px rgba(29, 155, 240, .55); }
:root #proxy-list .px.fastest::before { background: var(--ios-tint); box-shadow: none; border-radius: 6px; letter-spacing: .02em; }
:root .px-name { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; color: var(--ios-label); }
:root .px-sub { font-size: .8125rem; color: var(--ios-label2); font-weight: 400; }
:root .px-bottom { border-top: 0; padding-top: 6px; }
:root .px-stats { font-size: .8125rem; color: var(--ios-label2); }
:root .px-on { color: var(--ios-green); }
:root .px-go {
  background: var(--ios-tint); color: #fff; border: 0; border-radius: 999px; box-shadow: none;
  min-height: 34px; padding: 6px 16px; font-size: .9375rem; font-weight: 700;
}
:root .px-go:hover { box-shadow: none; transform: none; }
:root .px-copy { border: 0; background: var(--ios-fill); color: var(--ios-tint); width: 34px; height: 34px; }
/* QR now lives in the proxy sheet; keeps the row as clean as an iOS list cell */
:root #proxy-list .px-qr-btn { display: none; }
:root #proxy-list .px-expand { border: 0; }
:root .more button { background: var(--ios-card); border: 0; border-radius: 14px; color: var(--ios-tint); font-weight: 600; }
:root .echo-card { background: var(--ios-card); border: 0; border-radius: 18px; }

/* ---------- Content sections ---------- */
:root .seo-section p { color: rgba(235, 235, 245, .72); }
:root .seo-section p strong { color: var(--ios-label); }
:root .seo-h h2 { font-size: 1.375rem; font-weight: 800; letter-spacing: -.02em; color: var(--ios-label); }
:root .seo-h-icon { background: var(--ios-card); border: 0; color: var(--ios-tint); }
:root .seo-feature { background: var(--ios-card); border: 0; }
:root .seo-feature:hover { transform: none; }
:root .vs-card { background: var(--ios-card); border: 0; }
:root .vs-card.recommended { background: var(--ios-card); box-shadow: inset 0 0 0 1.5px rgba(29, 155, 240, .55); }
:root .vs-card.recommended::before { border-radius: 6px; }
:root .vs-desc { color: var(--ios-label2); font-size: .875rem; }

/* Grouped lists: steps, country links, FAQ */
:root .steps { gap: 0; background: var(--ios-card); border-radius: 14px; overflow: hidden; }
:root .step-item { background: none; border: 0; border-radius: 0; border-bottom: .5px solid var(--ios-sep); }
:root .step-item:last-child { border-bottom: 0; }
:root .step-num { background: var(--ios-tint); }
:root .country-grid { grid-template-columns: 1fr; gap: 0; background: var(--ios-card); border-radius: 14px; overflow: hidden; }
/* Standalone country cards (country pages) are iOS cards; inside .country-grid they form a grouped list */
:root .country-card { background: var(--ios-card); border: 0; border-radius: 14px; }
:root .country-card:hover { transform: none; }
:root .country-grid .country-card { background: none; border-radius: 0; border-bottom: .5px solid var(--ios-sep); }
:root .country-grid .country-card:last-child { border-bottom: 0; }
:root .country-grid .country-card:hover { background: rgba(255, 255, 255, .03); }
:root .faq { background: var(--ios-card); border-radius: 14px; overflow: hidden; }
:root .faq-item { background: none; border: 0; border-radius: 0; margin: 0; border-bottom: .5px solid var(--ios-sep); }
:root .faq-item:last-child { border-bottom: 0; }
:root .faq-item summary { font-weight: 500; font-size: 1rem; }
:root .faq-item summary::after { content: '›'; font-size: 1.5rem; color: var(--ios-label3); transform: rotate(90deg); }
:root .faq-item[open] summary::after { transform: rotate(-90deg); }

/* ---------- Footer ---------- */
:root .foot-navlink { background: var(--ios-card) !important; border: 0 !important; } /* one has inline colors */
:root .foot-langs-wrap { background: var(--ios-card); border: 0; }
:root .foot-langs a { border: 0; background: var(--ios-fill); color: var(--ios-label); }
:root .foot-langs a.current { background: var(--ios-tint); color: #fff; }
:root .foot-powered { background: var(--ios-card); border: 0; }

/* ---------- Tab bar (iOS style: full width, translucent, hairline on top) ---------- */
:root .bottombar {
  left: 0; right: 0; bottom: 0; transform: none; width: auto; max-width: none;
  border: 0; border-top: .5px solid var(--ios-sep); border-radius: 0; box-shadow: none;
  background: var(--ios-bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  padding: 6px 8px calc(4px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around; gap: 0;
  animation: none; /* the old entrance animation re-applied the centring offset */
}
:root .btab {
  flex: 1; min-width: 0; min-height: 46px; padding: 4px 0 2px; gap: 3px; border-radius: 0;
  background: none; box-shadow: none; color: #8E8E93; font-size: .625rem; font-weight: 500;
}
:root .btab.on { background: none; box-shadow: none; color: var(--ios-tint); }
:root .btab.on::after { display: none; }
:root .btab svg, :root .btab.on svg { width: 26px; height: 26px; transform: none; }
:root .btab:active, :root .btab:active svg { transform: none; opacity: .6; }

/* ---------- Toast as an iOS HUD ---------- */
:root .toast {
  background: rgba(44, 44, 46, .92); color: #fff; border-radius: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}

/* ---------- Sheets (share panel, proxy sheet, language sheet) ---------- */
:root .echo-sheet { background: var(--ios-card); border-color: transparent; }
:root .echo-handle { background: rgba(235, 235, 245, .3); width: 36px; height: 5px; border-radius: 3px; }
:root .lang-sheet { background: var(--ios-card); }

/* ---------- Proxy detail page ---------- */
:root .back-link { color: var(--ios-tint); font-size: 1.0625rem; font-weight: 400; }
:root .back-link:active { opacity: .55; }
:root .hero-card { background: var(--ios-card); border: 0; border-radius: 22px; box-shadow: none; }
:root .stat-card { background: var(--ios-card); border: 0; border-radius: 16px; }
:root .stat-card-label { color: var(--ios-label2); }
:root .btn-connect-big {
  background: var(--ios-tint); border: 0; border-radius: 16px; min-height: 56px; box-shadow: none; font-weight: 700;
}
:root .btn-connect-big:hover { box-shadow: none; transform: none; }
:root .btn-connect-big:active { opacity: .7; transform: none; }
:root .qa-btn { background: var(--ios-card); border: 0; border-radius: 14px; color: var(--ios-tint); font-weight: 600; }
:root .qa-btn:hover { background: var(--ios-card); }
:root .qa-btn:active { opacity: .55; transform: none; }
:root .qa-btn.copied { color: var(--ios-green); }
:root .section-card { background: var(--ios-card); border: 0; border-radius: 18px; }
:root .section-title { color: var(--ios-label2); }
:root .qr-box { box-shadow: none; }
:root .qr-btn { background: var(--ios-fill); border: 0; border-radius: 12px; color: var(--ios-tint); }
:root .uptime-bar-bg { background: var(--ios-fill); }
:root .uptime-bar-fill { background: var(--ios-green); }
/* Device tabs as an iOS segmented control */
:root .howto-tabs { background: var(--ios-fill); border: 0; border-radius: 9px; padding: 2px; gap: 2px; }
:root .howto-tab { border-radius: 7px; color: var(--ios-label); font-weight: 600; }
:root .howto-tab.active { background: #636366 !important; color: #fff !important; box-shadow: 0 3px 8px rgba(0, 0, 0, .25) !important; }
:root .howto-tip { background: var(--ios-fill); border: 0; }
:root .manual-fields { background: var(--ios-card2); border: 0; }
:root .faq { border-bottom: .5px solid var(--ios-sep); }
/* Nearby proxies as a grouped list */
:root .related-grid { gap: 0; }
:root .rel-card { background: none; border: 0; border-radius: 0; border-bottom: .5px solid var(--ios-sep); padding: 12px 2px; }
:root .rel-card:last-child { border-bottom: 0; }
:root .rel-card:hover { background: none; transform: none; }
:root .rel-go { background: var(--ios-fill); color: var(--ios-tint); border-radius: 999px; }
:root .foot-brand, :root .foot-copy { border-color: var(--ios-sep); }
:root .lang-sheet-cancel { background: var(--ios-fill); }
:root .sk-hero { background: var(--ios-card); border: 0; }
:root .sk-flag, :root .sk-line, :root .sk-stat, :root .sk-btn { background: linear-gradient(90deg, #2C2C2E 25%, #3A3A3C 50%, #2C2C2E 75%); background-size: 200% 100%; }

/* ---------- Submit page ---------- */
:root .hero-icon-wrap { background: var(--ios-card); border: 0; }
:root .page-hero h1 { background: none; -webkit-text-fill-color: var(--ios-label); color: var(--ios-label); font-size: 2rem; }
:root .reassure-pill { background: var(--ios-card); border: 0; color: var(--ios-green); }
:root .form-card, :root .help-card, :root .happens { background: var(--ios-card); border: 0; border-radius: 20px; }
:root .section-label-num, :root .help-step-num { background: var(--ios-tint); color: #fff; }
/* Text fields like iOS */
:root .paste-input, :root .form-input, :root .form-select {
  background: var(--ios-card2); border: 0; border-radius: 12px; color: var(--ios-label); font-size: 1rem;
}
:root .paste-input:focus, :root .form-input:focus, :root .form-select:focus { box-shadow: 0 0 0 2px var(--ios-tint); border: 0; }
:root .paste-input.valid { box-shadow: 0 0 0 2px var(--ios-green); }
:root .paste-input::placeholder, :root .form-input::placeholder { color: var(--ios-label3); }
:root .paste-btn { background: var(--ios-fill); border: 0; border-radius: 999px; color: var(--ios-tint); font-weight: 600; }
:root .paste-btn:hover { background: var(--ios-fill); }
:root .paste-btn:active { opacity: .55; }
:root .manual-toggle { background: var(--ios-card2); border: 0; border-radius: 12px; color: var(--ios-label); }
:root .manual-toggle:hover { color: var(--ios-label); }
:root .form-select option { background: var(--ios-card2); }
:root .btn-submit { background: var(--ios-tint); border: 0; border-radius: 16px; box-shadow: none; font-weight: 700; }
:root .btn-submit:hover { box-shadow: none; transform: none; }
:root .btn-submit:active { opacity: .7; transform: none; }
:root .form-msg.error { background: rgba(255, 69, 58, .14); border: 0; color: #FF6961; }
:root .form-msg.success { background: rgba(48, 209, 88, .14); border: 0; color: var(--ios-green); }
:root .help-icon, :root .happens-step-icon { background: var(--ios-fill); }

/* ---------- Blog: index and articles ---------- */
:root .page-hero h1, :root .article-header h1, :root .article h1 {
  background: none; -webkit-text-fill-color: var(--ios-label); color: var(--ios-label);
}
:root .back-link { border: 0; background: none; padding-left: 0; padding-right: 0; }
:root .back-link:hover { background: none; color: var(--ios-tint); }
:root .meta-pill { background: var(--ios-fill); color: var(--ios-label); border: 0; }
:root .meta-pill.neutral { background: var(--ios-fill); color: var(--ios-label2); border: 0; }
:root .article-lead { color: var(--ios-label2); }
/* Reading: iOS body size and colour */
:root .article-body { font-size: 1.0625rem; }
:root .article-body p, :root .article-body li { color: rgba(235, 235, 245, .82); line-height: 1.75; }
:root .article-body strong { color: var(--ios-label); }
:root .article-body h2 { border: 0; padding-left: 0; padding-right: 0; font-size: 1.375rem; letter-spacing: -.02em; color: var(--ios-label); }
:root .article-body h3, :root .article-body h4 { color: var(--ios-label); line-height: 1.35; }
:root .article-body h2 { line-height: 1.3; }
:root .article-body a { color: var(--ios-tint); }
:root .article-body blockquote { background: var(--ios-card); border: 0; border-radius: 14px; }
:root .article-body pre { background: var(--ios-card); border: 0; border-radius: 14px; }
:root .article-body code { background: var(--ios-fill); color: var(--ios-label); }
:root .article-body pre code { background: transparent; color: rgba(235, 235, 245, .82); }
:root .share-row-card { background: var(--ios-card); border: 0; border-radius: 16px; }
:root .share-row-btn { background: var(--ios-fill); border: 0; color: var(--ios-tint); border-radius: 999px; }
:root .share-row-btn:hover { background: var(--ios-fill); color: var(--ios-tint); }
:root .share-row-btn:active { opacity: .55; }
:root .update-box { background: var(--ios-card); border: 0; box-shadow: inset 0 0 0 1px rgba(255, 69, 58, .35); }
:root .update-dot { background: #FF453A; box-shadow: none; }
:root .article-body a.update-box-btn { background: var(--ios-tint); border-radius: 14px; }
:root .cmp-wrap { border: 0; background: var(--ios-card); border-radius: 14px; }
:root .cmp th, :root .cmp td { border-color: var(--ios-sep); }
:root .cmp thead th { background: var(--ios-card2); }
:root .article-body .faq-item, :root .article .faq-item { background: var(--ios-card); border: 0; border-radius: 16px; }
:root .proxy-card { background: var(--ios-card); border: 0; border-radius: 16px; }
:root .proxy-card:hover { transform: none; }
:root .btn-connect { background: var(--ios-tint); border-radius: 999px; }
:root .article-body a.btn-connect, :root .article-body a.btn-connect:hover { color: #fff; }
:root .type-badge { background: var(--ios-fill); color: var(--ios-label2); }
/* Related articles as a grouped list */
:root .related-articles { border-top: 0; }
:root .related-card { background: var(--ios-card); border: 0; border-radius: 0; margin: 0; border-bottom: .5px solid var(--ios-sep); }
:root .related-card:hover { transform: none; background: var(--ios-card); }
:root .related-articles-header + .related-card { border-radius: 16px 16px 0 0; }
:root .related-card:last-child { border-bottom: 0; border-radius: 0 0 16px 16px; }
:root .related-articles-header + .related-card:last-child { border-radius: 16px; }
/* Blog index */
:root .featured { background: var(--ios-card); border: 0; box-shadow: inset 0 0 0 1.5px rgba(29, 155, 240, .45); }
:root .featured:hover { transform: none; box-shadow: inset 0 0 0 1.5px rgba(29, 155, 240, .45); }
:root .featured-icon { background: var(--ios-fill); }
:root .blog-card { background: var(--ios-card); border: 0; }
:root .blog-card:hover { background: var(--ios-card); transform: none; }
:root .blog-card-meta { border-top: .5px solid var(--ios-sep); }
:root .blog-card:active, :root .featured:active, :root .related-card:active { opacity: .7; }
:root .tips { background: var(--ios-card); border: 0; }
:root .tip-item-num { background: var(--ios-tint); color: #fff; }

/* ---------- Country pages ---------- */
/* Titles with an inline gradient (country pages) become solid like iOS large titles */
:root h1[style*="gradient"] { background: none !important; -webkit-text-fill-color: var(--ios-label) !important; color: var(--ios-label) !important; }
:root .proxy-card .btn-secondary-sm { background: var(--ios-fill); border: 0; color: var(--ios-tint); }
:root .proxy-card .btn-secondary-sm:active, :root .btn-connect:active { opacity: .6; }
:root .btn-connect-big { background: var(--ios-tint); }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* RTL: list chevrons point toward the reading direction, as in iOS */
:root[dir="rtl"] .country-arrow svg { transform: scaleX(-1); }
:root[dir="rtl"] .country-card:hover .country-arrow { transform: translateX(-2px); }
/* Persian articles number their steps in Persian digits, matching the headings */
:root:lang(fa) .article-body ol { list-style-type: persian; }
