/* ==========================================================================
   NexPower - High-Definition Cinematic Theme (Zero White Haze)
   ========================================================================== */

:root {
  --bg-light: #06090f;
  --bg-surface: rgba(12, 19, 31, 0.7);
  --bg-surface-glass: rgba(12, 19, 31, 0.65);
  --bg-card-glass: rgba(12, 19, 31, 0.55);

  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-glass: rgba(255, 255, 255, 0.2);
  --border-glow: rgba(56, 189, 248, 0.35);
  --border-accent: rgba(74, 222, 128, 0.35);

  --color-primary: #38bdf8;
  --color-primary-glow: rgba(56, 189, 248, 0.35);
  --color-accent: #22c55e;
  --color-accent-bright: #4ade80;
  --color-accent-glow: rgba(74, 222, 128, 0.35);

  --text-main: #ffffff;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  --container-max-width: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-light);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-x: hidden;
  overflow-x: clip;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background-color: var(--color-primary);
  color: #06090f;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

button, input {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

/* --- HIGH-DEFINITION HARDWARE-ACCELERATED BACKGROUND VIDEO --- */
.bg-video-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: #06090f;
}

.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate3d(-50%, -50%, 0) scale(1.08); /* Overscans edges by 8% to cleanly push watermark outside viewport */
  object-fit: cover;
  opacity: 0;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  filter: contrast(1.06) brightness(1.02) saturate(1.1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: opacity, transform;
  transition: opacity 1.2s cubic-bezier(0.42, 0, 0.58, 1);
}

.bg-video.active {
  opacity: 0.88; /* Clear, vivid cinematic background video */
}

.bg-video-overlay {
  position: absolute;
  inset: 0;
  /* Clean contrast vignette + subtle corner blend to guarantee watermark is hidden on all aspect ratios */
  background: 
    radial-gradient(circle at 100% 100%, rgba(6, 9, 15, 0.95) 0%, rgba(6, 9, 15, 0.6) 8%, transparent 18%),
    radial-gradient(circle at 0% 100%, rgba(6, 9, 15, 0.85) 0%, transparent 15%),
    radial-gradient(circle at 65% 50%, rgba(6, 9, 15, 0.1) 0%, rgba(6, 9, 15, 0.45) 75%, rgba(6, 9, 15, 0.7) 100%),
    linear-gradient(180deg, rgba(6, 9, 15, 0.4) 0%, transparent 20%, transparent 75%, rgba(6, 9, 15, 0.65) 100%);
}

.bg-video-grain {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(56, 189, 248, 0.06) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.6;
}

/* --- CUSTOM ULTRA-RESPONSIVE CURSOR (LIGHT MODE) --- */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999999;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.5);
  opacity: 0;
  will-change: transform;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--color-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999998;
  background-color: rgba(2, 132, 199, 0.06);
  opacity: 0;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              background-color 0.25s ease,
              box-shadow 0.25s ease;
  will-change: transform;
}

body.cursor-hover .cursor-ring {
  width: 58px;
  height: 58px;
  border-color: var(--color-accent);
  background-color: rgba(22, 163, 74, 0.12);
  box-shadow: 0 0 24px rgba(22, 163, 74, 0.35);
}

body.cursor-hover .cursor-dot {
  background-color: var(--color-accent);
  box-shadow: 0 0 14px rgba(22, 163, 74, 0.6);
}

body.cursor-active .cursor-ring {
  width: 28px;
  height: 28px;
  border-color: var(--color-primary);
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* --- PRELOADER (CLEAN LIGHT THEME) --- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  pointer-events: all;
}

.preloader-curtain {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50.5%;
  background: radial-gradient(circle at 50% 50%, #0c131f 0%, #06090f 100%);
  z-index: 1;
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.curtain-top {
  top: 0;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.curtain-bottom {
  bottom: 0;
  border-top: 1px solid rgba(74, 222, 128, 0.2);
}

.preloader-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.4) 0%, rgba(56, 189, 248, 0.25) 40%, transparent 80%);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#preloader.flash-active .preloader-flash {
  opacity: 1;
}

