:root {
  --wb-bg: #03121d;
  --wb-bg-2: #0b2231;
  --wb-text: #edf6fb;
  --wb-muted: #9fb4c1;
  --wb-panel: rgba(9, 29, 41, 0.84);
  --wb-border: rgba(157, 205, 228, 0.22);
  --wb-accent: #17bebb;
  --wb-accent-2: #f4a261;
  --wb-shadow: 0 14px 42px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 10% 15%, rgba(23, 190, 187, 0.2), transparent 40%),
    radial-gradient(circle at 80% 5%, rgba(244, 162, 97, 0.18), transparent 35%),
    linear-gradient(160deg, var(--wb-bg), var(--wb-bg-2));
  color: var(--wb-text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.wb-bg-shape {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.6;
}

.wb-shape-a {
  width: 220px;
  height: 220px;
  background: rgba(23, 190, 187, 0.22);
  right: 12vw;
  top: 20vh;
}

.wb-shape-b {
  width: 280px;
  height: 280px;
  background: rgba(244, 162, 97, 0.18);
  left: 8vw;
  bottom: 8vh;
}

.wb-shell {
  width: min(1580px, calc(100% - 24px));
  margin: 12px auto;
  display: grid;
  gap: 12px;
}

.wb-header {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--wb-border);
  background: var(--wb-panel);
  box-shadow: var(--wb-shadow);
}

.wb-header h1 {
  margin: 0;
  font-size: 1.45rem;
}

.wb-header p {
  margin: 6px 0 0;
  color: var(--wb-muted);
  font-size: 0.95rem;
}

.wb-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wb-links a {
  color: var(--wb-text);
  text-decoration: none;
  border: 1px solid var(--wb-border);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 150ms ease, border-color 150ms ease;
}

.wb-links a:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 190, 187, 0.7);
}

.wb-links a.active {
  background: linear-gradient(90deg, rgba(23, 190, 187, 0.42), rgba(244, 162, 97, 0.38));
  border-color: rgba(23, 190, 187, 0.9);
}

.wb-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--wb-border);
  background: var(--wb-panel);
  box-shadow: var(--wb-shadow);
}

.wb-warning {
  grid-column: 1 / -1;
  border-radius: 12px;
  border: 1px solid rgba(244, 162, 97, 0.55);
  background: rgba(244, 162, 97, 0.14);
  color: #ffe7cf;
  padding: 10px 12px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.wb-warning code {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 1px 6px;
}

.wb-field {
  display: grid;
  gap: 6px;
}

.wb-field label {
  font-size: 0.82rem;
  color: var(--wb-muted);
}

.wb-field input,
.wb-field select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(157, 205, 228, 0.35);
  background: rgba(255, 255, 255, 0.05);
  color: var(--wb-text);
  padding: 10px;
  font: inherit;
}

.wb-actions {
  display: grid;
  grid-auto-flow: row;
  gap: 8px;
  min-width: 190px;
}

.wb-btn {
  border-radius: 10px;
  border: 1px solid rgba(157, 205, 228, 0.38);
  background: rgba(255, 255, 255, 0.04);
  color: var(--wb-text);
  padding: 10px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease;
}

.wb-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 190, 187, 0.8);
}

.wb-btn-primary {
  background: linear-gradient(96deg, rgba(23, 190, 187, 0.92), rgba(244, 162, 97, 0.88));
  border-color: transparent;
  color: #072130;
}

.wb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wb-tab {
  border-radius: 999px;
  border: 1px solid var(--wb-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--wb-text);
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.wb-tab.active {
  background: linear-gradient(90deg, rgba(23, 190, 187, 0.38), rgba(244, 162, 97, 0.34));
  border-color: rgba(23, 190, 187, 0.7);
}

.wb-panels {
  border-radius: 16px;
  border: 1px solid var(--wb-border);
  background: var(--wb-panel);
  box-shadow: var(--wb-shadow);
  min-height: 74vh;
  overflow: hidden;
}

.wb-panel {
  display: none;
  min-height: 74vh;
}

.wb-panel.active {
  display: block;
  animation: wb-fade 220ms ease;
}

.wb-panel iframe {
  border: 0;
  width: 100%;
  min-height: 74vh;
  background: #091722;
}

@keyframes wb-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wb-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.wb-spinner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(3, 18, 29, 0.92);
  z-index: 100;
  border-radius: 16px;
}

.wb-spinner:not([hidden]) {
  display: flex;
}

.wb-spinner[hidden] {
  display: none;
}

.wb-spinner-ring {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(23, 190, 187, 0.2);
  border-top-color: rgba(23, 190, 187, 0.9);
  border-radius: 50%;
  animation: wb-spin 1s linear infinite;
}

.wb-spinner-text {
  margin-top: 16px;
  color: var(--wb-muted);
  font-size: 0.95rem;
  animation: wb-fade 600ms ease;
}

@media (max-width: 1100px) {
  .wb-controls {
    grid-template-columns: 1fr;
  }

  .wb-actions {
    grid-template-columns: 1fr;
  }

  .wb-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
