:root {
  --top-bar: #101820;
  --text-white: #ffffff;
  --icon-color: #FFD700; /* Amarillo Oro TBC */
  --modal-bg: rgba(0, 0, 0, 0.6);
  --panel-bg: #ffffff;
  --nav-fg: var(--icon-color);
  
  /* WEATHER COLORS (Default: Cloudy/Neutral) */
  --sky-color-1: #6a8caf;
  --sky-color-2: #85a8c4;
  --sky-color-3: #adb7c0;
  --cloud-color: #f3f6fb;
}

body.weather-sunny {
  --sky-color-1: #345c99;
  --sky-color-2: #5a8ac7;
  --sky-color-3: #93c3dc;
  --cloud-color: #f7fbff;
}

body.weather-rainy {
  --sky-color-1: #4a5d73;
  --sky-color-2: #65798e;
  --sky-color-3: #8a96a3;
  --cloud-color: #cfd7e0;
}

body.is-night {
  --sky-color-1: #0b1430;
  --sky-color-2: #122046;
  --sky-color-3: #1c2d5c;
}

body.is-night.weather-cloudy {
  --sky-color-1: #0f1936;
  --sky-color-2: #162446;
  --sky-color-3: #203058;
}

body.is-night.weather-rainy,
body.is-night.weather-storm {
  --sky-color-1: #0a1226;
  --sky-color-2: #101c33;
  --sky-color-3: #152040;
  --cloud-color: #a6b2c1;
}

body.offline .hud {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden; 
  font-family: "Open Sans", system-ui, sans-serif;
  font-weight: 600;
  background: var(--sky-color-1);
  color: var(--text-white);
  transition: background 1s ease;
}

h1, h2, h3, h4, .main-height, .top-nav .logo-btn {
  font-family: "Open Sans", system-ui, sans-serif;
  letter-spacing: 0.5px;
}

.sky-top { stop-color: var(--sky-color-1); transition: stop-color 1s ease; }
.sky-mid { stop-color: var(--sky-color-2); transition: stop-color 1s ease; }
.sky-bottom { stop-color: var(--sky-color-3); transition: stop-color 1s ease; }


.app-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* TOP ACTION BAR */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  height: 56px;
  background: var(--top-bar);
  z-index: 10;
  color: var(--nav-fg);
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  backdrop-filter: blur(8px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-btn {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.icon-btn {
  background: none;
  border: none;
  color: inherit;
  width: 38px;
  height: 38px;
  padding: 6px;
  cursor: pointer;
}

.icon-btn svg { width: 100%; height: 100%; }

.menu-btn {
  margin-left: 4px;
}

/* MENU DRAWER */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 280px;
  background: rgba(10, 16, 28, 0.96);
  color: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 21;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.35);
}

.menu-drawer.active {
  transform: translateX(0);
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.menu-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--icon-color);
  text-transform: uppercase;
}

.menu-link {
  border: none;
  background: transparent;
  color: #e8edf3;
  text-align: left;
  padding: 10px 2px;
  border-radius: 0;
  font-size: 0.98rem;
  cursor: pointer;
  letter-spacing: 0.2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.menu-link:active {
  transform: none;
}

.menu-link:hover {
  color: var(--icon-color);
  padding-left: 6px;
}

/* SECTION PANELS */
.section-layer {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  pointer-events: none;
}

.content-section {
  position: absolute;
  inset: 0;
  padding: 18px 16px 24px;
  background: linear-gradient(135deg, rgba(255, 243, 214, 0.98), rgba(255, 204, 154, 0.98));
  color: #1b2a34;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  overflow-y: auto;
  pointer-events: auto;
}

/* Legales: conservar tono azul anterior */
#section-legales.content-section {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #e2e8f0;
}

#section-legales .section-title,
#section-legales .section-title svg {
  color: #f8fafc;
}

#section-legales p,
#section-legales li {
  color: #e2e8f0;
}

#section-legales a {
  color: #e2e8f0;
}

