/* ═══════════════════════════════════════════════
   PLAYA PERFECTA — Gen Z Palette
   ═══════════════════════════════════════════════ */

:root {
  /* Core Gen Z palette */
  --purple: #7B2FBE;
  --purple-light: #B47EE5;
  --cyan: #00D4AA;
  --cyan-light: #7EFFE8;
  --coral: #FF6B6B;
  --coral-light: #FFB3B3;
  --yellow: #FFD93D;
  --yellow-light: #FFF3A3;
  --ocean: #1A1AFF;
  --ocean-light: #6B6BFF;
  --bg: #0A0A1A;
  --bg-card: #141428;
  --bg-card-hover: #1E1E3A;
  --text: #F0F0FF;
  --text-muted: #8888AA;
  --text-dim: #555577;
  --border: rgba(123, 47, 190, 0.3);
  --border-glow: rgba(0, 212, 170, 0.4);
  --glass: rgba(20, 20, 40, 0.85);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
}

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

body {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Animated Background ── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 20% 50%, rgba(123, 47, 190, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(0, 212, 170, 0.1) 0%, transparent 40%),
              radial-gradient(ellipse at 50% 80%, rgba(26, 26, 255, 0.08) 0%, transparent 50%),
              var(--bg);
  overflow: hidden;
}

