@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap");

:root {
  --blue: #1e88e5;
  --orange: #ff8f00;
  --text: #e6eef6;
  --bg: #0b1220;
  --card: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.18);
  --white-30: rgba(255, 255, 255, 0.30);
  --white-10: rgba(255, 255, 255, 0.10);
  --blue-16: rgba(30, 136, 229, 0.16);
  --blue-10: rgba(30, 136, 229, 0.10);
  --blue-06: rgba(30, 136, 229, 0.06);
  --orange-20: rgba(255, 143, 0, 0.20);
  --orange-12: rgba(255, 143, 0, 0.12);
  --orange-08: rgba(255, 143, 0, 0.08);
}

/* Global Reset */
* { box-sizing: border-box; }

body {
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  margin: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, var(--orange-08), transparent 60%),
    radial-gradient(900px 500px at 100% 20%, var(--blue-06), transparent 60%),
    radial-gradient(2000px 800px at 50% 120%, rgba(17, 25, 40, 0.85), rgba(11, 18, 32, 0.95)),
    var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated background elements: optimized for GPU */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: -1; will-change: transform, opacity; backface-visibility: hidden; }

/* Grid layer moved to ::before and translated via transform instead of background-position */
.fx-grid { overflow: hidden; }
.fx-grid::before {
  content: "";
  position: absolute; inset: -20% -20% -20% -20%;
  background-image:
    linear-gradient(var(--white-10) 1px, transparent 1px),
    linear-gradient(90deg, var(--white-10) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  opacity: 0.4;
  transform: translate3d(0,0,0);
  animation: gridDrift 26s linear infinite;
  will-change: transform;
}

.fx-noise {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='0.03'/></svg>");
  mix-blend-mode: soft-light;
}

/* Constrain orbs to smaller layers and remove heavy blur filter */
.fx-orb { position: fixed; width: 60vmin; height: 60vmin; border-radius: 50%; opacity: 0.5; will-change: transform; }
.orb-blue {
  left: -10vmin; top: 5vmin;
  background: radial-gradient(closest-side, var(--blue-16) 0%, rgba(0,0,0,0) 70%);
  box-shadow: 0 0 120px rgba(30,136,229,0.35), 0 0 200px rgba(30,136,229,0.25);
  animation: orbDrift1 30s ease-in-out infinite;
}
.orb-orange {
  right: -8vmin; top: -6vmin;
  background: radial-gradient(closest-side, var(--orange-20) 0%, rgba(0,0,0,0) 70%);
  box-shadow: 0 0 140px rgba(255,143,0,0.30), 0 0 220px rgba(255,143,0,0.22);
  animation: orbDrift2 36s ease-in-out infinite;
}

@keyframes gridDrift { 0% { transform: translate3d(0,0,0); } 100% { transform: translate3d(40px, 40px, 0); } }
@keyframes orbDrift1 {
  0%, 100% { transform: translate3d(0,0,0); }
  25% { transform: translate3d(15px, -8px, 0); }
  50% { transform: translate3d(-8px, 15px, 0); }
  75% { transform: translate3d(12px, 10px, 0); }
}
@keyframes orbDrift2 {
  0%, 100% { transform: translate3d(0,0,0); }
  25% { transform: translate3d(-12px, 12px, 0); }
  50% { transform: translate3d(12px, -10px, 0); }
  75% { transform: translate3d(-16px, 6px, 0); }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fx-grid::before, .orb-blue, .orb-orange { animation: none !important; transform: none !important; }
}

.fa-magnifying-glass { color: white; }

.flex-center { display: flex; justify-content: center; }

.header-center { align-items: center; flex-direction: column; margin-top: 10%; }

.left-margin { margin: 0px 16px; }

#uv-frame {
  border: none;
  position: absolute;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background-color: #111;
}

#uv-error { color: #ff6666 !important; white-space: pre-wrap; }

#uv-error-code {
  font-size: 12px;
  color: var(--blue);
  font-family: "Courier New", Courier, monospace;
}

#uv-register-sw { color: white; background: #555555; cursor: pointer; outline: none; border: none; border-radius: 6px; padding: 16px 20px; line-height: 16px; display: none; }
#uv-register-sw:active { background: #333333; }
#uv-register-sw.show { display: block; }

.logo { width: 150px; height: 150px; }

