/* 
 * Custom fonts for The Aviary branding
 * GochiHand for headers, Quicksand for body text
 */
@import url('https://fonts.googleapis.com/css2?family=Gochi+Hand&family=Quicksand:wght@300..700&display=swap');

/* 
 * CSS Variables - The Aviary Style Guide
 */
:root {
  --paper-white: #fdfefe;
  --inkwell-black: #050203;
  --dreamy-gold: #fff3c2;
  --font-header: 'Gochi Hand', cursive;
  --font-body: 'Quicksand', sans-serif;
}

/* 
 * Basic styles for full-screen A-Frame scene
 * Ensures the panorama fills the entire browser window
 */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
}

/* 
 * A-Frame canvas styling
 * Ensures the scene is responsive and fills the viewport
 */
a-scene {
  width: 100%;
  height: 100%;
  display: block;
}

/* 
 * Remove A-Frame default UI elements for a cleaner look
 * (Can be re-enabled later if needed)
 */
.a-enter-vr-button {
  /* VR button will still appear but can be styled here if needed */
  display: none;
  /* Hiding it for now to fix lint and clean up UI */
}

/* 
 * Instruction Card Overlay
 * Hand-drawn style instruction page that appears before the experience starts
 * Matches the pencil line-art aesthetic of the project
 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 2, 3, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

.overlay.hidden {
  display: none;
}

/* 
 * Instruction card - looks like a hand-drawn paper card
 */
.instruction-card {
  position: relative;
  background: var(--paper-white);
  border: 2px solid var(--inkwell-black);
  border-radius: 8px;
  padding: 30px 25px;
  max-width: 520px;
  width: 90%;
  box-shadow:
    4px 4px 0 rgba(5, 2, 3, 0.1),
    0 8px 20px rgba(5, 2, 3, 0.15);
  animation: cardFadeIn 0.5s ease-out;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 
 * Decorative SVG doodles in corners
 */
.doodle {
  position: absolute;
  opacity: 0.6;
}

.doodle-top-left {
  top: 10px;
  left: 10px;
}

.doodle-bottom-right {
  bottom: 10px;
  right: 10px;
}

/* 
 * Typography - hand-drawn aesthetic
 */
.card-header {
  font-family: var(--font-header);
  font-size: 32px;
  color: var(--inkwell-black);
  margin: 0 0 8px 0;
  text-align: center;
  letter-spacing: 3px;
  line-height: 1.2;
}

.card-subheader {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--inkwell-black);
  opacity: 0.7;
  text-align: center;
  margin: 0 0 24px 0;
}

.card-section {
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-header);
  font-size: 20px;
  color: var(--inkwell-black);
  margin: 0 0 8px 0;
  letter-spacing: 1px;
}

.section-body {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--inkwell-black);
  line-height: 1.5;
  margin: 0;
}

.instructions-list {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--inkwell-black);
  line-height: 1.6;
  margin: 0;
  padding-left: 20px;
}

.instructions-list li {
  margin-bottom: 6px;
}

.card-tip {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  font-style: italic;
  color: var(--inkwell-black);
  opacity: 0.7;
  text-align: center;
  margin: 20px 0 20px 0;
}

/* 
 * Start button - hand-drawn style with ink border
 */
.start-button {
  display: block;
  width: 100%;
  padding: 14px 30px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: var(--inkwell-black);
  background: var(--paper-white);
  border: 2px solid var(--inkwell-black);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.start-button:hover {
  background: var(--dreamy-gold);
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--inkwell-black);
}

.start-button:active {
  transform: translateY(0);
  box-shadow: 1px 1px 0 var(--inkwell-black);
}

/* 
 * Responsive adjustments for mobile (9:16 vertical)
 */
@media (max-width: 480px) {
  .instruction-card {
    padding: 25px 20px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .card-header {
    font-size: 28px;
    letter-spacing: 2px;
  }

  .card-subheader {
    font-size: 12px;
  }

  .section-title {
    font-size: 18px;
  }

  .section-body,
  .instructions-list {
    font-size: 13px;
  }

  .card-tip {
    font-size: 12px;
  }

  .start-button {
    font-size: 16px;
    padding: 12px 24px;
  }
}

/* 
 * Music Toggle Button
 * Small, unobtrusive button in the bottom-right corner
 * Allows users to mute/unmute background music
 */
.music-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 16px;
  font-size: 16px;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  cursor: pointer;
  z-index: 999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.music-toggle:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.5);
}

.music-toggle:active {
  transform: scale(0.95);
}

/*
 * Inventory HUD
 * Shows collected items (the key)
 */
.inventory-hud {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 999;
  display: flex;
  gap: 10px;
}

.inventory-slot {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid var(--inkwell-black);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 2px 2px 0 rgba(5, 2, 3, 0.2);
}

.inventory-slot.hidden {
  display: none;
}

.inventory-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/*
 * Win Overlay
 * Reuses overlay styles but specific for the win screen
 */
.win-content {
  text-align: center;
}

.win-title {
  font-family: var(--font-header);
  font-size: 48px;
  color: var(--inkwell-black);
  margin-bottom: 20px;
}