:root {
  --bg-color: #F7FBF7;
  --surface: #FFFFFF;
  --emerald: #2F855A;
  --fresh-sage: #8ABF8A;
  --mint-blossom: #DDF3E4;
  --rose-petal: #F7C8D6;
  --lavender: #CBB8F5;
  --gold: #E3B84E;
  --ivory: #F3F0E8;
  --moss: #556B5D;
  --text-primary: #2E4033;
  --text-muted: #71807A;
  --accent-grad: linear-gradient(135deg, #2F855A, #8ABF8A);
  --second-grad: linear-gradient(135deg, #F7C8D6, #E3B84E);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: 1px solid rgba(47, 133, 90, 0.3);
}

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

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  padding-top: 70px;
}

h1, h2, h3, h4 {
  font-family: 'Georgia', serif;
  font-weight: normal;
  color: var(--emerald);
  margin-bottom: 0.5rem;
}

a {
  text-decoration: none;
  color: var(--emerald);
  transition: color 0.25s, opacity 0.25s;
}

a:hover {
  color: var(--fresh-sage);
}

ul {
  list-style: none;
}

button, .btn {
  background: var(--accent-grad);
  color: var(--surface);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
  display: inline-block;
  text-decoration: none;
}

button:hover, .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 133, 90, 0.3);
  color: var(--surface);
}

.btn-secondary {
  background: var(--second-grad);
  color: var(--text-primary);
}

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

/* Header */
.glass-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--emerald);
  box-shadow: 0 4px 15px rgba(47, 133, 90, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  z-index: 1000;
}

.logo-emblem {
  font-family: 'Georgia', serif;
  font-size: 1.5rem;
  color: var(--emerald);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-emblem::before {
  content: '✿';
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  text-shadow: 0 0 8px var(--fresh-sage);
  color: var(--emerald);
}

/* Section Common */
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

/* Botanical Entrance Hall */
#conservatory {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  height: 380px;
}

.entrance-content h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.entrance-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.entrance-actions {
  display: flex;
  gap: 1rem;
}

.entrance-image-wrapper {
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--mint-blossom);
  box-shadow: 0 8px 24px rgba(47, 133, 90, 0.1);
}

.entrance-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grand Floral Pavilion (Game) */
#game-pavilion {
  text-align: center;
  padding: 2rem 1rem;
  height: 640px;
}

.pavilion-header h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.game-container {
  max-width: 1020px;
  margin: 0 auto;
  background: var(--surface);
  border: 4px solid var(--gold);
  border-radius: 26px;
  padding: 12px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.game-container::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 2px solid var(--emerald);
  border-radius: 32px;
  pointer-events: none;
}

.game-frame {
  width: 100%;
  height: 480px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--ivory);
}

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

.game-controls {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Bloom Compass Garden */
#compass-garden {
  background: var(--ivory);
  padding: 3rem 1rem;
  border-radius: 30px;
  margin: 1rem auto;
  max-width: 1100px;
  height: 220px;
}

.compass-track {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.compass-track::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 2px;
  background: var(--moss);
  z-index: 1;
  border-top: 1px dashed var(--fresh-sage);
}

.compass-circle {
  width: 110px;
  height: 110px;
  background: var(--surface);
  border: 3px solid var(--emerald);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  position: relative;
  padding: 0.5rem;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--emerald);
  box-shadow: 0 4px 10px rgba(47, 133, 90, 0.1);
  transition: transform 0.25s, background 0.25s;
}

.compass-circle:hover {
  transform: translateY(-5px) scale(1.05);
  background: var(--mint-blossom);
}

/* Rare Species Gallery */
#rare-species {
  height: 380px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.gallery-illustration {
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.gallery-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-panels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gallery-panel {
  background: var(--surface);
  padding: 1.25rem;
  border-radius: 12px;
  border-left: 4px solid var(--emerald);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.gallery-panel h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.gallery-panel p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.gallery-panel a {
  font-size: 0.85rem;
  font-weight: bold;
}

/* Botanical Research House */
#research-house {
  height: 400px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: var(--mint-blossom);
  padding: 2rem;
  border-radius: 24px;
  margin-bottom: 3rem;
}

.research-info h2 {
  font-size: 2rem;
}

.research-info p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.support-email {
  font-family: monospace;
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 1.5rem;
  border: 1px solid var(--fresh-sage);
}

.research-image {
  border-radius: 16px;
  overflow: hidden;
  height: 100%;
}

.research-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.research-form {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--fresh-sage);
  border-radius: 8px;
  font-family: inherit;
  background: var(--bg-color);
}

.form-group textarea {
  height: 60px;
  resize: none;
}

/* Footer */
.glass-footer {
  background: var(--surface);
  border-top: 2px solid var(--emerald);
  padding: 3rem 2rem 1rem;
  box-shadow: 0 -4px 15px rgba(47, 133, 90, 0.05);
}

.footer-directory {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-panel h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--moss);
}

.footer-panel p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-panel ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-panel a {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.footer-panel a:hover {
  color: var(--emerald);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--mint-blossom);
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom .emblem {
  color: var(--emerald);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

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

/* Cookie Popup */
#cookie-seed-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--surface);
  border: 3px solid var(--emerald);
  padding: 2rem;
  border-radius: 16px;
  z-index: 9999;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
  max-width: 400px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

#cookie-seed-box.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.cookie-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

#cookie-seed-box h3 {
  margin-bottom: 0.5rem;
}

#cookie-seed-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.cookie-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Standalone Pages */
.standalone-wrapper {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
}
.standalone-content {
  flex: 1;
  background: var(--surface);
  padding: 3rem 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  max-width: 800px;
  margin: 2rem auto;
  border: 1px solid var(--mint-blossom);
}
.standalone-content h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--mint-blossom);
  padding-bottom: 0.5rem;
}
.standalone-content h2 {
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem;
}
.standalone-content p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.return-home-container {
  margin-top: 2rem;
  text-align: center;
}

@media (max-width: 900px) {
  #conservatory, #rare-species, #research-house {
    grid-template-columns: 1fr;
    height: auto;
  }
  .entrance-image-wrapper, .gallery-illustration, .research-image {
    min-height: 250px;
  }
  .footer-directory {
    grid-template-columns: 1fr 1fr;
  }
  .compass-track {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .compass-track::before { display: none; }
  #compass-garden { height: auto; }
}
@media (max-width: 600px) {
  .nav-links { display: none; }
  .footer-directory { grid-template-columns: 1fr; }
}