#section-legales .section-back {
  background: #1e3a8a;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

#section-legales .section-back:hover {
  background: #1d4ed8;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

.content-section h2,
.content-section h3,
.content-section h4 {
  color: #111317;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.content-section p,
.content-section li {
  color: #394852;
  line-height: 1.5;
}

.content-section a {
  color: #111317;
}

.rower-hidden {
  display: none;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title svg {
  width: 18px;
  height: 18px;
  color: #111317;
  flex-shrink: 0;
}

.section-title.is-emphasis {
  font-size: 20px;
  letter-spacing: 0.3px;
}

.section-title.is-emphasis svg {
  width: 20px;
  height: 20px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  width: 16px;
  height: 16px;
  color: #111317;
  flex-shrink: 0;
}

.content-section.active {
  opacity: 1;
  transform: translateY(0);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: 18px;
  color: #111317;
}

.section-back {
  background: linear-gradient(135deg, rgba(255, 214, 120, 0.95), rgba(255, 176, 74, 0.95));
  color: #1b2a34;
  border: 1px solid rgba(200, 120, 40, 0.45);
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.4px;
}

/* Legales: botón sobrio (forzar sobre estilo base) */
#section-legales .section-back {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: none !important;
}

#section-legales .section-back:hover {
  background: #0f172a !important;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25) !important;
}

.section-card {
  border: 1px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #ffb347, #ffcc70) border-box;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  color: #1b2a34;
}

.section-card h3,
.section-card h4 {
  color: #111317;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 10px;
}

.section-card p {
  color: #394852;
  line-height: 1.5;
}

.section-intro {
  margin-bottom: 12px;
  color: #3a4852;
  line-height: 1.5;
}

.asociate-hero2 {
  background: #f7fbff;
  border: 1px solid rgba(120, 150, 170, 0.22);
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.asociate-hero2::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(161, 198, 219, 0.45);
  filter: blur(0.5px);
}

.asociate-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 214, 120, 0.95), rgba(255, 186, 94, 0.95));
  color: #111317;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.asociate-hero2 h3 {
  margin-top: 8px;
  font-size: 20px;
  color: #111317;
}

.asociate-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.cta-chip {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 214, 120, 0.9), rgba(255, 186, 94, 0.9));
  border: 1px solid rgba(200, 120, 40, 0.4);
  font-size: 12px;
  font-weight: 600;
  color: #111317;
}

.asociate-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.asociate-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #ffb347, #ffcc70) border-box;
  border-radius: 18px;
  padding: 16px;
  color: #1b2a34;
}

.step-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111317;
  background: transparent;
  flex-shrink: 0;
}

.step-icon svg {
  width: 24px;
  height: 24px;
  color: #111317;
}

.step-content h4 {
  margin-top: 4px;
  margin-bottom: 6px;
  font-size: 16px;
}

.step-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #5a6a75;
}

.asociate-banner {
  border: 1px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #ffb347, #ffcc70) border-box;
  border-radius: 18px;
  padding: 16px;
  color: #1b2a34;
}

.banner-title {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 214, 120, 0.98), rgba(255, 176, 74, 0.98));
  color: #111317;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.asociate-banner p {
  margin-top: 10px;
}

.form-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #1b2a34;
  border: 1px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #ffb347, #ffcc70) border-box;
  border-radius: 16px;
  padding: 14px 16px;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.form-item-icon {
  width: 22px;
  height: 22px;
  color: #111317;
  flex-shrink: 0;
}

.form-item-content {
  display: flex;
  flex-direction: column;
}

.form-item:hover {
  background: #f4f7fa;
  box-shadow: 0 10px 18px rgba(22, 45, 60, 0.12);
  transform: translateY(-1px);
}

.form-item:active {
  transform: scale(0.99);
}

.form-title {
  font-size: 15px;
  font-weight: 700;
  color: #111317;
}