#preloader.preloader-hidden .curtain-top {
  transform: translateY(-101%);
}

#preloader.preloader-hidden .curtain-bottom {
  transform: translateY(101%);
}

#preloader.preloader-hidden .preloader-content {
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.preloader-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  max-width: 480px;
  width: 90%;
  background: rgba(12, 19, 31, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(56, 189, 248, 0.15);
}

.preloader-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
}

.preloader-badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-accent-bright);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-accent-bright);
  animation: pulseDot 1s infinite alternate;
}

.preloader-brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.preloader-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px var(--color-primary-glow));
  animation: logoPulse 2s infinite ease-in-out;
}

.preloader-brand-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.preloader-brand-text span { color: var(--color-accent-bright); }

.preloader-gauge-halo {
  position: relative;
  width: 220px;
  height: 110px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.halo-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.halo-ring-outer {
  width: 200px;
  height: 200px;
  border: 1.5px dashed rgba(56, 189, 248, 0.3);
  animation: rotateClockwise 8s linear infinite;
}

.halo-ring-inner {
  width: 170px;
  height: 170px;
  border: 1px dotted rgba(74, 222, 128, 0.35);
  animation: rotateCounterClockwise 6s linear infinite;
}

.battery-frame {
  width: 154px;
  height: 68px;
  border: 2.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 4px;
  position: relative;
  z-index: 2;
  background: rgba(6, 9, 15, 0.9);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 10px 25px rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
}

.battery-terminal {
  position: absolute;
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 26px;
  background: linear-gradient(90deg, #475569, #64748b);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.battery-fill-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 40%, #16a34a 80%, #22c55e 100%);
  border-radius: 6px;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.45);
  position: relative;
  overflow: hidden;
  transition: width 0.05s linear;
}

.battery-fill-bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  animation: shimmer 1s infinite;
}

.battery-bolt-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 26px;
  height: 26px;
  color: #ffffff;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.8));
}

.preloader-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  width: 100%;
  padding-block: 0.85rem;
  margin-bottom: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
}

.telemetry-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.telemetry-label {
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 3px;
}

.telemetry-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.telemetry-val.primary { color: var(--color-primary); }
.telemetry-val.accent { color: var(--color-accent); }

.preloader-terminal-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.terminal-prompt {
  color: var(--color-accent);
  font-weight: 700;
}

@keyframes rotateClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateCounterClockwise {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes pulseDot {
  0% { opacity: 0.4; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.2); }
}

/* --- LAYOUT & CONTAINERS --- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: 1rem;
  position: relative;
  z-index: 2;
}

@media (min-width: 480px) {
  .container { padding-inline: 1.5rem; }
}

@media (min-width: 768px) {
  .container { padding-inline: 2.5rem; }
}

/* --- FLOATING LIQUID GLASS HEADER (iOS DYNAMIC ISLAND STYLE) --- */
.site-header {
  position: sticky;
  top: 0.65rem;
  z-index: 100;
  width: 100%;
  padding-inline: 0.65rem;
  pointer-events: none;
  flex-shrink: 0;
}

@media (min-width: 480px) {
  .site-header {
    top: 1.25rem;
    padding-inline: 1rem;
  }
}

.header-inner {
  max-width: 860px;
  margin-inline: auto;
  padding: 0.45rem 0.85rem;
  background: rgba(12, 19, 31, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9999px;
  backdrop-filter: blur(28px) saturate(190%) contrast(105%);
  -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(105%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
              0 14px 35px -8px rgba(0, 0, 0, 0.7),
              0 0 25px rgba(56, 189, 248, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  pointer-events: auto;
  animation: floatingIsland 6s ease-in-out infinite alternate;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

@media (min-width: 480px) {
  .header-inner {
    padding: 0.65rem 1.4rem;
    gap: 1.5rem;
  }
}

.header-inner:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35),
              0 20px 45px -8px rgba(0, 0, 0, 0.85),
              0 0 30px rgba(56, 189, 248, 0.2);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .brand-wrapper { gap: 0.75rem; }
}

.brand-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.35));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 480px) {
  .brand-logo-img { width: 36px; height: 36px; }
}

