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

body {
  font-family: 'Outfit', sans-serif;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
  user-select: none;
  position: relative;
  background: #222;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.loaded {
  opacity: 1;
}

/* ── Background layers ── */
.bg-layer {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
  z-index: 0;
  opacity: 0;
}

.bg-layer.active {
  opacity: 1;
}

/* ── Octopus container ── */
.octopus-wrap {
  position: relative;
  z-index: 2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease;
  width: clamp(280px, 50vw, 480px);
  height: clamp(280px, 50vw, 480px);
}

.octopus-wrap:hover {
  transform: scale(1.03);
}

.octopus-wrap:active {
  transform: scale(0.97);
}

/* ── Octopus images ── */
.octopus-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
  animation: bob 3s ease-in-out infinite;
  transition: opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
}

.octopus-img.active {
  opacity: 1;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-16px);
  }
}

/* ── Mood selector ── */
.mood-selector {
  position: relative;
  z-index: 10;
  margin-top: 24px;
}

.mood-current {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  cursor: pointer;
  color: #333;
  transition: color 0.4s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mood-current:hover {
  transform: scale(1.03);
}

.mood-current::after {
  content: '▾';
  font-size: 0.8em;
  opacity: 0.5;
}

.mood-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  max-height: 50vh;
  overflow-y: auto;
}

.mood-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

.mood-option {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 16px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.15s ease;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.mood-option:hover {
  background: rgba(0, 0, 0, 0.08);
}

.mood-option.active {
  background: rgba(0, 0, 0, 0.12);
}

/* ── Hint ── */
.hint {
  position: fixed;
  bottom: 24px;
  z-index: 2;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #444;
}

/* ── Connection dot ── */
.status-dot {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #aaa;
  transition: background 0.3s ease;
  z-index: 3;
}

.status-dot.connected {
  background: #4ade80;
}

.status-dot.disconnected {
  background: #f87171;
}

/* ── Floating particles ── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: drift linear infinite;
}

@keyframes drift {
  0% {
    transform: translateY(100vh) scale(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.2;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    transform: translateY(-10vh) scale(1) rotate(360deg);
    opacity: 0;
  }
}