.form-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #60707c;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: #1b2a34;
  border-radius: 14px;
  border: 1px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #ffb347, #ffcc70) border-box;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.contact-link:hover {
  background: #f4f7fa;
  box-shadow: 0 10px 18px rgba(22, 45, 60, 0.12);
  transform: translateY(-1px);
}

.contact-link:active {
  transform: translateY(0);
}

.contact-link svg {
  width: 22px;
  height: 22px;
  color: #111317;
}

.contact-link span {
  font-size: 14px;
  font-weight: 600;
}

.club-card .info-shield {
  margin-top: 0;
}

.club-card .club-link {
  color: var(--icon-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 10px;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  background: #e9f0f6;
  border: 1px solid rgba(120, 150, 170, 0.22);
}

.club-card .club-link:hover {
  text-decoration: none;
  background: #dfeaf2;
  box-shadow: 0 10px 18px rgba(22, 45, 60, 0.12);
  transform: translateY(-1px);
  color: #1b2a34;
}

body.section-open .hud,
body.section-open .bottom-info,
body.section-open .fab-info,
body.section-open .fab-config {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 420px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .asociate-step {
    flex-direction: column;
  }
}

/* WEATHER ANIMATIONS */
@keyframes cloudDrift {
  0% { transform: translateX(0); }
  50% { transform: translateX(80px); }
  100% { transform: translateX(0); }
}

@keyframes rainDrop {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -120; }
}

@keyframes rainDropFast {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -90; }
}

@keyframes dropFall {
  0% { transform: translateY(-120px) scale(1); opacity: 0; }
  10% { opacity: 0.9; }
  100% { transform: translateY(1200px) scale(1.02); opacity: 0.1; }
}

@keyframes sunPulse {
  0% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); opacity: 0.95; }
}

@keyframes moonDrift {
  0% { transform: translate(0, 0); }
  50% { transform: translate(6px, -4px); }
  100% { transform: translate(0, 0); }
}

@keyframes starTwinkle {
  0% { opacity: 0.35; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

@keyframes lightningFlash {
  0%, 82%, 100% { opacity: 0; }
  84% { opacity: 0.9; }
  86% { opacity: 0.1; }
  88% { opacity: 0.8; }
  90% { opacity: 0; }
}

.falling-rain {
  animation: rainDrop 0.8s linear infinite;
  stroke-linecap: round;
}

.falling-rain.rain-fast {
  animation: rainDropFast 0.5s linear infinite;
  opacity: 0.6;
}

.falling-rain.rain-fine {
  animation: rainDropFast 0.35s linear infinite;
  opacity: 0.45;
}

.falling-rain.rain-thick {
  animation: rainDrop 0.7s linear infinite;
}

/* VECTOR SCENE */
.vector-scene {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

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

/* Fish visibility and polish */
.fish-body {
  filter: drop-shadow(0 6px 6px rgba(0,0,0,0.35)) brightness(1.05);
}

.fish-body path,
.fish-body ellipse {
  stroke: rgba(255,255,255,0.18);
  stroke-width: 1.5;
  paint-order: stroke fill;
}

body.is-night .fish-body {
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.45)) brightness(1.35);
}

body.is-night .fish-body path,
body.is-night .fish-body ellipse {
  stroke: rgba(120,200,255,0.6);
}

body.is-night .fish-body ellipse {
  filter: drop-shadow(0 0 6px rgba(120,200,255,0.45));
}

/* Night water tint */
body.is-night #water-rect-night {
  opacity: 0.22;
}

/* Night water foreground tint (covers the boat's submerged hull at night) */
body.is-night #water-front-night {
  opacity: 0.22;
}

/* Bubbles */
#bubble-layer .bubble {
  fill: rgba(210, 235, 255, 0.32);
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
  animation: bubbleRise 6s linear infinite;
}

