/* Harbor — Warm nautical card grid theme */

@keyframes ship-rock {
  0% {
    transform: rotate(0deg) translateY(0px);
  }

  25% {
    transform: rotate(1deg) translateY(-2px);
  }

  50% {
    transform: rotate(0deg) translateY(0px);
  }

  75% {
    transform: rotate(-1deg) translateY(2px);
  }

  100% {
    transform: rotate(0deg) translateY(0px);
  }
}

.ship-rocking {
  animation: ship-rock 4s ease-in-out infinite;
  transform-origin: bottom center;
}

@keyframes ocean-scroll {
  from {
    background-position: center, 0px 0px;
  }

  to {
    background-position: center, -400px -400px;
  }
}

/* ── Harbor Page ── */
.harbor-page {
  background: var(--harbor-bg, 
    radial-gradient(circle at 50% 50%, rgba(10, 15, 30, 0.2) 0%, rgba(5, 10, 20, 0.85) 100%),
    url('/dashboard/img/harbor-night.png'));
  background-size: 100% 100%, 400px 400px;
  background-repeat: no-repeat, repeat;
  background-attachment: fixed, fixed;
  animation: ocean-scroll 45s linear infinite;
  border-radius: 0;
  padding: 28px 32px;
  min-height: 100vh;
  max-width: none;
  color: #d4b96a;
}

.harbor-page.is-night {
  background:
    radial-gradient(circle at 60% 40%, rgba(15, 30, 65, 0.6) 0%, rgba(5, 12, 30, 0.95) 100%),
    url('/dashboard/img/harbor-night.png');
  background-size: 100% 100%, 400px 400px;
  background-repeat: no-repeat, repeat;
  background-attachment: fixed, fixed;
  animation: ocean-scroll 55s linear infinite;
}

.harbor-page .tavern-header h1 {
  color: #e8d5b0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ── Ship Card ── */
.ship-card {
  background: var(--harbor-card-bg, linear-gradient(180deg, rgba(38, 48, 86, 0.85) 0%, rgba(20, 25, 45, 0.95) 100%));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--harbor-text, #fdfaf5);
  border: 1px solid var(--harbor-card-border, rgba(220, 185, 120, 0.35));
  border-top-color: var(--harbor-card-border-top, rgba(220, 185, 120, 0.6));
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ship-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(220, 185, 120, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(220, 185, 120, 0.8);
}

.ship-card-id {
  position: absolute;
  top: 10px;
  left: 14px;
  font-size: 22px;
  font-weight: 900;
  color: rgba(232, 213, 176, 0.4);
  z-index: 10;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* ── Ship Image Area ── */
.ship-card-image-box {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.ship-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 5;
  transition: transform 0.5s ease;
}

.ship-card:hover .ship-card-img {
  transform: scale(1.05);
}

/* ── Ship Card Content ── */
.ship-card-content {
  padding: 14px 18px 16px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ship-type {
  font-size: 13px;
  color: var(--harbor-accent-light, #8be9fd);
  opacity: 0.9;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.ship-name-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ship-name {
  font-size: 19px;
  font-weight: 900;
  color: var(--harbor-accent, #ffeba8);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px var(--harbor-accent-glow, rgba(255, 235, 168, 0.4));
}

/* ── Status Badges ── */
.ship-status-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.ship-status-badge.sailing {
  background: linear-gradient(135deg, rgba(80, 200, 255, 0.25), rgba(0, 120, 255, 0.15));
  color: #a4ffff;
  border: 1px solid rgba(139, 233, 253, 0.4);
  box-shadow: 0 0 10px rgba(139, 233, 253, 0.2);
}

.ship-status-badge.moored {
  background: linear-gradient(135deg, rgba(220, 185, 120, 0.2), rgba(180, 140, 80, 0.1));
  color: #ffe6ac;
  border: 1px solid rgba(220, 185, 120, 0.3);
}

/* ── Stats Row ── */
.ship-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #cdd6f4;
}

.ship-stats-row .cost {
  color: #ffd874;
}

/* ── Action Buttons ── */
.ship-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.ship-actions .btn {
  flex: 1;
  padding: 9px 0;
  font-size: 14px;
  font-weight: bold;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-wake.start {
  background: linear-gradient(135deg, rgba(200, 170, 110, 0.15), rgba(200, 170, 110, 0.05)) !important;
  color: #e8d5b0 !important;
  border: 1px solid rgba(200, 170, 110, 0.4) !important;
}

.btn-wake.start:hover {
  background: linear-gradient(135deg, rgba(200, 170, 110, 0.3), rgba(200, 170, 110, 0.1)) !important;
  color: #fff !important;
  border-color: #c8aa6e !important;
}

.btn-bridge {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #e8e0d4 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.btn-bridge:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.btn-admin-console {
  background: rgba(212, 185, 106, 0.1) !important;
  color: #d4b96a !important;
  border: 1px solid rgba(212, 185, 106, 0.3) !important;
}

.btn-admin-console:hover {
  background: rgba(212, 185, 106, 0.2) !important;
  color: #ebd69b !important;
}

.btn-anchor,
.btn-anchor.stop {
  background: rgba(200, 60, 60, 0.1) !important;
  color: #ff7b7b !important;
  border: 1px solid rgba(200, 60, 60, 0.3) !important;
}

.btn-anchor:hover,
.btn-anchor.stop:hover {
  background: rgba(200, 60, 60, 0.2) !important;
  color: #fff !important;
}

/* ── Ship Type Selector (create-ship view) ── */
.ship-type-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.ship-type-option {
  background: linear-gradient(180deg, rgba(38, 48, 86, 0.6), rgba(20, 25, 45, 0.8));
  border: 2px solid rgba(200, 170, 110, 0.25);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(8px);
}

.ship-type-option:hover {
  border-color: rgba(220, 185, 120, 0.6);
  background: linear-gradient(180deg, rgba(45, 58, 100, 0.7), rgba(25, 32, 55, 0.9));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.ship-type-option.selected {
  border-color: #ffeba8;
  background: linear-gradient(180deg, rgba(55, 70, 120, 0.8), rgba(30, 40, 70, 0.95));
  box-shadow: 0 0 20px rgba(220, 185, 120, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}

.ship-type-option-name {
  font-size: 14px;
  font-weight: 700;
  margin-top: 8px;
  color: #e8d5b0;
}

.ship-type-option-cost {
  font-size: 12px;
  color: #c8aa6e;
  margin-top: 2px;
}