/* WebBrowser.html — webbrowser.oliverliamjones.com (distinct from main hub look) */

:root {
  --wb-bg0: #070b12;
  --wb-bg1: #0f1624;
  --wb-surface: rgba(255, 255, 255, 0.06);
  --wb-border: rgba(255, 255, 255, 0.12);
  --wb-text: #e8eef7;
  --wb-muted: #94a3b8;
  --wb-accent: #38bdf8;
  --wb-accent2: #a78bfa;
  --wb-shop: #f472b6;
  --wb-bmx: #4ade80;
  --wb-hub: #fcd34d;
  --wb-play: #34d399;
  --wb-6pack: #fb923c;
  --wb-f1: #e10600;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body.wb-page {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(800px 400px at 100% 40%, rgba(167, 139, 250, 0.12), transparent 50%),
    linear-gradient(165deg, var(--wb-bg0) 0%, var(--wb-bg1) 45%, #0a0f18 100%);
  color: var(--wb-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Top strip — home */
.wb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--wb-border);
  background: rgba(0, 0, 0, 0.25);
}

.wb-top a {
  color: var(--wb-accent);
  text-decoration: none;
  font-weight: 500;
}

.wb-top a:hover {
  text-decoration: underline;
}

/* In-app tabs */
.wb-tabrow {
  display: none;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--wb-border);
}

.wb-tabrow.wb-tabrow--vis {
  display: flex;
}

.wb-tabstrip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.wb-tab-pair {
  display: inline-flex;
  align-items: stretch;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--wb-border);
  flex-shrink: 0;
}

.wb-tab {
  background: rgba(0, 0, 0, 0.35);
  border: none;
  color: var(--wb-muted);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-tab:hover {
  color: var(--wb-text);
}

.wb-tab.wb-tab--active {
  background: rgba(56, 189, 248, 0.2);
  color: var(--wb-text);
}

.wb-tab-close {
  background: rgba(0, 0, 0, 0.45);
  border: none;
  border-left: 1px solid var(--wb-border);
  color: var(--wb-muted);
  width: 34px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.wb-tab-close:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

.wb-tab-new {
  flex-shrink: 0;
  width: 40px;
  height: 38px;
  border-radius: 10px;
  border: 1px dashed var(--wb-border);
  background: transparent;
  color: var(--wb-accent);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.wb-tab-new:hover {
  border-color: var(--wb-accent);
  background: rgba(56, 189, 248, 0.1);
}

/* Browse toolbar */
.wb-toolbar {
  display: none;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid var(--wb-border);
}

body.mode-browse .wb-toolbar {
  display: flex;
}

body.mode-browse .wb-top {
  display: none;
}

body.mode-browse .wb-browse-hint {
  display: none !important;
}

body.mode-browse {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.wb-toolbar-brand {
  font-size: 12px;
  color: var(--wb-muted);
  margin-right: 4px;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-toolbar-brand strong {
  color: var(--wb-accent);
  font-weight: 600;
}

.wb-toolbar button {
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  color: var(--wb-text);
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
}

.wb-toolbar button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.wb-toolbar button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.wb-toolbar button.icon {
  min-width: 40px;
  padding: 8px 10px;
  font-size: 16px;
}

.wb-toolbar #urlbar {
  flex: 1 1 200px;
  min-width: 0;
  padding: 10px 16px;
  font-size: 15px;
  border: 1px solid var(--wb-border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--wb-text);
  outline: none;
}

.wb-toolbar #urlbar::placeholder {
  color: var(--wb-muted);
}

.wb-toolbar #urlbar:focus {
  border-color: var(--wb-accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.wb-toolbar #btnGo {
  background: linear-gradient(135deg, var(--wb-accent), #0ea5e9);
  border-color: transparent;
  color: #04202e;
  font-weight: 600;
}

.wb-toolbar #btnGo:hover {
  filter: brightness(1.08);
}

.wb-secure-chip {
  font-size: 11px;
  color: var(--wb-muted);
  white-space: nowrap;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-secure-chip.secure {
  color: #4ade80;
}

.wb-secure-chip.insecure {
  color: #fb923c;
}

/* Home */
.wb-home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px 72px;
  text-align: center;
}

body.mode-browse .wb-home {
  display: none;
}

.wb-brand {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: clamp(1.05rem, 3.5vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin: 0 0 12px;
  max-width: 100%;
  word-break: break-word;
}

.wb-brand__sub {
  color: var(--wb-accent);
}

.wb-brand__dot {
  color: var(--wb-muted);
}

.wb-brand__domain {
  color: #cbd5e1;
}

.wb-tagline {
  font-size: 15px;
  color: var(--wb-muted);
  margin: 0 0 28px;
  max-width: 420px;
  line-height: 1.5;
}

.wb-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
  width: 100%;
  max-width: 640px;
}

.wb-shortcut {
  flex: 1 1 160px;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--wb-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--wb-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
}

.wb-shortcut:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.wb-shortcut--shop {
  border-color: rgba(244, 114, 182, 0.45);
  box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.08);
}

.wb-shortcut--shop:hover {
  border-color: var(--wb-shop);
}

.wb-shortcut--bmx {
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.08);
}

.wb-shortcut--bmx:hover {
  border-color: var(--wb-bmx);
}

.wb-shortcut--hub {
  border-color: rgba(252, 211, 77, 0.45);
  box-shadow: inset 0 0 0 1px rgba(252, 211, 77, 0.08);
}

.wb-shortcut--hub:hover {
  border-color: var(--wb-hub);
}

.wb-shortcut--play {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.08);
}

