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

body {
  background: #00020B;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  padding: 16px;
  min-height: 100vh;
  font-size: 15.4px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* Header section - reduced spacing */
header {
  text-align: center;
  padding: 10px 0 5px;
  margin-bottom: 5px;
}

.neon-title {
  font-size: 35.2px;
  font-weight: 800;
  background: linear-gradient(135deg, #2FFFEF 0%, #00FFAA 50%, #00AAFF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(47, 255, 238, 0.3);
  letter-spacing: 2px;
}

.subtitle {
  color: #00FFAA;
  font-size: 11px;
  letter-spacing: 3px;
  margin-top: 7px;
  text-shadow: 0 0 10px rgba(0, 255, 170, 0.3);
}

.card {
  background: rgba(2, 8, 20, 0.7);
  backdrop-filter: blur(12px);
  border-radius: 26px;
  padding: 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(47, 255, 238, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 100%;
}

.card-title {
  font-size: 15.4px;
  font-weight: 700;
  background: linear-gradient(135deg, #2FFFEF 0%, #00FFAA 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 18px;
  padding-left: 14px;
  border-left: 3px solid #2FFFEF;
}

.station-scroll {
  display: flex;
  overflow-x: auto;
  gap: 13px;
  padding-bottom: 9px;
  width: 100%;
}

.hourly-scroll {
  display: flex;
  overflow-x: auto;
  gap: 13px;
  padding: 9px 0;
  width: 100%;
}

/* Desktop scrollbars - visible on desktop only */
@media (min-width: 768px) {
  .station-scroll {
    scrollbar-width: thin;
  }
  
  .station-scroll::-webkit-scrollbar {
    height: 8px;
    display: block;
  }
  
  .station-scroll::-webkit-scrollbar-track {
    background: #0a1a2f;
    border-radius: 10px;
  }
  
  .station-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #2FFFEF, #00FFAA);
    border-radius: 10px;
  }
  
  .hourly-scroll {
    scrollbar-width: thin;
  }
  
  .hourly-scroll::-webkit-scrollbar {
    height: 8px;
    display: block;
  }
  
  .hourly-scroll::-webkit-scrollbar-track {
    background: #0a1a2f;
    border-radius: 10px;
  }
  
  .hourly-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #2FFFEF, #00FFAA);
    border-radius: 10px;
  }
}

.station-card {
  background: linear-gradient(135deg, #0a1a2f 0%, #061020 100%);
  border-radius: 44px;
  padding: 13px 26px;
  min-width: 143px;
  text-align: center;
  cursor: pointer;
  border: 1px solid #1AA7A7;
  transition: all 0.3s ease;
  font-size: 15.4px;
  font-weight: 600;
}

.station-card small {
  font-size: 11px;
  color: #1AA7A7;
  display: block;
  margin-top: 3px;
}

.station-card.active {
  border: 2px solid #2FFFEF;
  background: linear-gradient(135deg, #2FFFEF 0%, #00AAFF 100%);
  color: #020B24;
  box-shadow: 0 0 25px rgba(47, 255, 238, 0.6);
  transform: scale(1.02);
}

.station-card.active small {
  color: #020B24;
}

.calendar-container {
  background: linear-gradient(135deg, #0a1a2f 0%, #061020 100%);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(47, 255, 238, 0.2);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(47, 255, 238, 0.2);
}

.calendar-month-year {
  color: #2FFFEF;
  font-weight: 700;
  font-size: 16.5px;
}

.calendar-nav {
  display: flex;
  gap: 11px;
}

.calendar-nav-btn {
  background: rgba(47, 255, 238, 0.1);
  border: 1px solid rgba(47, 255, 238, 0.3);
  color: #2FFFEF;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 17.6px;
  transition: all 0.2s;
}

.calendar-nav-btn:hover {
  background: rgba(47, 255, 238, 0.2);
  transform: scale(1.05);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 9px;
  text-align: center;
}

.calendar-weekday {
  color: #00FFAA;
  font-size: 12.1px;
  font-weight: 600;
  padding: 9px 0;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14.3px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
  color: #1AA7A7;
  background: rgba(10, 26, 47, 0.5);
}

.calendar-day:hover:not(.disabled) {
  background: rgba(47, 255, 238, 0.2);
  transform: scale(1.05);
  color: #2FFFEF;
}

.calendar-day.selected {
  background: linear-gradient(135deg, #2FFFEF, #00FFAA);
  color: #020B24;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(47, 255, 238, 0.4);
}

.calendar-day.today {
  border: 2px solid #2FFFEF;
}

.calendar-day.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.dive-type-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.radio-group {
  display: flex;
  gap: 33px;
  justify-content: center;
  margin: 11px 0;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 15.4px;
  font-weight: 600;
  padding: 9px 22px;
  background: linear-gradient(135deg, #0a1a2f 0%, #061020 100%);
  border-radius: 44px;
  border: 1px solid #1AA7A7;
  transition: all 0.3s ease;
}

.radio-group label:hover {
  border-color: #2FFFEF;
  transform: translateY(-2px);
}

input[type="radio"] {
  accent-color: #2FFFEF;
  width: 17.6px;
  height: 17.6px;
  cursor: pointer;
}

.form-group {
  margin-bottom: 22px;
  width: 100%;
}

.time-group {
  margin-top: 9px;
}

.form-label {
  font-size: 12.1px;
  color: #00FFAA;
  margin-bottom: 11px;
  display: block;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.time-label-centered {
  font-size: 14.3px;
  color: #00FFAA;
  margin-bottom: 16.5px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.time-picker-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 13px;
}

.time-picker {
  display: flex;
  gap: 27px;
  justify-content: center;
  background: linear-gradient(135deg, #0a1a2f 0%, #061020 100%);
  border-radius: 26px;
  padding: 22px;
  border: 1px solid rgba(47, 255, 238, 0.25);
}

.time-spinner {
  text-align: center;
  width: 88px;
}

.spinner-label {
  font-size: 11px;
  color: #00FFAA;
  margin-bottom: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* LOCK SPINNERS HORIZONTALLY - Prevents horizontal movement on mobile */
.spinner-wheel {
  height: 242px;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  background: #01061a;
  border-radius: 18px;
  border: 1px solid #2FFFEF;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
  overscroll-behavior: contain;
  outline: none;
  position: relative;
}

.spinner-wheel::-webkit-scrollbar {
  display: none;
}

.spinner-option {
  scroll-snap-align: center;
  text-align: center;
  padding: 15.4px 0;
  font-size: 19.8px;
  font-family: monospace;
  color: #1AA7A7;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.spinner-option.selected {
  color: #2FFFEF;
  text-shadow: 0 0 10px rgba(47, 255, 238, 0.8);
  font-weight: bold;
  background: rgba(47, 255, 238, 0.2);
  transform: scale(1.08);
  border-radius: 9px;
}

.hourly-card {
  min-width: 170px;
  background: linear-gradient(135deg, #0a1a2f 0%, #061020 100%);
  border-radius: 18px;
  padding: 13px;
  border: 1px solid #1AA7A7;
  transition: all 0.3s;
  cursor: pointer;
}

.hourly-card:hover {
  transform: translateY(-3px);
  border-color: #2FFFEF;
  box-shadow: 0 5px 15px rgba(47, 255, 238, 0.15);
}

.hourly-card.highlight {
  border: 2px solid #2FFFEF;
  background: linear-gradient(135deg, #2FFFEF 0%, #00AAFF 100%);
  color: #020B24;
  box-shadow: 0 0 25px rgba(47, 255, 238, 0.5);
  transform: scale(1.02);
}

.hourly-card.highlight strong {
  color: #020B24;
  font-size: 19.8px;
}

.hourly-card.highlight div {
  color: #020B24;
}

.tide-event {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 13px;
  background: rgba(0, 170, 255, 0.05);
  border-radius: 13px;
  margin-bottom: 9px;
  border-left: 3px solid #2FFFEF;
  font-size: 14.3px;
}

.springs-text { color: #ff6b6b; font-weight: 700; }
.neaps-text { color: #6bff6b; font-weight: 700; }

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid rgba(47, 255, 238, 0.1);
  font-size: 14.3px;
}

.detail-row strong {
  color: #00FFAA;
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  width: 100%;
}

.chips span {
  background: linear-gradient(135deg, #0a1a2f 0%, #061020 100%);
  padding: 9px 20px;
  border-radius: 33px;
  border: 1px solid #1AA7A7;
  font-size: 13.2px;
  cursor: pointer;
  transition: all 0.2s;
}

.chips span:hover {
  transform: translateY(-2px);
  border-color: #2FFFEF;
}

.chips span.active-chip {
  background: linear-gradient(135deg, #2FFFEF 0%, #00FFAA 100%);
  color: #020B24;
  border-color: #2FFFEF;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(47, 255, 238, 0.4);
  transform: scale(1.05);
}

.form-input {
  width: 100%;
  background: linear-gradient(135deg, #0a1a2f 0%, #061020 100%);
  border: 1px solid #1AA7A7;
  border-radius: 13px;
  padding: 13px;
  color: #2FFFEF;
  font-size: 15.4px;
  margin-bottom: 11px;
}

.form-input:focus {
  outline: none;
  border-color: #2FFFEF;
  box-shadow: 0 0 10px rgba(47, 255, 238, 0.2);
}

.row {
  display: flex;
  gap: 11px;
  margin-bottom: 11px;
  width: 100%;
}

.row > * {
  flex: 1;
  margin-bottom: 0;
}

.checkbox-group {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin: 11px 0;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 14.3px;
}

input[type="checkbox"] {
  accent-color: #2FFFEF;
  width: 17.6px;
  height: 17.6px;
  cursor: pointer;
}

.saved-plans {
  max-height: 165px;
  overflow-y: auto;
}

.saved-plans-empty {
  color: #1AA7A7;
  text-align: center;
  padding: 22px;
  font-size: 13.2px;
}

.saved-plan-item {
  background: rgba(47, 255, 238, 0.1);
  border-radius: 13px;
  padding: 11px;
  margin-bottom: 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}

.saved-plan-item:hover {
  background: rgba(47, 255, 238, 0.2);
  transform: translateX(5px);
}

.saved-plan-name {
  font-size: 14.3px;
  font-weight: 600;
  color: #2FFFEF;
}

.saved-plan-details {
  font-size: 11px;
  color: #1AA7A7;
}

.delete-plan-btn {
  background: rgba(255, 107, 107, 0.2);
  border: none;
  color: #ff6b6b;
  padding: 5px 9px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12.1px;
  transition: all 0.2s;
}

.delete-plan-btn:hover {
  background: rgba(255, 107, 107, 0.4);
  transform: scale(1.05);
}

.export-buttons {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  width: 100%;
}

.btn {
  flex: 1;
  padding: 13px;
  border-radius: 44px;
  font-size: 13.2px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
  min-width: 110px;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn-wa { background: #25D366; color: white; }
.btn-email { background: #3b5998; color: white; }
.btn-copy { background: linear-gradient(135deg, #6c5ce7, #4834d4); color: white; }
.btn-save { background: linear-gradient(135deg, #00b894, #009432); color: white; }

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 11, 36, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.loading-spinner {
  width: 55px;
  height: 55px;
  border: 3px solid rgba(47, 255, 238, 0.2);
  border-top-color: #2FFFEF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.advisory {
  font-size: 9.9px;
  color: #1AA7A7;
  text-align: center;
  padding: 22px 0 33px;
  line-height: 1.5;
  width: 100%;
  border-top: 1px solid rgba(47, 255, 238, 0.1);
  margin-top: 11px;
}

.text-small { font-size: 11px; color: #00FFAA; }
.mt-2 { margin-top: 11px; }
.mb-2 { margin-bottom: 11px; }

.haptic-feedback {
  animation: haptic 0.1s ease-in-out;
}

@keyframes haptic {
  0% { transform: scale(1); }
  50% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

/* Header Image */
.header-image-wrapper {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  background: #020B24;
}

.header-bg-image {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.78;
}

.header-image-wrapper:hover .header-bg-image {
  transform: scale(1.02);
  transition: transform 0.5s ease;
}

.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(2, 11, 36, 0.3) 0%,
    rgba(2, 11, 36, 0.15) 50%,
    rgba(47, 255, 238, 0.05) 100%);
  pointer-events: none;
}

/* Title section below image - tight spacing */
.header-title-section {
  text-align: center;
  margin-top: 2px;
  margin-bottom: 6px;
}

.header-title-section .neon-title {
  font-size: 14px;
  margin: 0;
  text-shadow: none;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #2FFFEF;
}

.header-title-section .neon-title .subtitle-part {
  font-style: italic;
  font-weight: normal;
  font-size: 10.5px;
  color: #00FFAA;
  text-shadow: none;
}

/* Reduce gap to first card */
.card:first-of-type {
  margin-top: 0;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .container {
    padding: 0;
  }
  .card {
    padding: 18px;
  }
  .station-card {
    padding: 11px 20px;
    min-width: 121px;
  }
  .time-spinner {
    width: 72px;
  }
  .btn {
    padding: 11px;
    font-size: 12.1px;
    min-width: 88px;
  }
  .hourly-card {
    min-width: 150px;
  }
  .header-title-section .neon-title {
    font-size: 12px;
  }
  .header-title-section .neon-title .subtitle-part {
    font-size: 9px;
  }
}

/* Ensure container doesn't cause scroll */
.container {
  scroll-margin-top: 0;
}

/* Disable smooth scroll temporarily to prevent jump */
html {
  scroll-behavior: auto;
}
/* Smoother scrolling for spinners on web */
.spinner-wheel {
  height: 242px;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  background: #01061a;
  border-radius: 18px;
  border: 1px solid #2FFFEF;
  scrollbar-width: thin;  /* Better for web */
  -ms-overflow-style: none;
  touch-action: pan-y;
  overscroll-behavior: contain;
  outline: none;
  position: relative;
  scroll-behavior: smooth;  /* Adds smooth scrolling on web */
}

/* Custom scrollbar for web - more visible */
.spinner-wheel::-webkit-scrollbar {
  width: 6px;
  display: block;
}

.spinner-wheel::-webkit-scrollbar-track {
  background: #0a1a2f;
  border-radius: 10px;
}

.spinner-wheel::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #2FFFEF, #00FFAA);
  border-radius: 10px;
}

/* Mobile: hide scrollbar but keep functionality */
@media (max-width: 768px) {
  .spinner-wheel::-webkit-scrollbar {
    width: 0px;
    display: none;
  }
  .spinner-wheel {
    scrollbar-width: none;
  }
}

.spinner-option {
  scroll-snap-align: center;
  text-align: center;
  padding: 15.4px 0;
  font-size: 19.8px;
  font-family: monospace;
  color: #1AA7A7;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.spinner-option.selected {
  color: #2FFFEF;
  text-shadow: 0 0 10px rgba(47, 255, 238, 0.8);
  font-weight: bold;
  background: rgba(47, 255, 238, 0.2);
  transform: scale(1.08);
  border-radius: 9px;
}

/* Improve scroll performance */
.spinner-wheel {
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
}
/* Mobile-specific spinner optimizations */
@media (max-width: 768px) {
  .spinner-wheel {
    height: 200px;  /* Slightly shorter for better mobile touch */
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  
  .spinner-option {
    padding: 18px 0;  /* Larger touch target for mobile */
    font-size: 22px;  /* Slightly larger for readability */
  }
}

/* Ensure smooth scrolling on all devices */
.spinner-wheel {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Force hardware acceleration for smoother scrolling */
.spinner-wheel {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.btn-copy-wa {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
}
.btn-copy-wa {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
}