:root {
  --bg-dark: #120A16;
  --surface-dark: #1D1124;
  --deep-plum: #2A1434;
  --pumpkin-orange: #F97316;
  --candle-gold: #D9A441;
  --copper: #B86A32;
  --autumn-burgundy: #7F1D1D;
  --moon-silver: #C9D2DF;
  --ivory: #F7EAD2;
  --charcoal: #0B0A0D;
  --muted: #B8A99A;
  
  --accent-gradient: linear-gradient(135deg, #F97316, #D9A441);
  --secondary-gradient: linear-gradient(135deg, #2A1434, #7F1D1D);
  
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--ivory);
  font-family: var(--font-main);
  line-height: 1.6;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--candle-gold);
  text-decoration: none;
  transition: color 0.25s;
}

a:hover {
  color: var(--pumpkin-orange);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: normal;
  color: var(--candle-gold);
}

/* Typography Utility */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: transform 0.25s, opacity 0.25s;
  text-align: center;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--charcoal);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  color: var(--charcoal);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--copper);
  color: var(--ivory);
}

.btn-secondary:hover {
  background: var(--deep-plum);
  color: var(--candle-gold);
}

/* Header */
.masquerade-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  background-color: var(--deep-plum);
  border-bottom: 1px solid var(--copper);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--ivory);
  display: flex;
  align-items: center;
}

.pumpkin-emblem {
  color: var(--pumpkin-orange);
  font-size: 1.2rem;
  margin-left: 8px;
}

.header-nav {
  display: flex;
  gap: 20px;
}

.header-nav a {
  color: var(--ivory);
  font-size: 0.95rem;
  position: relative;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--candle-gold);
  transition: width 0.25s;
}

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

.header-right {
  display: flex;
  align-items: center;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ivory);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Main Content Wrapper */
main {
  flex: 1;
  padding-top: 72px; /* Header offset */
}

/* Sections Configuration for Compactness */
section {
  padding: 40px 0;
  border-bottom: 1px solid rgba(184, 106, 50, 0.2);
}

/* Manor Gate */
#manor-gate {
  background-color: var(--surface-dark);
  text-align: center;
  padding: 60px 20px;
}

.gate-content {
  max-width: 700px;
  margin: 0 auto;
}

.gate-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(217, 164, 65, 0.3);
}

.gate-desc {
  font-size: 1.1rem;
  color: var(--moon-silver);
  margin-bottom: 30px;
}

.gate-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.copper-divider {
  width: 100px;
  height: 2px;
  background-color: var(--copper);
  margin: 20px auto;
}

/* Pumpkin Ballroom Game Hall */
#game {
  background-color: var(--bg-dark);
}

.ballroom-layout {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.candle-ledger, .masquerade-notes {
  flex: 1;
  background-color: var(--surface-dark);
  border: 1px solid var(--copper);
  border-radius: 8px;
  padding: 20px;
  max-width: 250px;
  display: flex;
  flex-direction: column;
}

.ledger-title {
  font-size: 1.2rem;
  border-bottom: 1px solid var(--copper);
  padding-bottom: 10px;
  margin-bottom: 15px;
  color: var(--candle-gold);
}

.ledger-list {
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.ledger-list li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.ledger-list li::before {
  content: '🎃';
  font-size: 0.8rem;
  margin-right: 8px;
}

.notes-card {
  background: var(--deep-plum);
  border: 1px solid var(--candle-gold);
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 10px;
  text-align: center;
}

.notes-label {
  color: var(--moon-silver);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-center {
  flex: 3;
  max-width: 1020px;
  display: flex;
  flex-direction: column;
}

.game-frame-wrapper {
  background-color: var(--deep-plum);
  padding: 10px;
  border-radius: 24px;
  border: 2px solid var(--copper);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 0 15px rgba(249, 115, 22, 0.2);
  position: relative;
  overflow: hidden;
}

.game-frame-wrapper::before, .game-frame-wrapper::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: var(--candle-gold);
  border-radius: 50%;
}
.game-frame-wrapper::before { top: 10px; left: 10px; }
.game-frame-wrapper::after { top: 10px; right: 10px; }

.iframe-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--pumpkin-orange);
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.game-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

/* Lantern Garden Path */
#lantern-path {
  background-color: var(--surface-dark);
}

.path-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.path-container::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--accent-gradient);
  z-index: 1;
}

