/* Shift Sea Battle — premium ocean / iOS 2025 */

#seabattle-host {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(24, 191, 255, 0.28), transparent 55%),
    radial-gradient(80% 50% at 100% 100%, rgba(10, 132, 255, 0.2), transparent 50%),
    linear-gradient(180deg, #0B2D46 0%, #071A2B 48%, #04101C 100%);
  color: #fff;
  padding:
    calc(8px + env(safe-area-inset-top, 0px))
    calc(16px + env(safe-area-inset-right, 0px))
    calc(16px + env(safe-area-inset-bottom, 0px))
    calc(16px + env(safe-area-inset-left, 0px));
}
#seabattle-host.is-open { display: block; }
body.sb-active .shift-nav { display: none !important; }

.sb-screen { position: relative; min-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding-bottom: 8px; animation: sbIn 0.32s cubic-bezier(0.32, 0.72, 0, 1) both; }
@keyframes sbIn {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: none; }
}

.sb-top {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.sb-back {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #0A84FF;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
}
.sb-brand { text-align: center; }
.sb-brand small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: rgba(235, 235, 245, 0.5);
}
.sb-brand strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.sb-coins {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 10px 0 6px;
  border-radius: 20px;
  background: rgba(255, 214, 10, 0.12);
  border: 0.5px solid rgba(255, 214, 10, 0.35);
  color: #FFD60A;
  font-variant-numeric: tabular-nums;
}
.sb-coins__ico {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #FFE566, #FF9F0A);
  color: #3A2A00;
  font-size: 11px;
  font-weight: 800;
}
.sb-coins strong { font-size: 15px; font-weight: 700; color: #FFE566; }
.sb-coins small { font-size: 12px; opacity: 0.8; }

.sb-hero-water {
  position: absolute;
  inset: 60px 0 auto;
  height: 160px;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.55;
}
.sb-wave {
  position: absolute;
  inset: 20% -20%;
  height: 80%;
  background:
    radial-gradient(40% 60% at 20% 50%, rgba(24, 191, 255, 0.35), transparent),
    radial-gradient(40% 60% at 70% 40%, rgba(10, 132, 255, 0.3), transparent);
  animation: sbWave 8s ease-in-out infinite alternate;
  filter: blur(8px);
}
@keyframes sbWave {
  from { transform: translateX(-4%) scale(1); }
  to { transform: translateX(4%) scale(1.05); }
}
.sb-particles::before,
.sb-particles::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: sbFloat 4.5s ease-in-out infinite;
}
.sb-particles::before { left: 20%; top: 40%; }
.sb-particles::after { right: 24%; top: 55%; animation-delay: 1.2s; width: 4px; height: 4px; }
@keyframes sbFloat {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-12px); opacity: 0.8; }
}

.sb-title {
  margin: 28px 0 6px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.4px;
  text-align: center;
}
.sb-sub {
  margin: 0 0 18px;
  text-align: center;
  font-size: 15px;
  color: rgba(235, 235, 245, 0.6);
  line-height: 1.35;
}
.sb-label {
  margin: 8px 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: rgba(235, 235, 245, 0.5);
}
.sb-warn {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 159, 10, 0.12);
  border: 0.5px solid rgba(255, 159, 10, 0.3);
  color: #FFD60A;
  font-size: 13px;
  line-height: 1.35;
}

.sb-modes { display: grid; gap: 12px; margin-top: 8px; }
.sb-mode {
  display: block;
  width: 100%;
  padding: 18px 16px;
  border-radius: 22px;
  text-align: left;
  background: rgba(255, 255, 255, 0.07);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
.sb-mode:active { transform: scale(0.98); }
.sb-mode strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
}
.sb-mode span {
  font-size: 14px;
  color: rgba(235, 235, 245, 0.55);
}
.sb-secondary {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 20px;
}
.sb-link {
  font-size: 15px;
  font-weight: 600;
  color: #64D2FF;
  padding: 10px 4px;
}