/* ── Sun ── */
.bg-sun {
  position: absolute;
  top: 40px;
  right: 10%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #FFD93D, #FF6B6B 60%, #FF3366);
  box-shadow: 0 0 40px rgba(255, 217, 61, 0.3), 0 0 80px rgba(255, 107, 107, 0.15);
  animation: sunbob 4s ease-in-out infinite;
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-sun.brilliant {
  width: 130px;
  height: 130px;
  background: radial-gradient(circle at 35% 35%, #FFFFFF, #FFD93D 25%, #FF6B6B 55%, #FF3366);
  box-shadow: 0 0 60px rgba(255, 217, 61, 0.5), 0 0 120px rgba(255, 107, 107, 0.3);
}

.bg-sun.dim {
  width: 70px;
  height: 70px;
  background: radial-gradient(circle at 40% 40%, #FFF8E0, #FFD93D 60%, #E0C020);
  box-shadow: 0 0 20px rgba(255, 217, 61, 0.15);
  opacity: 0.5;
}

.bg-sun.cloudy {
  width: 55px;
  height: 55px;
  background: radial-gradient(circle at 40% 40%, #E8E8F0, #AAAACC 60%, #8888AA);
  box-shadow: 0 0 15px rgba(170, 170, 204, 0.1);
  opacity: 0.35;
}

@keyframes sunbob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

/* ── Waves ── */
.bg-wave {
  position: absolute;
  bottom: -8px;
  width: 210%;
  height: 180px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(180deg, rgba(0, 212, 170, 0.06), rgba(123, 47, 190, 0.04));
  animation: wavemove 12s linear infinite;
}

.bg-wave:nth-child(2) {
  height: 140px;
  opacity: 0.5;
  animation-duration: 16s;
  animation-delay: -4s;
  background: linear-gradient(180deg, rgba(26, 26, 255, 0.04), rgba(0, 212, 170, 0.03));
}

.bg-wave:nth-child(3) {
  height: 100px;
  opacity: 0.3;
  animation-duration: 20s;
  animation-delay: -8s;
  background: linear-gradient(180deg, rgba(123, 47, 190, 0.03), rgba(255, 107, 107, 0.02));
}

.bg-wave:nth-child(4) {
  height: 70px;
  opacity: 0.2;
  animation-duration: 25s;
  animation-delay: -12s;
  background: linear-gradient(180deg, rgba(255, 217, 61, 0.02), rgba(26, 26, 255, 0.02));
}

@keyframes wavemove {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Wrapper ── */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 20px 100px;
}

/* ── Header ── */
.header {
  text-align: center;
  margin-bottom: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(123, 47, 190, 0.15);
  border: 1px solid rgba(123, 47, 190, 0.3);
  border-radius: 30px;
  padding: 5px 16px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 14px;
}

.header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

.header h1 em {
  background: linear-gradient(135deg, var(--cyan), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: normal;
}

.header p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 10px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hero-cta {
  text-decoration: none;
  width: auto;
}

.btn-ghost {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1.5px solid rgba(123, 47, 190, 0.35);
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-ghost:hover {
  border-color: var(--cyan);
  background: rgba(0, 212, 170, 0.08);
  transform: translateY(-1px);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-card {
  padding: 28px;
  margin-bottom: 16px;
}

.quick-reco {
  margin-bottom: 22px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(123, 47, 190, 0.1));
}

.quick-reco h2 {
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.quick-reco p {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.quick-reco-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin-bottom: 8px;
  font-weight: 700;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

.lbl {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 8px;
}

.fw {
  position: relative;
}

.fw select,
.fw input[type="date"] {
  width: 100%;
  padding: 13px 40px 13px 14px;
  border: 1.5px solid rgba(123, 47, 190, 0.25);
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  appearance: none;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.fw select:focus,
.fw input[type="date"]:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

.fw .arr {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--purple-light);
  pointer-events: none;
  font-size: 0.85rem;
}

/* ── Search Select (Location) ── */
.search-select {
  position: relative;
}

.search-select input[type="text"] {
  width: 100%;
  padding: 13px 44px 13px 14px;
  border: 1.5px solid rgba(123, 47, 190, 0.25);
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-select input[type="text"]::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

.search-select input[type="text"]:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

.search-select .search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  pointer-events: none;
  opacity: 0.6;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(123, 47, 190, 0.1);
  backdrop-filter: blur(20px);
}

.search-dropdown.open {
  display: block;
}

.search-dropdown .region-group {
  padding: 6px 0;
}

.search-dropdown .region-label {
  padding: 8px 16px 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--purple-light);
  opacity: 0.7;
}

.search-dropdown .loc-option {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-dropdown .loc-option:hover,
.search-dropdown .loc-option.focused {
  background: rgba(123, 47, 190, 0.15);
  color: #fff;
}

.search-dropdown .loc-option.selected {
  background: rgba(0, 212, 170, 0.15);
  color: var(--cyan);
  font-weight: 600;
}

.search-dropdown .loc-option .loc-beach-count {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-left: auto;
  font-weight: 400;
}

.search-dropdown .loc-option.selected .loc-beach-count {
  color: var(--cyan-light);
}

.search-dropdown .no-results {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ── Buttons ── */
.btn-main {
  width: 100%;
  padding: 15px 22px;
  background: linear-gradient(135deg, var(--purple), var(--ocean));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.97rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(123, 47, 190, 0.3);
}

.btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(123, 47, 190, 0.4);
}

.btn-main:active {
  transform: translateY(0);
}

/* ── Loading ── */
.loading {
  display: none;
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
}

.loading.on {
  display: block;
}

.spin {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border: 3px solid rgba(123, 47, 190, 0.15);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: rot 0.8s linear infinite;
}

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

.step-list {
  list-style: none;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Error ── */
.err-box {
  display: none;
  background: rgba(255, 107, 107, 0.1);
  border: 1.5px solid rgba(255, 107, 107, 0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--coral);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 20px;
}

.err-box.on {
  display: block;
}

/* ═══════════════════════════════════════════════
   ANSWER CARD — The main result
   ═══════════════════════════════════════════════ */

.answer-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
}

.verdict {
  padding: 30px 32px 26px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--ocean) 50%, rgba(0, 212, 170, 0.8) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.verdict::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  pointer-events: none;
}

.verdict-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.verdict-badge {
  flex-shrink: 0;
  min-width: 92px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.verdict-score {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.verdict-of {
  font-size: 0.62rem;
  opacity: 0.6;
  font-weight: 600;
}

.verdict-ico {
  font-size: 1.6rem;
  margin-top: 6px;
}

.verdict-text h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.verdict-text .subline {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 6px;
  font-weight: 400;
}

.answer-pill {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 8px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.answer-pill .when {
  color: var(--yellow);
  font-weight: 700;
  font-size: 1.05rem;
}

/* ── Answer Body ── */
.answer-body {
  background: var(--bg-card);
}

.ai-answer {
  padding: 24px 30px;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--text);
}

.ai-answer p {
  margin-bottom: 0.7em;
}

.aff-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(0, 212, 170, 0.12);
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 20px;
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.aff-link:hover {
  background: rgba(0, 212, 170, 0.25);
  border-color: var(--cyan);
  transform: translateY(-1px);
  box-shadow: 0 2px 12px rgba(0, 212, 170, 0.2);
}

/* ── Stats Row ── */
.stats-row {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.stat {
  flex: 1;
  min-width: 90px;
  padding: 16px 14px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat:last-child {
  border-right: none;
}

.stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cyan);
  margin-top: 2px;
}

.stat-lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-top: 2px;
  font-weight: 600;
}

/* ── Meta Strip ── */
.meta-strip {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 30px;
  background: rgba(123, 47, 190, 0.05);
  border-bottom: 1px solid var(--border);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Tides ── */
.tides-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 30px;
  background: rgba(0, 212, 170, 0.04);
}

.tides-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.tide-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

.tide-chip.hi {
  background: rgba(0, 212, 170, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(0, 212, 170, 0.25);
}

.tide-chip.lo {
  background: rgba(255, 217, 61, 0.12);
  color: var(--yellow);
  border: 1px solid rgba(255, 217, 61, 0.2);
}

/* ═══════════════════════════════════════════════
   TIMELINE CARD
   ═══════════════════════════════════════════════ */

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  margin-bottom: 20px;
  overflow: hidden;
}

.sec-hd {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tl-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  background: rgba(123, 47, 190, 0.06);
  border-radius: var(--radius);
  padding: 14px;
  margin: 0 -4px;
  scroll-behavior: smooth;
}

.tl-scroll::-webkit-scrollbar {
  height: 6px;
}

.tl-scroll::-webkit-scrollbar-track {
  background: rgba(123, 47, 190, 0.1);
  border-radius: 3px;
}

.tl-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  border-radius: 3px;
}

.tl {
  display: flex;
  gap: 10px;
}

/* ── Hour Cards ── */
.hr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  min-width: 70px;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.hr:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.08);
}

.hr.best {
  background: linear-gradient(135deg, rgba(255, 217, 61, 0.15), rgba(255, 107, 107, 0.1));
  border-color: var(--yellow);
  box-shadow: 0 4px 20px rgba(255, 217, 61, 0.2);
}

.hr.good {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.12), rgba(123, 47, 190, 0.08));
  border-color: var(--cyan);
}

.hr.ok {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(123, 47, 190, 0.08));
  border-color: var(--coral);
}

.hr.bad {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--text-dim);
  opacity: 0.6;
}

.hr-t {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(123, 47, 190, 0.15);
  padding: 3px 10px;
  border-radius: 8px;
}

.hr-em {
  font-size: 1.5rem;
}

.hr-sc {
  font-size: 0.88rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 12px;
  color: #fff;
  min-width: 38px;
  text-align: center;
}

.hr-tmp {
  font-size: 0.78rem;
  color: var(--text);
  font-weight: 600;
}

.hr-wind {
  font-size: 0.65rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

.hr-tide {
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
}

.hr-tide.high {
  background: rgba(0, 212, 170, 0.15);
  color: var(--cyan);
}

/* ═══════════════════════════════════════════════
   ACTIONS & FLOATING BUTTONS
   ═══════════════════════════════════════════════ */

.action-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.btn-compare {
  padding: 15px 22px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.97rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
}

.btn-compare:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--purple-light);
  transform: translateY(-2px);
}