.wb-shortcut--play:hover {
  border-color: var(--wb-play);
}

.wb-shortcut--6pack {
  border-color: rgba(251, 146, 60, 0.45);
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.08);
}

.wb-shortcut--6pack:hover {
  border-color: var(--wb-6pack);
}

.wb-shortcut--f1 {
  border-color: rgba(225, 6, 0, 0.5);
  box-shadow: inset 0 0 0 1px rgba(225, 6, 0, 0.1);
}

.wb-shortcut--f1:hover {
  border-color: var(--wb-f1);
}

.wb-shortcut small {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  font-size: 11px;
  color: var(--wb-muted);
}

.wb-search-wrap {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 560px;
}

.wb-browse-url-wrap {
  flex: 1 1 200px;
  min-width: 0;
  position: relative;
  z-index: 20;
}

.wb-suggest {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: rgba(15, 22, 36, 0.98);
  border: 1px solid var(--wb-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  max-height: 280px;
  overflow-y: auto;
  text-align: left;
}

.wb-suggest.show {
  display: block;
}

.wb-suggest button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-bottom: 1px solid var(--wb-border);
  background: none;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  color: var(--wb-text);
}

.wb-suggest button:last-child {
  border-bottom: none;
}

.wb-suggest button:hover,
.wb-suggest button.active {
  background: rgba(56, 189, 248, 0.12);
}

.wb-suggest .sug-main {
  font-weight: 600;
}

.wb-suggest .sug-sub {
  display: block;
  font-size: 12px;
  color: var(--wb-muted);
  margin-top: 2px;
}

.wb-search-box {
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid var(--wb-border);
  border-radius: 999px;
  padding: 4px 8px 4px 18px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wb-search-box:hover,
.wb-search-box:focus-within {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.wb-search-box .wb-glass {
  color: var(--wb-muted);
  font-size: 15px;
  margin-right: 12px;
  user-select: none;
}

#urlbar-home {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  padding: 12px 0;
  background: transparent;
  color: var(--wb-text);
}

#urlbar-home::placeholder {
  color: var(--wb-muted);
}

.wb-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.wb-home-actions button {
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  color: var(--wb-text);
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
}

.wb-home-actions button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.wb-home-actions .wb-btn-primary {
  background: linear-gradient(135deg, var(--wb-accent), #0ea5e9);
  border-color: transparent;
  color: #04202e;
  font-weight: 600;
}

.wb-hint {
  margin: 20px 16px 0;
  font-size: 13px;
  color: var(--wb-muted);
  text-align: center;
  min-height: 1.25em;
  max-width: 520px;
}

.wb-hint strong {
  color: var(--wb-accent);
  font-weight: 600;
}

#view {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
  display: none;
}

body.mode-browse #view {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