.sb-stakes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.sb-stake {
  min-height: 72px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.sb-stake strong { font-size: 22px; font-weight: 800; }
.sb-stake span { font-size: 12px; color: #FFD60A; font-weight: 700; }
.sb-stake.is-on {
  background: rgba(10, 132, 255, 0.28);
  border-color: rgba(100, 210, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sb-confirm {
  padding: 20px 18px;
  border-radius: 24px;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.07);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
}
.sb-confirm__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 15px;
  color: rgba(235, 235, 245, 0.6);
}
.sb-confirm__row strong { font-size: 22px; color: #fff; font-weight: 800; }
.sb-gold { color: #FFD60A !important; }
.sb-confirm p {
  margin: 12px 0 0;
  font-size: 13px;
  color: rgba(235, 235, 245, 0.5);
  line-height: 1.4;
}
.sb-cta { margin-top: 12px; border-radius: 16px !important; min-height: 52px !important; }
.sb-join-row {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  margin-bottom: 12px;
}
.sb-input {
  flex: 1;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  font-size: 16px;
  color: #fff;
}

/* Matchmaking radar */
.sb-search { text-align: center; }
.sb-radar {
  width: 180px;
  height: 180px;
  margin: 28px auto 20px;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at center, rgba(24, 191, 255, 0.15), transparent 60%),
    repeating-radial-gradient(circle at center, transparent 0 18px, rgba(100, 210, 255, 0.12) 18px 19px);
  border: 1px solid rgba(100, 210, 255, 0.35);
  box-shadow: 0 0 40px rgba(10, 132, 255, 0.25);
}
.sb-radar i {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(24, 191, 255, 0.55) 100%);
  animation: sbSpin 2.2s linear infinite;
}
.sb-radar b, .sb-radar em {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64D2FF;
  box-shadow: 0 0 10px #18BFFF;
  animation: sbBlip 2.8s ease-in-out infinite;
}
.sb-radar b { left: 28%; top: 32%; }
.sb-radar em { right: 22%; bottom: 30%; animation-delay: 1s; }
@keyframes sbSpin { to { transform: rotate(360deg); } }
@keyframes sbBlip {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
.sb-search-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.6px;
}
.sb-pill {
  display: inline-flex;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(255, 214, 10, 0.12);
  border: 0.5px solid rgba(255, 214, 10, 0.3);
  color: #FFD60A;
  font-size: 13px;
  font-weight: 700;
}

.sb-vs { text-align: center; padding-top: 40px; }
.sb-found {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #34C759;
}
.sb-vs-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 28px 0;
}
.sb-fighter strong { display: block; margin-top: 8px; font-size: 16px; }
.sb-fighter span { font-size: 13px; color: rgba(235, 235, 245, 0.55); }
.sb-av {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(145deg, #0A84FF, #5E5CE6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 24px rgba(10, 132, 255, 0.3);
  overflow: hidden;
  position: relative;
}
.sb-av.xl { width: 88px; height: 88px; border-radius: 28px; font-size: 34px; }
.sb-av--photo { background: rgba(255, 255, 255, 0.08); }
.sb-av img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.sb-av span { position: relative; z-index: 0; }
.sb-vs-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
}
.sb-count {
  margin-top: 20px;
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #64D2FF;
  text-shadow: 0 0 40px rgba(24, 191, 255, 0.45);
  animation: sbPop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes sbPop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Grid */
.sb-zone-label {
  margin: 10px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(235, 235, 245, 0.45);
}
.sb-grid {
  --gap: 3px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: var(--gap);
  width: 100%;
  max-width: min(100%, 420px);
  margin: 0 auto;
  aspect-ratio: 1;
  padding: 6px;
  border-radius: 20px;
  background: rgba(7, 40, 70, 0.55);
  border: 0.5px solid rgba(100, 210, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 32px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.sb-grid--own { max-width: min(72%, 280px); opacity: 0.95; }
.sb-cell {
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  border-radius: 6px;
  background: linear-gradient(160deg, rgba(24, 191, 255, 0.16), rgba(10, 50, 90, 0.45));
  border: 0.5px solid rgba(100, 210, 255, 0.18);
  padding: 0;
  position: relative;
  overflow: hidden;
}
.sb-cell:active { transform: scale(0.92); }
.sb-cell.is-ship {
  background: linear-gradient(160deg, rgba(174, 198, 220, 0.55), rgba(90, 120, 150, 0.65));
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.sb-cell.is-miss::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}
.sb-cell.is-hit {
  background: linear-gradient(160deg, rgba(255, 69, 58, 0.75), rgba(180, 30, 30, 0.7));
  border-color: rgba(255, 100, 90, 0.6);
}
.sb-cell.is-hit::after {
  content: "";
  position: absolute;
  inset: 30%;
  border-radius: 2px;
  background: #FFD60A;
  transform: rotate(45deg);
}
.sb-cell.is-sunk {
  background: linear-gradient(160deg, rgba(255, 69, 58, 0.9), rgba(80, 10, 10, 0.85));
}
.sb-cell.is-fx-lock { box-shadow: 0 0 0 2px #FFD60A, 0 0 16px rgba(255, 214, 10, 0.6); }
.sb-cell.is-fx-missile { animation: sbShake 0.25s; }
.sb-cell.is-fx-miss { animation: sbSplash 0.45s; }
.sb-cell.is-fx-hit,
.sb-cell.is-fx-sunk { animation: sbBoom 0.45s; }
@keyframes sbShake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-2px); }
  60% { transform: translateX(2px); }
}
@keyframes sbSplash {
  0% { box-shadow: inset 0 0 0 0 rgba(100, 210, 255, 0.6); }
  100% { box-shadow: inset 0 0 20px 8px rgba(100, 210, 255, 0); }
}
@keyframes sbBoom {
  0% { transform: scale(1); filter: brightness(1); }
  40% { transform: scale(1.08); filter: brightness(1.4); }
  100% { transform: scale(1); }
}

.sb-turn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  margin: 4px 0 8px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.sb-turn i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34C759;
  box-shadow: 0 0 10px #34C759;
  animation: sbPulse 1.2s ease-in-out infinite;
}
.sb-turn.is-you {
  color: #34C759;
  background: rgba(52, 199, 89, 0.12);
}
.sb-turn.is-them {
  color: rgba(235, 235, 245, 0.7);
  background: rgba(255, 255, 255, 0.06);
  flex-direction: column;
  gap: 2px;
  padding: 8px;
}
.sb-turn.is-them i { background: #FF9F0A; box-shadow: 0 0 10px #FF9F0A; }
.sb-turn span { font-size: 12px; font-weight: 500; letter-spacing: 0; opacity: 0.7; }
@keyframes sbPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.sb-shipchips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.sb-shipchips::-webkit-scrollbar { display: none; }
.sb-shipchip {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}
.sb-shipchip strong { display: block; font-size: 13px; }
.sb-shipchip span { font-size: 11px; color: rgba(235, 235, 245, 0.5); }
.sb-shipchip.is-set { opacity: 0.45; }
.sb-shipchip.is-sel {
  border-color: rgba(100, 210, 255, 0.6);
  background: rgba(10, 132, 255, 0.25);
  box-shadow: 0 0 16px rgba(10, 132, 255, 0.25);
}
.sb-place-actions {
  display: flex;
  gap: 8px;
  margin: 4px 0 10px;
}
.sb-mini {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 600;
  color: #64D2FF;
}

.sb-banner-fx {
  position: fixed;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 80;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(8, 20, 36, 0.85);
  backdrop-filter: blur(20px);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  font-size: 18px;
  font-weight: 800;
  pointer-events: none;
  animation: sbPop 0.25s both;
}

.sb-result { text-align: center; padding-top: 24px; }
.sb-result-ico { font-size: 48px; margin-bottom: 8px; }
.sb-result h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.sb-delta {
  display: inline-block;
  margin: 12px 0;
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 22px;
  font-weight: 800;
}
.sb-delta.is-plus {
  color: #34C759;
  background: rgba(52, 199, 89, 0.14);
}
.sb-delta.is-minus {
  color: #FF453A;
  background: rgba(255, 69, 58, 0.12);
}
.sb-balance { font-size: 15px; color: rgba(235, 235, 245, 0.6); margin-bottom: 16px; }
.sb-balance strong { color: #FFD60A; }
.sb-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
}
.sb-stats.glass { /* markup */ }
.sb-stats div { text-align: center; }
.sb-stats strong { display: block; font-size: 20px; font-weight: 800; }
.sb-stats small { font-size: 11px; color: rgba(235, 235, 245, 0.5); }
.sb-result .btn { margin-top: 8px; border-radius: 16px !important; }
.sb-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 214, 10, 0.35), transparent 8%),
    radial-gradient(circle at 80% 20%, rgba(10, 132, 255, 0.35), transparent 10%),
    radial-gradient(circle at 60% 50%, rgba(52, 199, 89, 0.3), transparent 8%);
  animation: sbFloat 3s ease-in-out infinite;
}

