:root {
  --bg: #F6FBFD;
  --surface: #FFFFFF;
  --ocean-navy: #1D3557;
  --deep-lagoon: #0B6E8A;
  --seafoam: #63C5B8;
  --coral-sand: #F4D8AE;
  --sunset-gold: #E5A33C;
  --storm-grey: #6D7A8A;
  --pearl-white: #FCFCFA;
  --driftwood: #A88E72;
  --text-primary: #243342;
  --muted: #6D7A8A;
  --gradient: linear-gradient(135deg, #0B6E8A, #63C5B8);
}

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

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea {
  font-family: inherit;
}

/* Floating Lighthouse Beacon */
.beacon-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--pearl-white);
  border-bottom: 1px solid var(--ocean-navy);
  box-shadow: 0 4px 12px rgba(29, 53, 87, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ocean-navy);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 4px;
  font-size: 0.95rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--deep-lagoon);
  transition: width 0.25s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.cta-btn {
  background: var(--gradient);
  color: var(--surface);
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  transition: opacity 0.25s ease;
  border: none;
  cursor: pointer;
}

.cta-btn:hover {
  opacity: 0.85;
}

/* Ocean Welcome Deck */
.welcome-deck {
  text-align: center;
  padding: 50px 20px 30px;
  max-width: 800px;
  margin: 0 auto;
}

.welcome-deck h1 {
  font-size: 2.25rem;
  color: var(--ocean-navy);
  margin-bottom: 12px;
  font-weight: 300;
  letter-spacing: 1px;
}

.welcome-deck p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.welcome-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn-primary {
  background: var(--ocean-navy);
  color: var(--surface);
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid var(--ocean-navy);
  transition: opacity 0.25s ease;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: transparent;
  color: var(--ocean-navy);
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid var(--ocean-navy);
  transition: background 0.25s ease;
}

.btn-secondary:hover {
  background: rgba(29, 53, 87, 0.05);
}

/* Observation Platform */
.observation-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 50px;
}

.game-frame-wrapper {
  width: 100%;
  max-width: 1020px;
  background: var(--pearl-white);
  padding: 12px;
  border-radius: 26px;
  border: 3px solid var(--sunset-gold);
  box-shadow: 0 10px 30px rgba(29, 53, 87, 0.1);
  position: relative;
}

.game-frame-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--seafoam);
  border-top-left-radius: 23px;
  border-top-right-radius: 23px;
}

.game-container {
  width: 100%;
  height: 550px;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
}

.game-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Marine Compass Board */
.compass-board {
  padding: 30px 20px;
  background: var(--pearl-white);
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(29, 53, 87, 0.05);
  border-bottom: 1px solid rgba(29, 53, 87, 0.05);
}

.compass-dial {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid var(--sunset-gold);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 15px;
  font-weight: 600;
  color: var(--ocean-navy);
  box-shadow: 0 4px 15px rgba(29, 53, 87, 0.05);
  transition: transform 0.25s ease;
  font-size: 0.95rem;
}

.compass-dial:hover {
  transform: rotate(12deg);
}

