/* =====================================================
   Lockr Bypass — global styles (dark + light theme)
   ===================================================== */

/* ---------- DARK THEME (default) ---------- */
:root,
[data-theme="dark"] {
  --bg: #0b0d12;
  --bg-2: #0f1219;
  --card: #151924;
  --card-2: #1a1f2d;
  --border: #232a3a;
  --text: #e8ecf5;
  --muted: #8b94a8;
  --muted-2: #6b7388;
  --accent: #7c5cff;
  --accent-2: #4ea1ff;
  --ok: #2dd4a4;
  --err: #ff6b6b;
  --warn: #ffb454;
  --grad: linear-gradient(90deg, #b39bff 0%, #6aa7ff 100%);
  --grad-strong: linear-gradient(90deg, #8a6bff 0%, #4ea1ff 100%);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(11, 13, 18, 0.7);
  --nav-border: rgba(255, 255, 255, 0.04);
  --body-glow-1: rgba(124, 92, 255, 0.18);
  --body-glow-2: rgba(78, 161, 255, 0.14);
  --section-alt-bg: linear-gradient(180deg, transparent, rgba(255,255,255,0.015));
  --section-alt-border: rgba(255,255,255,0.04);
  --mode-active-bg: #1c2130;
  --result-head-bg: #11151f;
  --prose-text: #cdd3e3;
  --code-bg: #11151f;
  --foot-bg: #0a0c11;
  --input-bg: var(--card);
  --result-input-bg: #0d1017;
  --toggle-bg: rgba(255,255,255,0.08);
}

/* ---------- LIGHT THEME ---------- */
[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-2: #eef1f7;
  --card: #ffffff;
  --card-2: #f8f9fc;
  --border: #dfe3ec;
  --text: #1a1d28;
  --muted: #5e6577;
  --muted-2: #8a90a0;
  --accent: #6b4ce6;
  --accent-2: #2b7de9;
  --ok: #1aab83;
  --err: #e04545;
  --warn: #d4890a;
  --grad: linear-gradient(90deg, #8a6bff 0%, #3b8bff 100%);
  --grad-strong: linear-gradient(90deg, #7c5cff 0%, #2b7de9 100%);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(245, 247, 251, 0.82);
  --nav-border: rgba(0, 0, 0, 0.06);
  --body-glow-1: rgba(107, 76, 230, 0.1);
  --body-glow-2: rgba(43, 125, 233, 0.08);
  --section-alt-bg: linear-gradient(180deg, transparent, rgba(0,0,0,0.02));
  --section-alt-border: rgba(0,0,0,0.06);
  --mode-active-bg: #eef0f5;
  --result-head-bg: #f0f2f7;
  --prose-text: #3a3f52;
  --code-bg: #f0f2f7;
  --foot-bg: #edf0f5;
  --input-bg: var(--card);
  --result-input-bg: #f5f7fb;
  --toggle-bg: rgba(0,0,0,0.06);
}

:root {
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1100px;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--body-glow-1), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, var(--body-glow-2), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* =====================================================
   NAV
   ===================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--nav-border);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 700; font-size: 17px; text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: var(--grad-strong); color: #fff;
  box-shadow: 0 4px 20px rgba(124, 92, 255, 0.45);
}
.brand-name .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; gap: 22px; font-size: 14px; }
.nav-links a { color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* Nav actions (theme toggle + install) */
.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--toggle-bg); color: var(--muted);
  cursor: pointer; transition: all 0.2s ease; position: relative;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); background: var(--toggle-bg); }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { position: absolute; transition: opacity 0.25s ease, transform 0.25s ease; }

/* In dark mode: show sun (to switch to light), hide moon */
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0deg); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg); }
/* In light mode: show moon (to switch to dark), hide sun */
[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg); }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg); }

.install-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--toggle-bg);
  color: var(--muted); font-size: 13px; font-family: var(--sans);
  cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.install-btn:hover { color: var(--text); border-color: var(--accent); }
.install-btn.hidden { display: none; }