.sb-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}
.sb-tabs button {
  min-height: 34px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.6);
}
.sb-tabs button.is-on {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.sb-lb { border-radius: 20px; overflow: hidden; padding: 4px 0; }
.sb-lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}
.sb-lb-rank { width: 22px; font-weight: 800; color: rgba(235, 235, 245, 0.45); }
.sb-lb-av {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #0A84FF;
  font-weight: 700;
}
.sb-lb-body { flex: 1; min-width: 0; text-align: left; }
.sb-lb-body strong { display: block; font-size: 15px; }
.sb-lb-body small { color: rgba(235, 235, 245, 0.5); font-size: 12px; }
.sb-lb-meta { font-size: 13px; font-weight: 700; color: #FFD60A; }

.sb-profile {
  padding: 22px 16px;
  border-radius: 24px;
  text-align: center;
  margin-bottom: 16px;
}
.sb-profile h2 { margin: 10px 0 2px; font-size: 22px; }
.sb-achs { display: grid; gap: 8px; }
.sb-ach {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  font-size: 15px;
  font-weight: 600;
  opacity: 0.45;
  text-align: left;
}
.sb-ach.is-on {
  opacity: 1;
  background: rgba(10, 132, 255, 0.18);
  border-color: rgba(100, 210, 255, 0.35);
}

.sb-hub {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.sb-hub-btn {
  min-height: 44px;
  padding: 10px 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.sb-mission {
  padding: 14px;
  border-radius: 18px;
  margin-bottom: 10px;
  text-align: left;
}
.sb-mbar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.1);
  margin: 8px 0;
  overflow: hidden;
}
.sb-mbar > i { display: block; height: 100%; background: #0A84FF; }
.sb-mission__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sb-mission__row button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  background: #0A84FF;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.sb-done { color: #34C759; font-weight: 700; }