#bubble-layer .bubble-a { animation-duration: 5.5s; animation-delay: 0s; }
#bubble-layer .bubble-b { animation-duration: 7s; animation-delay: -1s; }
#bubble-layer .bubble-c { animation-duration: 6.2s; animation-delay: -2s; }
#bubble-layer .bubble-d { animation-duration: 7.5s; animation-delay: -0.5s; }
#bubble-layer .bubble-e { animation-duration: 6.8s; animation-delay: -1.8s; }
#bubble-layer .bubble-f { animation-duration: 8s; animation-delay: -2.5s; }

@keyframes bubbleRise {
  0% { transform: translateY(0) scale(0.9); opacity: 0; }
  10% { opacity: 0.6; }
  100% { transform: translateY(-420px) scale(1.15); opacity: 0; }
}

#layer-rain {
  transform-origin: 540px 800px;
  transform: rotate(var(--rain-tilt, -6deg));
  transition: transform 0.6s ease;
}

#layer-rain .drop {
  fill: rgba(255, 255, 255, 0.75);
  animation: dropFall 1.1s linear infinite;
  transform-origin: center;
}

#layer-rain .drop-a { animation-duration: 1.1s; animation-delay: 0s; opacity: 0.85; }
#layer-rain .drop-b { animation-duration: 0.95s; animation-delay: -0.4s; opacity: 0.65; }
#layer-rain .drop-c { animation-duration: 1.25s; animation-delay: -0.8s; opacity: 0.5; }

body.rain-intensity-0 #layer-rain { opacity: 0; }
body.rain-intensity-1 #layer-rain { opacity: 0.25; }
body.rain-intensity-2 #layer-rain { opacity: 0.45; }
body.rain-intensity-3 #layer-rain { opacity: 0.7; }
body.rain-intensity-4 #layer-rain { opacity: 0.95; }

body.rain-intensity-1 #layer-rain .drop { animation-duration: 1.8s; }
body.rain-intensity-2 #layer-rain .drop { animation-duration: 1.4s; }
body.rain-intensity-3 #layer-rain .drop { animation-duration: 1.1s; }
body.rain-intensity-4 #layer-rain .drop { animation-duration: 0.9s; }

.cloud path {
  fill: var(--cloud-color) !important;
}

.storm-cloud path {
  fill: #2b3644;
  opacity: 0.92;
}

body.is-night .storm-cloud path {
  fill: #1d2531;
}

.storm-cloud {
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.35));
}
#layer-sun {
  animation: sunPulse 6s ease-in-out infinite;
}

#layer-moon {
  animation: moonDrift 10s ease-in-out infinite;
}

#layer-stars .star {
  fill: rgba(255, 255, 255, 0.95);
  animation: starTwinkle 4s ease-in-out infinite;
}

#layer-stars .star-1 { animation-delay: 0s; }
#layer-stars .star-2 { animation-delay: 1s; }
#layer-stars .star-3 { animation-delay: 2s; }
#layer-stars .star-4 { animation-delay: 0.5s; }
#layer-stars .star-5 { animation-delay: 1.5s; }
#layer-stars .star-6 { animation-delay: 2.5s; }
#layer-stars .star-7 { animation-delay: 3s; }
#layer-stars .star-8 { animation-delay: 0.8s; }
#layer-stars .star-9 { animation-delay: 1.8s; }
#layer-stars .star-10 { animation-delay: 2.8s; }
#layer-stars .star-11 { animation-delay: 3.4s; }
#layer-stars .star-12 { animation-delay: 4s; }

body.weather-storm #layer-lightning {
  animation: lightningFlash 6s infinite;
}