@media (max-width: 640px) {
  .nav-links { display: none; }
}

/* =====================================================
   HERO
   ===================================================== */
.hero { padding: 80px 0 60px; text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--toggle-bg); color: var(--muted); font-size: 12px; margin-bottom: 18px;
}
.pulse {
  width: 8px; height: 8px; background: var(--ok); border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(45, 212, 164, 0.6); animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 212, 164, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(45, 212, 164, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 164, 0); }
}
.title {
  font-size: clamp(34px, 5.5vw, 64px); line-height: 1.05;
  letter-spacing: -0.025em; margin: 0 0 16px; font-weight: 800;
}
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede {
  font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto 32px;
}

/* Search bar */
.searchbar {
  display: flex; align-items: center; gap: 6px; max-width: 720px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 8px 8px 8px 16px; box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.3s ease;
}
.searchbar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.18), var(--shadow);
}
.search-icon { color: var(--muted); display: inline-flex; }
.searchbar input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--text); font-size: 15px; padding: 14px 10px;
  font-family: var(--mono); min-width: 0;
}
.searchbar input::placeholder { color: var(--muted-2); }

.btn-primary {
  background: var(--grad-strong); color: #fff; border: 0;
  font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 10px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.45);
  transition: transform 0.05s ease, filter 0.15s, box-shadow 0.15s; white-space: nowrap;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; filter: none; }
.btn-primary .spinner { display: none; }
.btn-primary.loading .spinner { display: inline-block; }
.btn-primary.loading .btn-label { opacity: 0.8; }

.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.mode-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-top: 16px; flex-wrap: wrap;
}
.mode-label { color: var(--muted); font-size: 13px; }
.modes {
  display: inline-flex; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 3px; transition: background 0.3s ease, border-color 0.3s ease;
}
.mode {
  background: transparent; border: 0; color: var(--muted);
  padding: 6px 12px; font-size: 13px; border-radius: 8px;
  cursor: pointer; font-family: var(--sans); transition: all 0.2s ease;
}
.mode.active { background: var(--mode-active-bg); color: var(--text); }
.hint { color: var(--muted-2); font-size: 12px; font-family: var(--mono); }

/* =====================================================
   RESULT CARD (new design: link box + Copy / Open)
   ===================================================== */
.result {
  max-width: 720px; margin: 24px auto 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; text-align: left;
  box-shadow: var(--shadow); transition: background 0.3s ease, border-color 0.3s ease;
}
.result.hidden { display: none; }

.result-status {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--result-head-bg); border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  transition: background 0.3s ease;
}

.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted); display: inline-block; flex-shrink: 0;
}
.dot.ok { background: var(--ok); box-shadow: 0 0 8px rgba(45, 212, 164, 0.5); }
.dot.err { background: var(--err); box-shadow: 0 0 8px rgba(255, 107, 107, 0.5); }

.result-link-box { padding: 16px; }

.result-box-title {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 8px; font-family: var(--sans);
}

.result-link-input {
  width: 100%; padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--result-input-bg);
  color: var(--text); font-family: var(--mono); font-size: 14px;
  outline: none; transition: border-color 0.2s ease, background 0.3s ease;
  cursor: default;
}
.result-link-input:focus { border-color: var(--accent); }

.result-actions {
  display: flex; gap: 10px; margin-top: 14px;
}

.btn-action {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid var(--border);
  font-size: 14px; font-weight: 500; font-family: var(--sans);
  cursor: pointer; transition: all 0.2s ease; flex: 1;
  justify-content: center;
}
.btn-action svg { flex-shrink: 0; }