.logo-wrapper .text { font-size: 75px; color: #fff; }
.logo-wrapper h1 { color: white; }

.logo-section { display: flex; flex-direction: column; align-items: center; margin-top: 6vh; gap: 10px; }

.logo-svg-wrapper { display: flex; flex-direction: column; align-items: center; }

.bird-logo {
  background: linear-gradient(135deg, rgba(30,136,229,0.5), rgba(255,143,0,0.35));
  border-radius: 50%;
  box-shadow:
    0 10px 40px rgba(30,136,229,0.35),
    inset 0 0 0 1px var(--white-10);
  margin-bottom: 10px;
  backdrop-filter: blur(6px);
}

/* Unify SVG accents */
.bird-logo path { stroke: var(--blue); }
.bird-logo circle { fill: var(--blue); }

.logo-title { display: flex; flex-direction: column; align-items: center; }

.vpnfree {
  font-size: 2.6rem; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(90deg, var(--blue), var(--orange));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.slogan { font-size: 1.1rem; color: var(--white-30); margin-top: 2px; font-style: italic; }

/* Glass features card */
.features-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 50px rgba(0,0,0,0.35);
  margin: 32px auto 0 auto;
  padding: 32px 24px 24px 24px;
  max-width: 640px;
  text-align: center;
  backdrop-filter: blur(10px) saturate(120%);
}

.features-section h2 { color: var(--orange); font-size: 1.6rem; margin-bottom: 0.5em; }
.features-section .subtitle { color: var(--text); opacity: 0.7; font-size: 1.1rem; margin-bottom: 1.2em; }

.features-list { list-style: none; padding: 0; margin: 0 0 1.2em 0; }

.features-list li {
  font-size: 1.08rem; margin: 0.65em 0; color: var(--text); text-align: left; padding-left: 1.2em; position: relative;
}
.features-list li:before { content: "•"; color: var(--orange); position: absolute; left: 0; font-size: 1.2em; top: 0; }
.features-list b { color: var(--orange); }

.catch {
  background: rgba(255,255,255,0.06);
  color: var(--orange);
  border: 1px solid var(--orange-20);
  border-radius: 10px;
  padding: 10px 16px; font-size: 1rem; margin-top: 1em;
}

/* Search input group */
.main-form { display: flex; justify-content: center; margin: 32px 0 0 0; }

.input-group {
  display: flex; align-items: center; gap: 10px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 48px;
  padding: 8px 10px 8px 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  backdrop-filter: blur(12px) saturate(120%);
}
.input-leading { color: var(--white-30); font-weight: 500; }

#uv-address {
  background: transparent; font-family: inherit; padding: 10px 6px; height: 40px; border: none; color: var(--text);
  border-radius: 20px; outline: none; width: clamp(260px, 40vw, 520px); margin-top: 0; font-size: 1.06rem;
}
#uv-address::placeholder { color: rgba(230, 238, 246, 0.55); }