/* Ocean Discovery Wall */
.discovery-wall {
  padding: 50px 20px;
  max-width: 1020px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.journal-entry {
  display: flex;
  background: var(--surface);
  border: 1px solid rgba(109, 122, 138, 0.15);
  border-radius: 12px;
  overflow: hidden;
  height: 180px;
  transition: transform 0.25s ease;
}

.journal-entry:hover {
  transform: translateY(-2px);
}

.journal-img {
  width: 35%;
  object-fit: cover;
  background: var(--ocean-navy);
}

.journal-content {
  padding: 24px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 65%;
}

.journal-content h3 {
  color: var(--deep-lagoon);
  margin-bottom: 8px;
  font-size: 1.35rem;
  font-weight: 400;
}

.journal-content p {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.journal-link {
  color: var(--ocean-navy);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Research Pavilion */
.research-pavilion {
  background: var(--pearl-white);
  padding: 50px 20px;
  text-align: center;
  border-top: 1px solid rgba(29, 53, 87, 0.05);
}

.research-inner {
  max-width: 600px;
  margin: 0 auto;
}

.research-inner h2 {
  color: var(--ocean-navy);
  margin-bottom: 12px;
  font-weight: 300;
  font-size: 1.8rem;
}

.support-text {
  margin-bottom: 24px;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.support-text span {
  font-weight: 600;
  color: var(--deep-lagoon);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--muted);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.contact-form textarea {
  height: 100px;
  resize: vertical;
}

.submit-btn {
  background: var(--ocean-navy);
  color: var(--surface);
  padding: 14px;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.submit-btn:hover {
  opacity: 0.9;
}

/* Coastal Directory Footer */
.coastal-footer {
  background: var(--surface);
  border-top: 3px solid var(--sunset-gold);
  padding: 60px 40px 30px;
}

.footer-panels {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  max-width: 1020px;
  margin: 0 auto 40px;
}

.footer-panel {
  flex: 1;
  min-width: 200px;
}

.footer-panel h4 {
  color: var(--ocean-navy);
  margin-bottom: 12px;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-panel p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--deep-lagoon);
  font-size: 0.9rem;
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--seafoam);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--sunset-gold);
  padding-top: 24px;
  max-width: 1020px;
  margin: 0 auto;
}

.footer-emblem {
  margin-bottom: 16px;
  color: var(--sunset-gold);
}

.footer-bottom p {
  color: var(--muted);
  font-size: 0.8rem;
  max-width: 800px;
  margin: 0 auto 8px;
}

/* Cookie Popup */
.cookie-popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(29, 53, 87, 0.4);
  z-index: 1999;
  display: none;
}

.cookie-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 4px solid var(--sunset-gold);
  border-radius: 6px;
  padding: 30px;
  z-index: 2000;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  max-width: 420px;
  width: 90%;
  text-align: center;
  display: none;
}

.cookie-popup::before {
  content: '';
  position: absolute;
  top: -8px; bottom: -8px; left: -8px; right: -8px;
  border: 1px solid var(--driftwood);
  pointer-events: none;
}

.cookie-popup h3 {
  color: var(--ocean-navy);
  margin-bottom: 12px;
  font-weight: 500;
}

.cookie-popup p {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.cookie-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.cookie-btns button {
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.25s ease;
}

.btn-accept {
  background: var(--deep-lagoon);
  color: var(--surface);
}

.btn-accept:hover {
  opacity: 0.9;
}

.btn-reject {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--muted);
}

.btn-reject:hover {
  background: rgba(109, 122, 138, 0.05);
}

/* Subpages */
.subpage-main {
  max-width: 800px;
  margin: 60px auto;
  padding: 50px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(29, 53, 87, 0.05);
  border-top: 4px solid var(--deep-lagoon);
}

.subpage-main h1 {
  color: var(--ocean-navy);
  margin-bottom: 24px;
  font-weight: 300;
  font-size: 2.2rem;
}

.subpage-main h2 {
  color: var(--deep-lagoon);
  margin: 30px 0 16px;
  font-weight: 500;
}

.subpage-main p {
  margin-bottom: 16px;
  color: var(--text-primary);
  line-height: 1.7;
}

.subpage-main ul {
  margin: 0 0 16px 20px;
  color: var(--text-primary);
}

.subpage-main li {
  margin-bottom: 8px;
}

.return-home {
  display: inline-block;
  margin-top: 40px;
  padding: 12px 24px;
  background: var(--ocean-navy);
  color: var(--surface);
  border-radius: 4px;
  font-weight: 600;
  transition: opacity 0.25s ease;
}

.return-home:hover {
  opacity: 0.9;
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .compass-board {
    gap: 20px;
  }
  .compass-dial {
    width: 120px;
    height: 120px;
    font-size: 0.85rem;
  }
  .journal-entry {
    flex-direction: column;
    height: auto;
  }
  .journal-img {
    width: 100%;
    height: 160px;
  }
  .journal-content {
    width: 100%;
  }
  .subpage-main {
    margin: 30px 15px;
    padding: 30px 20px;
  }
}