.path-station {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 20%;
}

.station-marker {
  width: 40px;
  height: 40px;
  background-color: var(--deep-plum);
  border: 2px solid var(--candle-gold);
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 0 10px rgba(217, 164, 65, 0.5);
}

.station-title {
  color: var(--pumpkin-orange);
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.station-desc {
  font-size: 0.8rem;
  color: var(--moon-silver);
}

/* Autumn Archive Room */
.archive-room {
  background-color: var(--bg-dark);
}

.archive-grid {
  display: flex;
  align-items: center;
  gap: 40px;
}

.archive-image-col {
  flex: 1;
}

.img-manor-entrance {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  border: 2px solid var(--copper);
  display: block;
}

.archive-text-col {
  flex: 1;
  background-color: var(--deep-plum);
  padding: 30px;
  border: 1px solid var(--copper);
  border-radius: 8px;
}

.archive-text-col h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--candle-gold);
}

/* Guest Reception Hall */
#contact {
  background-color: var(--surface-dark);
}

.reception-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.reception-panel {
  background-color: var(--bg-dark);
  padding: 25px;
  border: 1px solid var(--copper);
  border-radius: 8px;
}

.reception-panel h3 {
  margin-bottom: 15px;
  border-bottom: 1px solid var(--deep-plum);
  padding-bottom: 10px;
}

.faq-list {
  list-style: none;
}

.faq-list li {
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--moon-silver);
}

.faq-list strong {
  color: var(--ivory);
  display: block;
  margin-bottom: 2px;
}

.form-group {
  margin-bottom: 15px;
}

.form-control {
  width: 100%;
  padding: 10px;
  background-color: var(--surface-dark);
  border: 1px solid var(--copper);
  color: var(--ivory);
  border-radius: 4px;
  font-family: var(--font-main);
}

.form-control:focus {
  outline: none;
  border-color: var(--candle-gold);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* Footer */
.grand-manor-directory {
  background-color: var(--deep-plum);
  border-top: 1px solid var(--copper);
  padding: 40px 0 20px;
  margin-top: auto;
}

.footer-emblem {
  text-align: center;
  color: var(--pumpkin-orange);
  font-size: 2rem;
  margin-bottom: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.footer-col h4 {
  color: var(--candle-gold);
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.footer-col p {
  font-size: 0.8rem;
  color: var(--moon-silver);
  margin-bottom: 15px;
  line-height: 1.4;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--ivory);
  font-size: 0.85rem;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(184, 106, 50, 0.3);
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-bottom p {
  max-width: 800px;
  margin: 10px auto 0;
  line-height: 1.4;
}

/* Cookie Popup */
.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(11, 10, 13, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.cookie-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cookie-modal {
  background-color: var(--deep-plum);
  border: 2px solid var(--pumpkin-orange);
  border-radius: 24px;
  padding: 30px;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

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

.cookie-title {
  color: var(--candle-gold);
  margin-bottom: 10px;
}

.cookie-desc {
  font-size: 0.9rem;
  color: var(--moon-silver);
  margin-bottom: 20px;
}

.cookie-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* Standalone Pages Layout */
.page-header {
  text-align: center;
  padding: 40px 0;
  background-color: var(--surface-dark);
  border-bottom: 1px solid var(--copper);
}

.page-content {
  padding: 40px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.page-content p {
  margin-bottom: 15px;
  color: var(--moon-silver);
}

.page-content h2, .page-content h3 {
  margin: 25px 0 10px;
  color: var(--candle-gold);
}

.standalone-img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  border: 2px solid var(--copper);
  display: block;
  margin: 20px auto;
}

.nav-buttons {
  text-align: center;
  margin: 30px 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .ballroom-layout {
    flex-direction: column;
    align-items: center;
  }
  .candle-ledger, .masquerade-notes {
    max-width: 100%;
    width: 100%;
  }
  .game-center {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background-color: var(--deep-plum);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--copper);
  }
  .header-nav.active {
    display: flex;
  }
  .mobile-toggle {
    display: block;
  }
  .header-right .btn-primary {
    display: none;
  }
  
  .path-container::before {
    display: none;
  }
  .path-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  .path-station {
    width: 100%;
  }
  
  .archive-grid {
    flex-direction: column;
  }
  
  .reception-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .gate-title {
    font-size: 2rem;
  }
}