.quick-actions {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  gap: 12px;
  z-index: 50;
}

.quick-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(123, 47, 190, 0.1);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
}

.quick-btn:hover {
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 8px 30px rgba(123, 47, 190, 0.3);
  border-color: var(--cyan);
}

/* ═══════════════════════════════════════════════
   SIDE PANELS
   ═══════════════════════════════════════════════ */

.panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  z-index: 100;
  backdrop-filter: blur(30px);
}

.panel.open {
  transform: translateX(0);
}

.panel-compare {
  width: 420px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(123, 47, 190, 0.05);
}

.panel-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.panel-close {
  background: none;
  border: 1px solid var(--border);
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all 0.2s;
}

.panel-close:hover {
  color: var(--coral);
  border-color: var(--coral);
  background: rgba(255, 107, 107, 0.1);
}

#favoritesList,
#historyList {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

.fav-item,
.hist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.fav-item:hover,
.hist-item:hover {
  background: rgba(123, 47, 190, 0.1);
  border-color: var(--border);
}

.fav-info,
.hist-info {
  flex: 1;
}

.fav-name,
.hist-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.fav-region,
.hist-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.fav-remove,
.hist-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.fav-remove:hover {
  color: var(--coral);
  background: rgba(255, 107, 107, 0.1);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.empty-state span {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════
   COMPARE PANEL
   ═══════════════════════════════════════════════ */

.compare-selects {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compare-select {
  display: flex;
  align-items: center;
  gap: 12px;
}

.compare-select label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan);
  min-width: 60px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.compare-select select {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
  transition: border-color 0.3s;
}

.compare-select select:focus {
  border-color: var(--cyan);
}

.btn-compare-run {
  margin: 0 18px 18px;
  padding: 13px;
  background: linear-gradient(135deg, var(--purple), var(--ocean));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(123, 47, 190, 0.3);
}

.btn-compare-run:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(123, 47, 190, 0.4);
}

#compareResults {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

.compare-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  transition: all 0.2s;
}