.brand-wrapper:hover .brand-logo-img {
  transform: scale(1.1) rotate(-3deg);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  white-space: nowrap;
}

@media (min-width: 480px) {
  .brand-text { font-size: 1.3rem; }
}

.brand-text span { color: var(--color-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

@media (min-width: 480px) {
  .nav-links { gap: 0.75rem; }
}

.nav-link-item {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cbd5e1;
  padding: 5px 9px;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  white-space: nowrap;
}

@media (min-width: 480px) {
  .nav-link-item {
    font-size: 0.78125rem;
    letter-spacing: 0.12em;
    padding: 6px 14px;
  }
}

.nav-link-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-link-item#nav-subscribe-btn {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18) 0%, rgba(74, 222, 128, 0.18) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.15);
}

.nav-link-item#nav-subscribe-btn:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35) 0%, rgba(74, 222, 128, 0.35) 100%);
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

/* --- HERO SPLIT SECTION --- */
.hero-wrapper {
  flex-grow: 1;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2rem;
  padding-block: 1.5rem;
}

@media (min-width: 900px) {
  .hero-wrapper {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
    text-align: left;
    padding-block: 2rem;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 900px) {
  .hero-content {
    align-items: flex-start;
    text-align: left;
  }
}

.kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 5px 12px;
  background: rgba(12, 19, 31, 0.68);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: clamp(0.6875rem, 2.5vw, 0.78125rem);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1rem;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
}

@media (min-width: 480px) {
  .kicker-pill {
    padding: 6px 15px;
    margin-bottom: 1.25rem;
    letter-spacing: 0.08em;
  }
}

.main-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 8.5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: clamp(0.02em, 1.2vw, 0.06em);
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 1rem;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  cursor: default;
  user-select: none;
}

@media (min-width: 900px) {
  .main-title {
    justify-content: flex-start;
    margin-bottom: 1.25rem;
  }
}

.animated-title-word {
  display: inline-flex;
  white-space: nowrap;
}

.animated-title-space {
  width: 0.3em;
  display: inline-block;
}