.go-btn {
  appearance: none; border: none; cursor: pointer; outline: none;
  height: 44px; padding: 0 20px; border-radius: 30px; font-weight: 700; color: #0b1220;
  background: linear-gradient(135deg, var(--orange), #ffc046);
  box-shadow: 0 8px 24px rgba(255, 143, 0, 0.35), inset 0 0 0 1px rgba(255,255,255,0.2);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.go-btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 12px 32px rgba(255, 143, 0, 0.45); }
.go-btn:active { transform: translateY(0); filter: brightness(0.98); }

/* Footer */
footer { margin: 0 5vw; margin-top: auto; display: flex; flex-direction: column; align-items: center; line-height: 30px; margin-bottom: 20px; }
.footer-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.footer-links a { margin: 0 15px; text-decoration: none; color: var(--text); opacity: 0.75; font-size: 15px; transition: color 0.2s, opacity 0.2s; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
footer span { color: rgba(230, 238, 246, 0.5); font-size: 14px; }

/* Credit block (kept as-is aside from color) */
.credit { border-radius: 10px; padding: 10px; display: block; border: #fff 1px solid; color: #fff; display: flex; flex-wrap: wrap; margin-bottom: 15px; }
.credit label { margin-left: auto; margin-right: 15px; }
.credit a, .credit label { color: white; text-decoration: underline; text-align: right; }
.credit pre { display: none; width: 100%; }
.credit label::after { content: "show license"; cursor: pointer; }
.credit input:checked + label::after { content: "hide license"; }
.credit input:checked ~ pre { display: block; }

iframe#uv-frame { display: none; }

/* Compatibility warning banner */
.compat-warning {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  max-width: 720px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px) saturate(120%);
}
.compat-warning .icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--orange);
  background: rgba(255, 143, 0, 0.12);
  border: 1px solid rgba(255, 143, 0, 0.2);
}
.compat-warning .content {
  flex: 1;
  min-width: 0;
}
.compat-warning .title {
  font-weight: 700;
  color: var(--orange);
  margin: 0;
  font-size: 0.98rem;
}
.compat-warning .desc {
  margin: 2px 0 0 0;
  font-size: 0.92rem;
  color: rgba(230, 238, 246, 0.85);
}
.compat-warning .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.compat-warning .dismiss-btn {
  appearance: none;
  background: transparent;
  color: rgba(230, 238, 246, 0.8);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.compat-warning .dismiss-btn:hover {
  background: rgba(255,255,255,0.08);
}

@media (max-width: 480px) {
  .compat-warning { top: 12px; padding: 10px 12px; }
  .compat-warning .desc { font-size: 0.88rem; }
}

/* Inline compatibility banner under the search bar */
.compat-inline {
  margin: 14px auto 0 auto;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px) saturate(120%);
  display: flex;
  align-items: center;
  gap: 12px;
  width: calc(100% - 32px);
  max-width: 720px;
}
.compat-inline .icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--orange);
  background: rgba(255, 143, 0, 0.12);
  border: 1px solid rgba(255, 143, 0, 0.2);
}
.compat-inline .content {
  flex: 1;
  min-width: 0;
}
.compat-inline .title {
  font-weight: 700;
  color: var(--orange);
  margin: 0;
  font-size: 0.96rem;
  opacity: 0.95;
}
.compat-inline .iconset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.compat-inline .badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
}
.compat-inline .brand-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  color: #0b1220;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28);
}
/* Brand approximations */
.brand-chrome { background: conic-gradient(#DB4437 0 25%, #F4B400 0 50%, #0F9D58 0 75%, #4285F4 0); }
.brand-firefox { background: linear-gradient(135deg, #FF7139, #FFB000); }
.brand-vivaldi { background: linear-gradient(135deg, #EF2D5E, #FF6A88); }

.compat-inline .device { font-size: 14px; opacity: 0.9; }

@media (max-width: 480px) {
  .compat-inline { padding: 10px 12px; }
  .compat-inline .title { font-size: 0.9rem; }
}

/* Accessibility helper */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,1px,1px);
  white-space: nowrap; border: 0;
}

/* Warning variant for inline banner */
.compat-inline.is-warning {
  position: relative;
  border-color: rgba(255, 143, 0, 0.45);
  background:
    linear-gradient(180deg, rgba(255, 165, 0, 0.14), rgba(255, 143, 0, 0.10));
  box-shadow:
    0 12px 40px rgba(255, 143, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.compat-inline.is-warning::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 183, 77, 0.12) 0,
    rgba(255, 183, 77, 0.12) 10px,
    rgba(255, 255, 255, 0.04) 10px,
    rgba(255, 255, 255, 0.04) 20px
  );
  pointer-events: none;
  mix-blend-mode: overlay;
}
.compat-inline.is-warning .icon {
  color: #2b1a00;
  background: rgba(255, 193, 7, 0.9);
  border-color: rgba(255, 183, 77, 0.9);
  width: 36px; height: 36px;
  animation: pulseWarn 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.12);
}
@keyframes pulseWarn {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(255,193,7,0.12); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(255,193,7,0.22); }
}

/* Current environment badge */
.compat-inline .current {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.compat-inline .current .badge {
  position: relative;
  border-color: rgba(255, 143, 0, 0.45);
  background: rgba(255, 143, 0, 0.14);
}
.compat-inline .current .badge::after {
  content: "!";
  position: absolute;
  top: -8px; right: -8px;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 12px;
  color: #2b1a00;
  background: #FFC107;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Supported set subtler styling */
.compat-inline .supported-label {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  opacity: 0.9; font-size: 0.92rem;
}
.compat-inline .supported-set {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px;
}
.compat-inline .supported-set .badge { opacity: 0.85; }

/* Unknown brand fallback */
.brand-unknown { background: linear-gradient(135deg, #9aa4af, #c7d0da); color: #0b1220; }

/* SVG icon sizing inside badges */
.compat-inline .brand-circle img {
  width: 14px;
  height: 14px;
  display: block;
}
.compat-inline .device-icon {
  width: 18px;
  height: 18px;
  display: block;
}