.btn-copy {
  background: var(--toggle-bg); color: var(--text);
}
.btn-copy:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-copy.copied { background: var(--ok); color: #fff; border-color: var(--ok); }

.btn-open {
  background: var(--grad-strong); color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
}
.btn-open:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-open:active { transform: translateY(0); }

/* Error state */
.result-error {
  padding: 14px 16px; color: var(--err); font-size: 14px;
  line-height: 1.5;
}
.result-error.hidden { display: none; }

.result-link-box.hidden { display: none; }

/* =====================================================
   SECTIONS
   ===================================================== */
.section { padding: 70px 0; }
.section.alt { background: var(--section-alt-bg); border-top: 1px solid var(--section-alt-border); border-bottom: 1px solid var(--section-alt-border); transition: background 0.3s ease, border-color 0.3s ease; }
.section-title {
  font-size: clamp(26px, 3.5vw, 40px); letter-spacing: -0.02em;
  margin: 0 0 8px; font-weight: 800; text-align: center;
}
.section-sub {
  text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 36px;
}

.grid { display: grid; gap: 18px; }
.features { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card-feature {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  transition: transform 0.15s ease, border-color 0.15s, box-shadow 0.15s, background 0.3s ease;
}
.card-feature:hover {
  transform: translateY(-3px); border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.18);
}
.card-feature .ico { font-size: 26px; margin-bottom: 8px; }
.card-feature h3 { margin: 0 0 6px; font-size: 17px; }
.card-feature p { margin: 0; color: var(--muted); font-size: 14px; }

.step {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; position: relative;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.step-num {
  position: absolute; top: -18px; left: 22px;
  background: var(--grad-strong); color: #fff; font-weight: 700; font-size: 14px;
  width: 36px; height: 36px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 10px;
  box-shadow: 0 6px 16px rgba(124, 92, 255, 0.4);
}
.step h3 { margin: 14px 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.supported-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 18px;
}
.supported-head .section-title { text-align: left; margin: 0; }
.supported-head .section-sub { text-align: left; margin: 4px 0 0; }
.btn-ghost {
  background: var(--card); color: var(--text); border: 1px solid var(--border);
  padding: 10px 16px; border-radius: 10px; cursor: pointer; font-size: 14px;
  font-family: var(--sans); transition: background 0.15s, border-color 0.15s;
}
.btn-ghost:hover { background: var(--card-2); border-color: rgba(124, 92, 255, 0.5); }

.services {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; font-family: var(--mono); font-size: 12px; color: var(--muted);
  max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  margin: 0; transition: background 0.3s ease, border-color 0.3s ease;
}

/* Two-column prose */
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.prose h2 { font-size: 22px; margin-top: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--prose-text); }
.prose code {
  background: var(--code-bg); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 6px; font-size: 0.92em;
}
.prose ul { color: var(--prose-text); }
.refbox {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; font-family: var(--mono); font-size: 13px; color: var(--prose-text);
  display: grid; gap: 6px; transition: background 0.3s ease, border-color 0.3s ease;
}

/* FAQ */
.faq {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 12px; transition: border-color 0.15s, background 0.3s ease;
}
.faq[open] { border-color: rgba(124, 92, 255, 0.4); }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 15px; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 18px; }
.faq[open] summary::after { content: "\2212"; }
.faq p { color: var(--muted); margin: 10px 0 0; font-size: 14px; }

/* Footer */
.foot {
  background: var(--foot-bg); border-top: 1px solid var(--section-alt-border);
  padding: 40px 0 60px; margin-top: 40px; transition: background 0.3s ease, border-color 0.3s ease;
}
.foot-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px; align-items: start;
}
@media (max-width: 800px) { .foot-inner { grid-template-columns: 1fr; } }
.foot-links { display: grid; gap: 8px; }
.foot-links a { color: var(--muted); font-size: 14px; }
.foot-links a:hover { color: var(--text); text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* Responsive */
@media (max-width: 600px) {
  .hero { padding: 50px 0 40px; }
  .searchbar { flex-direction: column; padding: 8px; align-items: stretch; }
  .searchbar input { padding: 12px; }
  .searchbar .btn-primary { width: 100%; justify-content: center; padding: 14px; }
  .search-icon { display: none; }
  .result-actions { flex-direction: column; }
  .btn-action { justify-content: center; }
  .install-btn span { display: none; }
  .install-btn { padding: 8px 10px; }
}