.main-title .char {
  display: inline-block;
  background: linear-gradient(135deg, #38bdf8 0%, #ffffff 30%, #4ade80 65%, #38bdf8 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(56, 189, 248, 0.45));
  will-change: transform, filter;
  animation: letterWave 3.2s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate,
             chromaGlow 6s linear infinite;
  animation-delay: calc(var(--i) * 0.12s);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}

.main-title:hover .char {
  animation-play-state: paused;
}

.main-title .char:hover {
  transform: translateY(-8px) scale(1.12) rotate(-2deg);
  filter: drop-shadow(0 4px 20px rgba(74, 222, 128, 0.6));
}

.hero-description {
  font-size: clamp(0.875rem, 3.2vw, 1.0625rem);
  color: #cbd5e1;
  max-width: 540px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  text-wrap: pretty;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

@media (min-width: 480px) {
  .hero-description {
    line-height: 1.65;
    margin-bottom: 2rem;
  }
}

/* Notify Form */
.notify-form-container {
  width: 100%;
  max-width: 480px;
  margin-bottom: 1rem;
}

.notify-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

@media (min-width: 540px) {
  .notify-form {
    flex-direction: row;
    gap: 0;
    background: rgba(12, 19, 31, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    padding: 5px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .notify-form:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), 0 14px 35px rgba(0, 0, 0, 0.85);
  }
}

.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 1rem;
  width: 17px;
  height: 17px;
  color: var(--text-dim);
  pointer-events: none;
}

.email-input {
  width: 100%;
  height: 48px;
  padding-left: 2.6rem;
  padding-right: 1rem;
  background-color: rgba(12, 19, 31, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px; /* 16px prevents mobile iOS Safari auto-zoom */
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (min-width: 540px) {
  .email-input {
    background-color: transparent;
    border: none;
    height: 44px;
    font-size: 0.9375rem;
    border-radius: 9999px;
    box-shadow: none;
  }
}

.email-input::placeholder { color: #94a3b8; }

.btn-primary {
  min-height: 48px;
  min-width: 135px;
  width: 100%;
  padding-inline: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 50%, #22c55e 100%);
  color: #06090f;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

@media (min-width: 540px) {
  .btn-primary {
    width: auto;
    min-height: 44px;
    border-radius: 9999px;
  }
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(74, 222, 128, 0.5);
}

.btn-icon { width: 15px; height: 15px; }

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-primary[data-state="loading"] .btn-spinner { display: inline-block; }
.btn-primary[data-state="loading"] .btn-text,
.btn-primary[data-state="loading"] .btn-icon { display: none; }

.form-feedback {
  min-height: 22px;
  font-size: 0.8125rem;
  margin-top: 6px;
}

.form-feedback.success {
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
}

@media (min-width: 900px) {
  .form-feedback.success,
  .form-feedback.error {
    justify-content: flex-start;
  }
}

.form-feedback.error {
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
}

/* --- RIGHT SIDE: TRANSPARENT LIQUID GLASS 3D QUANTUM HUD (iOS STYLE) --- */
.battery-3d-visual-container {
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  perspective-origin: center center;
}

.battery-3d-card {
  position: relative;
  width: 100%;
  max-width: 410px;
  padding: 1.75rem;
  /* Ultra-Transparent Luminous Liquid Glass Base */
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(255, 255, 255, 0.08) 100%
  );
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 32px;
  backdrop-filter: blur(var(--liquid-blur, 36px)) saturate(190%) contrast(108%);
  -webkit-backdrop-filter: blur(var(--liquid-blur, 36px)) saturate(190%) contrast(108%);
  box-shadow: 
    inset 0 1.5px 2px rgba(255, 255, 255, 0.35),
    inset 0 -1.5px 2px rgba(255, 255, 255, 0.1),
    inset 1px 0 2px rgba(255, 255, 255, 0.2),
    0 24px 60px -12px rgba(0, 0, 0, 0.85),
    0 0 45px rgba(56, 189, 248, 0.15);
  transform-style: preserve-3d;
  will-change: transform, backdrop-filter, box-shadow;
  transform: perspective(1200px)
             rotateX(var(--liquid-tilt-x, 0deg))
             rotateY(var(--liquid-tilt-y, 0deg))
             scaleY(var(--liquid-scale-y, 1))
             scaleX(var(--liquid-scale-x, 1))
             translateY(var(--liquid-scroll-y, 0px));
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

/* Dynamic Liquid Refraction Sheen (follows scroll & cursor) */
.battery-3d-card::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at var(--liquid-sheen-x, 40%) var(--liquid-sheen-y, 30%),
    rgba(255, 255, 255, 0.35) 0%,
    rgba(56, 189, 248, 0.15) 25%,
    rgba(255, 255, 255, 0) 65%
  );
  pointer-events: none;
  mix-blend-mode: overlay;
  transition: opacity 0.3s ease;
  transform: translateZ(10px);
}

/* Fluid Meniscus Rim Glow */
.battery-3d-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 30px;
  padding: 1px;
  background: linear-gradient(
    var(--liquid-angle, 135deg),
    rgba(255, 255, 255, 0.55),
    rgba(56, 189, 248, 0.35),
    rgba(74, 222, 128, 0.3),
    rgba(255, 255, 255, 0.4)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.battery-3d-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -2px 3px rgba(255, 255, 255, 0.2),
    0 32px 75px -12px rgba(0, 0, 0, 0.95),
    0 0 55px rgba(56, 189, 248, 0.25);
}

/* HUD Top Status Bar & Tab Switcher */
.hud-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.65rem;
  gap: 0.5rem;
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-size: 0.6875rem;
  font-weight: 600;
}

.hud-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
  animation: pulseDot 1.2s infinite alternate;
}

.hud-tab-switcher {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 2px 3px;
}

.hud-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-tab-btn:hover {
  color: #e2e8f0;
}

.hud-tab-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.45);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

/* Dynamic Main Cockpit Display Viewports */
.hud-main-display {
  position: relative;
  min-height: 180px;
  margin-bottom: 0.85rem;
}

.hud-view-pane {
  display: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hud-view-pane.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* TAB 1: SOC Hero & Glass Tube Gauge */
.bms-soc-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
}

