@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Mono:wght@400;500&display=swap");

/* app-init.css */
/* Extracted from inline <style> in index.html */
/* Loaded via <link rel="stylesheet" href="css/app-init.css"> */

@keyframes hpiLogoIn {
  from { opacity:0; transform:scale(0.85) translateY(10px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL OPEN/CLOSE TRANSITIONS (Submit Port, Report Issue, What's New)
═══════════════════════════════════════════════════════════════════════════ */
#submitModal, #bugReportModal, #changelogModal {
  opacity: 0;
  transition: opacity 0.25s ease;
}
#submitModal.hpi-modal-visible,
#bugReportModal.hpi-modal-visible,
#changelogModal.hpi-modal-visible {
  opacity: 1;
}
.hpi-modal-overlay {
  transition: opacity 0.25s ease;
}
.hpi-modal-card {
  transition: opacity 0.25s ease, transform 0.28s cubic-bezier(.2,.8,.3,1.4);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.94);
}
.hpi-modal-visible .hpi-modal-card {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   OCEAN LOADING SCREEN
═══════════════════════════════════════════════════════════════════════════ */
#hpiLoader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #06080f;
  overflow: hidden;
  transition: opacity 0.6s ease;
  font-family: 'DM Mono', monospace;
}

#ocean {
  position: fixed;
  inset: 0;
  display: block;
}

#hpiLoader .ui {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 32px 40px;
  color: #fff;
}

#hpiLoader .ui-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

#hpiLoader .label {
  font-size: 12px;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}

#hpiLoader .mood {
  text-align: right;
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}
#hpiLoader .mood span { display: block; }
#hpiLoader #mood-name {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.9);
}
#hpiLoader .mood-time {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
  color: #fff;
}

/* ── Center: logos ── */
#hpiLoader .ui-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
#hpiLoader .hpi-loader-logo {
  width: 110px; height: 110px;
  object-fit: contain;
  animation: hpiLogoIn 0.8s ease both;
  filter: drop-shadow(0 0 24px rgba(30,144,255,0.5));
}
#hpiLoader .hpi-loader-title {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
}
#hpiLoader .hpi-loader-sub {
  font-size: 11px;
  letter-spacing: 0.35em;
  color: rgba(255,255,255,0.55);
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}
#hpiLoader .hpi-loader-duth {
  height: 70px;
  object-fit: contain;
  opacity: 0.9;
  margin-top: 4px;
  filter: drop-shadow(0 1px 10px rgba(0,0,0,0.4));
}

/* ── Bottom: caption + progress bar ── */
#hpiLoader .ui-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
#hpiLoader .caption {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.05rem, 3vw, 1.7rem);
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
  text-align: center;
}
#hpiLoader .caption em { font-style: italic; }

#hpiLoader .hpi-loader-bar-wrap {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  overflow: hidden;
}
#hpiLoaderBar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, #1e90ff, #6bd1ff);
  transition: width 1.8s ease;
}

@media (max-width: 600px) {
  #hpiLoader .ui { padding: 22px 22px; }
  #hpiLoader .label { font-size: 10px; letter-spacing: 0.3em; }
  #hpiLoader .hpi-loader-logo { width: 90px; height: 90px; }
  #hpiLoader .hpi-loader-duth { height: 56px; }
}

#spType, #spHarborSize, #spShelter, #brType {
  color-scheme: dark;
}
#spType option, #spHarborSize option, #spShelter option, 
#brType option {
  background: #141e32;
  color: #fff; 
}
