* { box-sizing: border-box; }
:root {
  --bg: #070b16; --panel: rgba(14, 22, 42, .82); --line: rgba(140, 166, 211, .13);
  --text: #f4f7ff; --muted: #8996b2; --cyan: #35e5e0; --blue: #4b8dff;
}
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--text);
  background: radial-gradient(ellipse at 50% 0%, #111d3b 0%, var(--bg) 42%, #060914 100%);
  font-family: 'Manrope', sans-serif;
}
.ambient { position: fixed; width: 420px; height: 420px; border-radius: 50%; filter: blur(130px); opacity: .12; pointer-events: none; z-index: -1; }
.ambient-one { background: #1768ff; top: 250px; left: -250px; }
.ambient-two { background: #00d9d2; top: 650px; right: -300px; }
.topbar { height: 82px; padding: 0 max(5.5%, calc((100% - 1240px)/2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(151,174,218,.09); background: rgba(7,11,22,.55); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #f5f8ff; text-decoration: none; font-size: 25px; font-weight: 800; letter-spacing: -1.4px; }
.brand-dot { color: var(--cyan); }
.brand-mark { width: 25px; height: 25px; display: flex; align-items: end; gap: 3px; padding: 4px; border: 1px solid rgba(53,229,224,.35); border-radius: 8px; background: rgba(53,229,224,.08); }
.brand-mark span { width: 4px; border-radius: 4px; background: var(--cyan); box-shadow: 0 0 9px rgba(53,229,224,.65); }
.brand-mark span:nth-child(1) { height: 7px; }
.brand-mark span:nth-child(2) { height: 13px; }
.brand-mark span:nth-child(3) { height: 9px; }
.nav-links { display: flex; gap: 38px; height: 100%; align-items: center; }
.nav-links a, .footer a { color: #8e9ab5; text-decoration: none; font-size: 12px; font-weight: 700; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: #eafaff; }
.nav-links a.active { position: relative; }
.nav-links a.active:after { content: ''; position: absolute; height: 2px; bottom: -32px; left: 0; right: 0; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.header-right { display: flex; align-items: center; gap: 18px; }
.status-pill { display: flex; align-items: center; gap: 8px; color: #9caac4; font: 10px 'DM Mono', monospace; letter-spacing: 1px; border: 1px solid var(--line); border-radius: 30px; padding: 9px 12px; }
.status-pill i, .live-dot { width: 6px; height: 6px; border-radius: 50%; background: #45e3b2; box-shadow: 0 0 10px #45e3b2; }
.menu-toggle { display: none; }
main { width: min(1120px, 89%); margin: 0 auto; }
.hero { text-align: center; padding: 76px 0 62px; }
.eyebrow { display: flex; align-items: center; gap: 10px; justify-content: center; color: #7f91b4; font: 10px 'DM Mono', monospace; letter-spacing: 2px; }
.eyebrow-line { width: 22px; height: 1px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
h1 { margin: 19px 0 10px; font-size: clamp(35px, 5vw, 56px); line-height: 1.13; letter-spacing: -2.8px; font-weight: 800; }
h1 span, h2 span { color: var(--cyan); text-shadow: 0 0 28px rgba(53,229,224,.2); }
.hero-copy { margin: 0; color: #8e9bb6; font-size: 14px; }
.ad-slot { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px dashed rgba(136,157,198,.22); border-radius: 9px; background: rgba(255,255,255,.015); color: #63718e; }
.ad-top { max-width: 728px; height: 90px; margin: 36px auto 26px; }
.ad-bottom { max-width: 970px; height: 130px; margin: 55px auto 65px; }
.ad-label { font: 9px 'DM Mono', monospace; letter-spacing: 2px; color: #65738f; }
.ad-hint { font-size: 10px; color: #485773; }
.test-panel { padding: 24px 30px 0; text-align: left; border: 1px solid rgba(113,153,218,.2); border-radius: 18px; background: linear-gradient(145deg, rgba(19,31,58,.94), rgba(10,16,32,.94)); box-shadow: 0 25px 90px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.035); position: relative; overflow: hidden; }
.test-panel:before { content: ''; position: absolute; top: 0; left: 15%; right: 15%; height: 1px; background: linear-gradient(90deg, transparent, rgba(53,229,224,.65), transparent); }
.panel-topline { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.panel-label { display: flex; align-items: center; gap: 9px; color: #c1cce1; font: 10px 'DM Mono', monospace; letter-spacing: 1.4px; }
.server-info { color: #8492ad; font-size: 11px; }
.server-info b { color: var(--cyan); margin: 0 6px; }
.server-icon { color: var(--cyan); font-size: 17px; margin-right: 5px; }
.speed-layout { min-height: 300px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 28px; padding: 18px 4% 20px; }
.gauge-wrap { height: 265px; position: relative; display: flex; justify-content: center; align-items: center; }
.gauge { width: min(100%, 350px); position: absolute; top: 20px; overflow: visible; }
.gauge-track, .gauge-progress { fill: none; stroke-width: 10; stroke-linecap: round; }
.gauge-track { stroke: rgba(107,135,184,.18); }
.gauge-progress { stroke: url(#gaugeGradient); stroke-dasharray: 370; stroke-dashoffset: 370; filter: url(#softGlow); }
.gauge-tick { stroke: #7586a7; stroke-width: 2; opacity: .65; }
.gauge-needle { stroke: url(#gaugeGradient); stroke-width: 3; stroke-linecap: round; filter: url(#softGlow); transform-origin: 160px 184px; transition: transform .15s ease-out; }
.gauge-pivot { fill: #f5fbff; stroke: var(--cyan); stroke-width: 2; filter: url(#softGlow); }
.gauge-glow { position: absolute; width: 170px; height: 100px; top: 90px; border-radius: 50%; background: rgba(30,156,220,.12); filter: blur(45px); }
.gauge-reading { position: relative; z-index: 1; margin-top: 63px; text-align: center; }
.reading-value { font-size: 53px; font-weight: 800; letter-spacing: -3px; line-height: 1; color: #f5fbff; text-shadow: 0 0 30px rgba(53,229,224,.13); }
.reading-decimal { font-size: 28px; color: #b9c8dd; }
.reading-unit { color: var(--cyan); font: 12px 'DM Mono', monospace; margin-top: 5px; }
.reading-caption { color: #71819f; font: 9px 'DM Mono', monospace; letter-spacing: 1.8px; margin-top: 12px; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric-card { min-height: 91px; display: flex; align-items: center; gap: 11px; padding: 15px 13px; border: 1px solid rgba(128,153,196,.13); border-radius: 11px; background: rgba(255,255,255,.025); }
.metric-icon { flex: 0 0 31px; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; font-size: 19px; }
.download-icon { color: #39ded5; background: rgba(53,229,224,.1); }
.upload-icon { color: #659cff; background: rgba(75,141,255,.12); }
.ping-icon { color: #b58aff; background: rgba(165,120,255,.12); }
.jitter-icon { color: #f1b96c; background: rgba(241,185,108,.12); }
.metric-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.metric-copy span { color: #8290ab; font: 9px 'DM Mono', monospace; letter-spacing: 1px; }
.metric-copy strong { font-size: 20px; letter-spacing: -.7px; }
.metric-copy small { font: 10px 'DM Mono', monospace; color: #8492ad; font-weight: 400; }
.metric-status { margin-left: auto; align-self: end; color: #596985; font: 9px 'DM Mono', monospace; }
.panel-footer { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); padding: 18px 2px; gap: 15px; }
.connection-detail { display: flex; align-items: center; gap: 10px; }
.detail-icon { width: 30px; height: 30px; display: grid; place-items: center; color: #8da4cb; background: rgba(117,151,207,.1); border-radius: 8px; font-size: 16px; }
.connection-detail span:last-child { display: flex; flex-direction: column; gap: 4px; }
.connection-detail small { color: #6e7d9b; font: 8px 'DM Mono', monospace; letter-spacing: 1px; }
.connection-detail b { color: #c3cee2; font-size: 10px; font-weight: 600; }
.test-action { margin-top: 27px; }
.start-button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-width: 218px; height: 56px; border: 0; border-radius: 8px; color: #06131d; background: linear-gradient(105deg, #4a9aff, #35e5d7); box-shadow: 0 8px 30px rgba(36,177,221,.2); font: 800 11px 'DM Mono', monospace; letter-spacing: 1.5px; cursor: pointer; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.start-button:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(36,177,221,.32); }
.start-button:active { transform: translateY(0); }
.play-icon { font-size: 10px; }
.button-arrow { font-size: 16px; }
.button-note { color: #687895; font-size: 10px; margin-top: 12px; }
.ui-note { color: #586783; font: 9px 'DM Mono', monospace; letter-spacing: .7px; margin-top: 26px; }
.ui-note span { color: var(--cyan); padding: 0 5px; }
.features-section, .history-section { padding: 45px 0 20px; }
.section-heading, .history-heading { display: flex; justify-content: space-between; align-items: end; gap: 25px; }
.section-heading .eyebrow, .history-heading .eyebrow { justify-content: flex-start; }
.section-heading h2, .history-heading h2 { margin: 13px 0 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -1.5px; }
.section-heading > p { max-width: 340px; margin: 0 0 4px; color: #8290aa; font-size: 12px; line-height: 1.8; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 28px; }
.feature-card { padding: 24px; min-height: 190px; border: 1px solid var(--line); border-radius: 12px; background: rgba(16,25,46,.55); }
.feature-symbol { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-size: 22px; }
.feature-symbol.cyan { color: var(--cyan); background: rgba(53,229,224,.1); }
.feature-symbol.blue { color: #71a4ff; background: rgba(75,141,255,.12); }
.feature-symbol.violet { color: #bc9aff; background: rgba(165,120,255,.12); }
.feature-card h3 { margin: 18px 0 8px; font-size: 14px; }
.feature-card p { color: #8290aa; font-size: 11px; line-height: 1.8; margin: 0; }
.feature-line { height: 2px; background: rgba(255,255,255,.06); margin-top: 20px; }
.feature-line span { display: block; width: 34%; height: 100%; background: var(--cyan); box-shadow: 0 0 9px rgba(53,229,224,.6); }
.history-section { padding-top: 55px; }
.history-tag { color: #7585a3; font: 9px 'DM Mono', monospace; letter-spacing: 1.4px; border: 1px solid var(--line); border-radius: 30px; padding: 9px 12px; }
.history-empty { margin-top: 25px; min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed rgba(136,157,198,.2); border-radius: 12px; background: rgba(255,255,255,.012); }
.empty-icon { color: #657b9f; font-size: 25px; margin-bottom: 8px; }
.history-empty strong { font-size: 12px; }
.history-empty p { color: #7786a2; font-size: 10px; }
.footer { min-height: 85px; padding: 20px max(5.5%, calc((100% - 1240px)/2)); border-top: 1px solid rgba(151,174,218,.08); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-brand { font-size: 19px; }
.footer-brand .brand-mark { transform: scale(.85); }
.footer > span { color: #596783; font: 9px 'DM Mono', monospace; letter-spacing: 1px; }
.footer div { display: flex; gap: 20px; }
@media (max-width: 760px) {
  .topbar { height: 70px; padding: 0 5.5%; }
  .nav-links { display: none; position: absolute; top: 69px; left: 0; right: 0; height: auto; padding: 18px 6%; flex-direction: column; align-items: flex-start; gap: 18px; background: #0b1224; border-bottom: 1px solid var(--line); z-index: 5; }
  .nav-links.open { display: flex; }
  .nav-links a.active:after { display: none; }
  .menu-toggle { display: flex; width: 36px; height: 36px; flex-direction: column; justify-content: center; gap: 5px; align-items: center; border: 1px solid var(--line); background: transparent; border-radius: 8px; }
  .menu-toggle span { width: 14px; height: 1px; background: #d8e5f9; }
  .status-pill { font-size: 8px; padding: 8px 9px; }
  .hero { padding: 58px 0 42px; }
  h1 { letter-spacing: -1.8px; }
  .hero-copy { font-size: 12px; }
  .ad-top { margin: 27px auto 20px; height: 75px; }
  .test-panel { padding: 20px 17px 0; }
  .panel-topline { align-items: flex-start; gap: 12px; flex-direction: column; }
  .server-info { font-size: 10px; }
  .speed-layout { grid-template-columns: 1fr; gap: 0; padding: 5px 0 18px; }
  .gauge-wrap { height: 235px; }
  .gauge { width: min(100%, 330px); top: 7px; }
  .gauge-reading { margin-top: 52px; }
  .metrics { gap: 9px; }
  .metric-card { min-height: 80px; padding: 11px 9px; gap: 8px; }
  .metric-icon { width: 28px; height: 28px; flex-basis: 28px; }
  .metric-copy strong { font-size: 17px; }
  .metric-copy span { font-size: 8px; }
  .metric-status { display: none; }
  .panel-footer { gap: 9px; padding: 15px 0; }
  .connection-detail { gap: 6px; }
  .detail-icon { width: 25px; height: 25px; font-size: 13px; }
  .connection-detail small { font-size: 7px; letter-spacing: .4px; }
  .connection-detail b { font-size: 9px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .section-heading > p { max-width: 100%; }
  .feature-grid { grid-template-columns: 1fr; gap: 10px; }
  .feature-card { min-height: 0; padding: 19px; }
  .feature-card h3 { margin-top: 13px; }
  .feature-line { margin-top: 14px; }
  .history-heading { align-items: flex-start; }
  .history-tag { font-size: 8px; }
  .ad-bottom { height: 100px; margin: 40px auto 45px; }
  .footer { padding: 22px 5.5%; flex-wrap: wrap; }
  .footer > span { order: 3; width: 100%; text-align: center; }
}
/* Opterik top navigation */
.opterik-topbar { display: flex; align-items: center; padding: 8px max(5.5%, calc((100% - 1240px)/2)); background: rgba(7,11,22,.6); border-bottom: 1px solid rgba(151,174,218,.08); }
.opterik-back { color: #9caac4; text-decoration: none; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.opterik-back:hover { color: #eafaff; }

/* Adsterra containers */
.adsterra-wrap { display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 1.5rem auto; overflow: hidden; }
.adsterra-wrap::before { content: "Advertisement"; font: 9px 'DM Mono', monospace; letter-spacing: 2px; color: #65738f; margin-bottom: 4px; }
.ad-728x90 { width: 728px; max-width: 100%; height: 90px; }
.ad-320x50 { width: 320px; max-width: 100%; height: 50px; }
.ad-300x250 { width: 300px; max-width: 100%; height: 250px; }
.ad-468x60 { width: 468px; max-width: 100%; height: 60px; }
.ad-160x600 { width: 160px; height: 600px; }
.ad-160x300 { width: 160px; height: 300px; }
.ad-native { width: 100%; min-height: 120px; }
.desktop-only { display: flex; }
.mobile-only { display: none; }

.ad-sidebar-fixed { position: fixed; top: 110px; z-index: 1; }
.ad-sidebar-right { right: calc((100% - 1120px)/2 - 180px); }
.ad-sidebar-left { left: calc((100% - 1120px)/2 - 180px); }

@media (max-width: 1450px) {
  .ad-sidebar-fixed { display: none !important; }
}

@media (max-width: 760px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .ad-728x90, .ad-468x60, .ad-160x600, .ad-160x300 { display: none !important; }
  .opterik-topbar { padding: 8px 5.5%; }
}

@media (max-width: 390px) {
  main { width: 92%; }
  .status-pill { letter-spacing: .4px; }
  .panel-footer { grid-template-columns: 1fr 1fr; }
  .connection-detail:last-child { display: none; }
  .reading-value { font-size: 47px; }
  .metric-card { gap: 6px; }
  .metric-copy strong { font-size: 16px; }
}

@media (max-width: 390px) { .ad-320x50 { width: 100%; } }