.soc-metric-group {
  display: flex;
  flex-direction: column;
}

.soc-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 2px;
}

.soc-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.soc-main-val {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1;
}

.soc-unit {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-left: 1px;
}

.soc-delta-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ade80;
}

.soh-badge-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.soh-badge-title {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: #94a3b8;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.soh-badge-val {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #4ade80;
}

/* Glass Battery Pack Visualizer */
.glass-battery-tube-wrapper {
  margin-bottom: 0.75rem;
}

.glass-tube-gauge {
  height: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.glass-tube-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8 0%, #4ade80 75%, #22c55e 100%);
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-tube-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-evenly;
  pointer-events: none;
}

.glass-tube-ticks span {
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.18);
}

.tube-spec-row {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #94a3b8;
}

.tube-spec-status {
  color: var(--color-primary);
  font-weight: 600;
}

/* Sparkline Telemetry Graph */
.bms-telemetry-graph-card {
  background: rgba(6, 9, 15, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}

.graph-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: #94a3b8;
  margin-bottom: 4px;
}

.graph-live-beacon {
  color: #4ade80;
  font-weight: 700;
  animation: pulseDot 1s infinite alternate;
}

.sparkline-container {
  position: relative;
  width: 100%;
  height: 48px;
  overflow: hidden;
}

.sparkline-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sparkline-point {
  animation: pulseDot 1s infinite alternate;
}

.graph-scan-needle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: linear-gradient(180deg, transparent 0%, #38bdf8 50%, transparent 100%);
  box-shadow: 0 0 6px #38bdf8;
  animation: scanSweep 3s ease-in-out infinite;
}

/* TAB 2: 4S Cell Matrix */
.cell-matrix-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #94a3b8;
  margin-bottom: 0.65rem;
}

.cell-delta-pill {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
  padding: 1px 6px;
  border-radius: 9999px;
}

.cell-matrix-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cell-row {
  display: grid;
  grid-template-columns: 52px 1fr 62px 10px;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-family: var(--font-mono);
}

.cell-name {
  font-size: 0.625rem;
  color: #94a3b8;
  font-weight: 600;
}

.cell-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.cell-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #4ade80);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.cell-volt {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #ffffff;
  text-align: right;
}

.cell-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
}

/* TAB 3: SOH & Predictive Health Diagnostics */
.health-diag-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.diag-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.diag-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.diag-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 2px;
}

.diag-val.accent {
  color: #4ade80;
}

.diag-val.primary {
  color: var(--color-primary);
}

.diag-sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: #94a3b8;
}

/* Telemetry Grid Chips */
.battery-telemetry-hud {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
}

.hud-stat-item {
  display: flex;
  flex-direction: column;
}

.hud-stat-label {
  font-size: 0.58rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.hud-stat-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
}

@keyframes scanSweep {
  0% { left: 0%; opacity: 0.2; }
  50% { opacity: 0.9; }
  100% { left: 100%; opacity: 0.2; }
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 1; }
}

/* --- FOOTER --- */
.site-footer {
  padding-top: 1.25rem;
  padding-bottom: 1.75rem;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

@media (min-width: 768px) {
  .footer-inner { flex-direction: row; }
}

.social-links-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-link-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(12, 19, 31, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.social-link-btn:hover {
  color: #06090f;
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.35);
}

.social-icon { width: 17px; height: 17px; }

/* --- KEYFRAME ANIMATIONS --- */
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes logoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 2px 8px rgba(2, 132, 199, 0.35)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 4px 14px rgba(2, 132, 199, 0.5)); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes batteryFloat {
  0% {
    transform: translateY(0px) rotateY(-4deg) rotateX(2deg);
  }
  50% {
    transform: translateY(-14px) rotateY(6deg) rotateX(-3deg);
  }
  100% {
    transform: translateY(0px) rotateY(-4deg) rotateX(2deg);
  }
}

@keyframes textFloat {
  0% { transform: translateY(0px); letter-spacing: 0.08em; }
  100% { transform: translateY(-4px); letter-spacing: 0.09em; }
}