/* HUD OVERLAY */
.hud {
  position: absolute;
  top: 90px;
  width: 100%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.main-height {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.main-height .trend {
  font-size: 50px;
  font-weight: 500;
  margin-right: 12px;
  transform: translateY(-4px);
}

.main-height .value {
  font-size: 65px;
  font-weight: 700;
  letter-spacing: -2px;
}

.main-height .unit {
  font-size: 28px;
  font-weight: 500;
  margin-left: 12px;
  align-self: flex-end;
  margin-bottom: 24px;
}

.weather {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 600;
  margin-top: 15px;
}

.w-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.w-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.w-item svg {
  width: 20px;
  height: 20px;
}

/* BOTTOM TEXT */
.bottom-info {
  position: absolute;
  bottom: 20px;
  width: 100%;
  z-index: 5;
  text-align: center;
  color: var(--text-white);
  text-shadow: 0 1px 3px rgba(0,0,0,0.4); 
}

.bottom-title {
  font-size: 12px;
  font-weight: 400;
  margin-bottom: 2px;
}

.bottom-sub {
  font-size: 11px;
  opacity: 0.9;
  font-weight: 600;
}

/* WATER TWEEN CSS */
/* Handled by GSAP now */
/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-bg);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--panel-bg);
  color: #333;
  width: 320px;
  border-radius: 16px;
  padding: 32px 24px;
  position: relative;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.modal-content.install-modal-content {
  text-align: left;
  max-width: 320px;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  background: #eee;
  border-radius: 50%;
  font-weight: bold;
  color: #666;
  cursor: pointer;
}

.modal-content h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.qr-box {
  border: 1px dashed #ccc;
  padding: 12px;
  display: inline-block;
  border-radius: 8px;
}

.qr-box img {
  width: 200px;
  height: 200px;
  display: block;
}

.info-shield {
  max-height: 130px;
  width: auto;
  margin-bottom: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border: 4px solid #111111;
  border-radius: 12px;
  object-fit: contain;
}

.info-address {
  margin-top: 15px;
  font-weight: normal;
  font-size: 0.9em;
}

.info-link {
  margin-top: 15px;
}

.club-link {
  color: #1b2a34;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95em;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: #e9f0f6;
  border: 1px solid rgba(120, 150, 170, 0.22);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.club-link:hover {
  background: #dfeaf2;
  box-shadow: 0 10px 18px rgba(22, 45, 60, 0.12);
  transform: translateY(-1px);
}

.dev-title {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.dev-version {
  font-size: 1rem;
  color: #a0aec0;
  margin-bottom: 25px;
}

.dev-card {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: left;
}

.dev-card p {
  font-size: 0.95rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.btn-terms {
  width: 100%;
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 15px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.btn-terms:hover {
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

body.modal-open .fab-info,
body.modal-open .fab-config {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.terms-sheet {
  padding: 45px 25px 25px 25px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.terms-title {
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.terms-box {
  background: rgba(0,0,0,0.25);
  padding: 20px;
  border-radius: 12px;
  overflow-y: auto;
  text-align: left;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.6;
  flex-grow: 1;
  border: 1px solid #334155;
}

.terms-box p,
.terms-box strong,
.terms-box b {
  color: #e2e8f0;
}

.terms-box strong {
  color: #ffffff;
}

.phone-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #ffb347, #ffcc70) border-box;
  text-decoration: none;
  color: #1b2a34;
  margin-bottom: 10px;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.transfer-card {
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f7f7f7 100%);
  box-shadow: 0 12px 24px rgba(17, 19, 23, 0.08);
  overflow: hidden;
}

.transfer-card::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 64px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.04));
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.phone-card:hover {
  background: #f4f7fa;
  box-shadow: 0 10px 18px rgba(22, 45, 60, 0.12);
  transform: translateY(-1px);
}

.config-option {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 12px;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #ffb347, #ffcc70) border-box;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  color: #111317;
  margin-bottom: 10px;
  text-align: center;
  font-size: 0.88rem;
  min-width: 110px;
  width: 110px;
}

.config-option.active {
  box-shadow: 0 10px 18px rgba(22, 45, 60, 0.12);
  transform: translateY(-1px);
}

.config-options {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}

#config-modal .config-option {
  margin-bottom: 0;
}

#config-modal .dev-title {
  color: #ffe7a3;
}


.install-title {
  text-align: center;
  margin-bottom: 20px;
}

.install-subtitle {
  color: #61dafb;
  font-size: 1.1em;
}

.install-text {
  font-size: 0.9em;
  margin-top: 5px;
}

.install-text.spaced {
  margin-bottom: 20px;
}

/* Bottom Sheet Modal Variation */
.modal-overlay {
  align-items: center; /* Default back to center */
}

.modal-overlay.bottom-sheet-overlay {
  align-items: flex-end; 
}

.modal-sheet {
  box-sizing: border-box;
  background: #1e293b; /* Dark navy premium tone */
  color: #f8fafc;
  width: 100%;
  max-width: 480px;
  border-radius: 28px 28px 0 0;
  padding: 45px 30px 40px 30px;
  position: relative;
  text-align: center;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.4);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.modal-overlay.active .modal-sheet {
  transform: translateY(0);
}

/* DESKTOP / NOTEBOOK OPTIMIZATION */
@media (min-width: 600px) {
  body {
    background: #0f172a !important; /* Dark neutral background for desktop */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto; /* allow some scroll if height is tight */
  }
  
  .app-container {
    max-width: 450px;
    height: 92vh;
    max-height: 900px;
    margin: auto;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 100px rgba(0,0,0,0.6);
    border: 8px solid #1e293b; /* Premium border "bezel" */
  }
}

/* FLOATING INFO BUTTON */
.fab-info {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  transition: transform 0.2s, background 0.2s;
}

.fab-info:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.3);
}

.fab-info svg {
  width: 26px;
  height: 26px;
}

/* FLOATING CONFIG BUTTON */
.fab-config {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  transition: transform 0.2s, background 0.2s;
}

.fab-config:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.3);
}