.compare-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

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

.compare-beach-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.compare-score {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--cyan);
}

.compare-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  font-size: 0.78rem;
}

.compare-stat {
  text-align: center;
}

.compare-stat-val {
  font-weight: 700;
  color: var(--text);
}

.compare-stat-lbl {
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.compare-best {
  border-color: var(--yellow);
  background: linear-gradient(135deg, rgba(255, 217, 61, 0.1), rgba(255, 107, 107, 0.05));
  box-shadow: 0 4px 20px rgba(255, 217, 61, 0.15);
}

.compare-best .compare-score {
  color: var(--yellow);
}

.compare-best .compare-stat-val {
  color: var(--yellow-light);
}

/* ═══════════════════════════════════════════════
   VERDICT ACTIONS (Share & Favorite)
   ═══════════════════════════════════════════════ */

.verdict-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.btn-share,
.btn-fav {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.btn-share:hover,
.btn-fav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.btn-fav.active {
  background: rgba(255, 217, 61, 0.25);
  border-color: var(--yellow);
  box-shadow: 0 0 16px rgba(255, 217, 61, 0.2);
}

/* ═══════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 26, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(8px);
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: 1px solid var(--border);
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close:hover {
  color: var(--coral);
  border-color: var(--coral);
}

.modal-body {
  padding: 22px;
}

.modal-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.share-link-box {
  display: flex;
  gap: 10px;
}

.share-link-box input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.btn-copy {
  padding: 11px 18px;
  background: linear-gradient(135deg, var(--purple), var(--ocean));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(123, 47, 190, 0.3);
}

.btn-copy.copied {
  background: linear-gradient(135deg, var(--cyan), #00AA88);
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */

footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.72rem;
  margin-top: 48px;
  line-height: 2;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════ */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(123, 47, 190, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(123, 47, 190, 0.5);
}

/* ═══════════════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════════════ */

::selection {
  background: rgba(123, 47, 190, 0.4);
  color: #fff;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE FINE-TUNING
   ═══════════════════════════════════════════════ */

@media (max-width: 600px) {
  .wrap {
    padding: 32px 14px 80px;
  }

  .verdict {
    padding: 24px 20px 20px;
  }

  .verdict-score {
    font-size: 2rem;
  }

  .ai-answer {
    padding: 18px 20px;
  }

  .meta-strip {
    padding: 12px 20px;
  }

  .tides-strip {
    padding: 12px 20px;
  }

  .panel {
    width: 100%;
  }

  .panel-compare {
    width: 100%;
  }

  .quick-actions {
    bottom: 20px;
    right: 20px;
  }

  .quick-btn {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }
}

/* ── SEO Utility Sections ── */
.seo-block,
.faq-block,
.clarity-block,
.utility-block {
  padding: 22px;
  margin-top: 18px;
}

.seo-block h2,
.faq-block h2,
.clarity-block h2,
.utility-block h2 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.seo-block > p {
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.seo-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.seo-grid article {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(123, 47, 190, 0.2);
  border-radius: 12px;
  padding: 12px;
}

.seo-grid h3 {
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.seo-grid p,
.faq-block p,
.clarity-block p,
.utility-block li {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.clarity-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.clarity-grid article {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(123, 47, 190, 0.22);
  border-radius: 12px;
  padding: 12px;
}

.clarity-grid h3 {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.utility-block ul {
  margin-top: 10px;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.faq-block details {
  border-top: 1px solid rgba(123, 47, 190, 0.22);
  padding: 10px 0;
}

.faq-block details:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.faq-block summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.faq-block summary::marker {
  color: var(--cyan);
}

.faq-block details[open] p {
  margin-top: 8px;
}

@media (max-width: 760px) {
  .seo-grid,
  .clarity-grid {
    grid-template-columns: 1fr;
  }

  .seo-block,
  .faq-block,
  .clarity-block,
  .utility-block {
    padding: 16px;
  }

  .quick-reco {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-ghost,
  .hero-cta {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