@keyframes letterWave {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-9px) rotate(1.5deg);
  }
  100% {
    transform: translateY(2px) rotate(-1deg);
  }
}

@keyframes chromaGlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes floatingIsland {
  0% {
    transform: translateY(0px);
  }
  100% {
    transform: translateY(-4px);
  }
}

@keyframes segmentPulse {
  0% { opacity: 0.85; }
  100% { opacity: 1; filter: brightness(1.2); }
}

/* --- LUXURY TOAST NOTIFICATION SYSTEM (iOS STYLE) --- */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-width: calc(100vw - 2rem);
}

@media (max-width: 600px) {
  .toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    align-items: center;
  }
}

.toast {
  pointer-events: auto;
  position: relative;
  width: 380px;
  max-width: 100%;
  background: rgba(12, 19, 31, 0.88);
  backdrop-filter: blur(28px) saturate(190%) contrast(105%);
  -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(105%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1rem 1.15rem 1.15rem 1.15rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
              0 20px 45px -10px rgba(0, 0, 0, 0.85),
              0 0 30px rgba(56, 189, 248, 0.15);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transform: translateX(120%) scale(0.92);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  overflow: hidden;
}

@media (max-width: 600px) {
  .toast {
    transform: translateY(-120%) scale(0.92);
  }
}

.toast.show {
  transform: translate(0, 0) scale(1);
  opacity: 1;
}

.toast.hide {
  transform: translateX(120%) scale(0.92);
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 600px) {
  .toast.hide {
    transform: translateY(-120%) scale(0.92);
  }
}

.toast-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast.toast-success .toast-icon-box {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.35);
  color: #4ade80;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.25);
}

.toast.toast-error .toast-icon-box {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #f87171;
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.25);
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.toast-desc {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background-color 0.15s ease;
  margin-top: -2px;
  margin-right: -4px;
}

.toast-close-btn:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.05);
}

.toast-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(15, 23, 42, 0.06);
}

.toast-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
}

.toast-success .toast-progress-bar {
  background: linear-gradient(90deg, #0284c7 0%, #16a34a 100%);
}

.toast-error .toast-progress-bar {
  background: #dc2626;
}

/* ==========================================================================
   MOBILE RESPONSIVE SYSTEM (iPhone 5 / 320px to Modern Android / 430px+)
   ========================================================================== */

/* --- Tablet & Medium Screens (max-width: 899px) --- */
@media (max-width: 899px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    padding-block: 1.5rem 2rem;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .battery-3d-visual-container {
    width: 100%;
    max-width: 440px;
    margin-inline: auto;
  }
}

/* --- Mobile Viewports (max-width: 600px) --- */
@media (max-width: 600px) {
  html {
    font-size: 15px;
  }

  .container {
    padding-inline: 1rem;
  }

  .site-header {
    top: 0.65rem;
    padding-inline: 0.65rem;
  }

  .header-inner {
    padding: 0.45rem 0.85rem;
    gap: 0.75rem;
  }

  .brand-logo-img {
    width: 28px;
    height: 28px;
  }

  .brand-text {
    font-size: 1.125rem;
  }

  .nav-links {
    gap: 0.4rem;
  }

  .nav-link-item {
    padding: 4px 8px;
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
  }

  .nav-link-item#nav-subscribe-btn {
    padding: 5px 11px;
  }

  .hero-wrapper {
    gap: 1.75rem;
    padding-block: 1rem 1.5rem;
  }

  .kicker-pill {
    padding: 4px 11px;
    font-size: 0.6875rem;
    margin-bottom: 0.85rem;
  }

  .main-title {
    font-size: clamp(1.75rem, 8.5vw, 3.25rem);
    letter-spacing: 0.03em;
    margin-bottom: 0.85rem;
  }

  .hero-description {
    font-size: 0.9375rem;
    line-height: 1.55;
    margin-bottom: 1.35rem;
    padding-inline: 0.25rem;
  }

  .notify-form-container {
    max-width: 100%;
  }

  .battery-3d-card {
    padding: 1.15rem 0.9rem;
    border-radius: 20px;
    max-width: 100%;
  }

  .hud-top-bar {
    font-size: 0.625rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
  }

  .hud-tab-btn {
    font-size: 0.58rem;
    padding: 2px 6px;
  }

  .bms-soc-hero {
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.6rem;
  }

  .soc-main-val {
    font-size: 1.35rem;
  }

  .cell-row {
    grid-template-columns: 48px 1fr 56px 8px;
    gap: 6px;
    padding: 0.35rem 0.5rem;
  }

  .diag-card {
    padding: 0.5rem 0.6rem;
  }

  .diag-val {
    font-size: 1rem;
  }

  .battery-telemetry-hud {
    gap: 0.5rem 0.75rem;
    padding-top: 0.65rem;
  }

  .hud-stat-label {
    font-size: 0.55rem;
  }

  .hud-stat-value {
    font-size: 0.875rem;
  }

  .footer-inner {
    font-size: 0.75rem;
    gap: 0.85rem;
  }

  .social-link-btn {
    width: 36px;
    height: 36px;
  }
}