.fab-config svg {
  width: 24px;
  height: 24px;
}

/* PULL TO REFRESH STYLES */
.ptr-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1; /* Detrás de la app */
  pointer-events: none;
  opacity: 0;
}

.ptr-icon {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
}

.ptr-loading .ptr-icon {
  animation: ptr-spin 0.8s linear infinite;
}

@keyframes ptr-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.app-container {
  position: relative;
  z-index: 10; /* Encima del indicador */
  background: var(--sky-color-1);
  will-change: transform;
}

/* JUNCOS — ahora dentro del SVG principal, antes de water-layer.
   El agua (water-rect + water-front) se pinta encima automáticamente,
   y la porción sumergida varía en tiempo real con la API de altura del río. */
#juncos-svg-layer {
  filter: drop-shadow(6px 12px 10px rgba(0,0,0,0.25));
}

/* JUNCO ANIMATION
   transform-box: fill-box es crítico: hace que transform-origin: bottom center
   resuelva al bounding box de CADA junco, no al viewport del SVG principal.
   Sin esto, la animación rota alrededor de (540,1920) y los manda fuera de pantalla. */
.junco {
  transform-box: fill-box;
  transform-origin: bottom center;
  animation: junco-sway 6s ease-in-out infinite;
}

@keyframes junco-sway {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(2.5deg) skewX(1deg); }
  60% { transform: rotate(-1.5deg) skewX(-1deg); }
}

/* ===== CLUB SELECTOR ===== */

.club-selector-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: linear-gradient(160deg, #0d1b2a 0%, #1b2e45 60%, #0d1b2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow-y: auto;
}

.club-selector-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.club-selector-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 40px;
  max-width: 420px;
  width: 100%;
  gap: 8px;
}

.club-selector-logo {
  color: rgba(255,255,255,0.3);
  margin-bottom: 8px;
}

.club-selector-title {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.club-selector-subtitle {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 24px;
  text-align: center;
}

.club-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.club-option {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 14px 20px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  width: 100%;
}

.club-option:hover,
.club-option:focus-visible {
  background: rgba(255,255,255,0.14);
  border-color: var(--icon-color, #FFD700);
  outline: none;
}

.club-option:active {
  transform: scale(0.97);
}

.club-option-shield {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* ===== CONFIG: CAMBIAR CLUB ===== */

.config-section-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 20px 0 16px;
}

.config-change-club {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 13px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.config-change-club:hover {
  background: rgba(255,255,255,0.12);
}