/* --- Compact Mobile: iPhone 5 / SE / Galaxy Fold (max-width: 380px) --- */
@media (max-width: 380px) {
  html {
    font-size: 14px;
  }

  .container {
    padding-inline: 0.75rem;
  }

  .site-header {
    top: 0.45rem;
    padding-inline: 0.45rem;
  }

  .header-inner {
    padding: 0.35rem 0.65rem;
    gap: 0.4rem;
  }

  .brand-logo-img {
    width: 24px;
    height: 24px;
  }

  .brand-text {
    font-size: 0.95rem;
  }

  .nav-links {
    gap: 0.25rem;
  }

  .nav-link-item {
    padding: 3px 6px;
    font-size: 0.625rem;
  }

  .nav-link-item#nav-subscribe-btn {
    padding: 4px 8px;
    font-size: 0.625rem;
  }

  .main-title {
    font-size: clamp(1.5rem, 8vw, 2.25rem);
    letter-spacing: 0.02em;
  }

  .main-title .char:hover {
    transform: translateY(-4px) scale(1.06);
  }

  .email-input {
    height: 44px;
    padding-left: 2.3rem;
  }

  .btn-primary {
    min-height: 44px;
    font-size: 0.875rem;
  }

  .battery-3d-card {
    padding: 0.85rem 0.65rem;
    border-radius: 18px;
  }

  .hud-top-bar {
    font-size: 0.55rem;
    margin-bottom: 0.6rem;
    padding-bottom: 0.4rem;
  }

  .hud-tab-switcher {
    gap: 2px;
    padding: 1px 2px;
  }

  .hud-tab-btn {
    font-size: 0.52rem;
    padding: 2px 5px;
  }

  .bms-soc-hero {
    padding: 0.4rem 0.5rem;
  }

  .soc-main-val {
    font-size: 1.2rem;
  }

  .soc-delta-badge {
    font-size: 0.55rem;
    padding: 1px 4px;
  }

  .soh-badge-val {
    font-size: 0.68rem;
  }

  .cell-row {
    grid-template-columns: 42px 1fr 50px 6px;
    gap: 4px;
    padding: 0.3rem 0.4rem;
  }

  .cell-name {
    font-size: 0.55rem;
  }

  .cell-volt {
    font-size: 0.62rem;
  }

  .diag-card {
    padding: 0.4rem 0.5rem;
  }

  .diag-val {
    font-size: 0.92rem;
  }

  .battery-telemetry-hud {
    gap: 0.4rem 0.5rem;
    padding-top: 0.5rem;
  }

  .hud-stat-value {
    font-size: 0.8rem;
  }

  .preloader-content {
    padding: 1rem 0.75rem;
  }

  .preloader-brand-text {
    font-size: 1.15rem;
  }

  .halo-ring-outer {
    width: 140px;
    height: 140px;
  }

  .halo-ring-inner {
    width: 120px;
    height: 120px;
  }

  .battery-frame {
    width: 110px;
    height: 50px;
  }

  .telemetry-val {
    font-size: 0.9rem;
  }

  .social-link-btn {
    width: 32px;
    height: 32px;
  }
}


