/* Color Variables for Themed Elements */
:root {
  --sky-heavy: #0e91fc;
  --sky-light: #77c9ff;
  --green-trees: #4fb23f;
  --green-grass: #409d39;
  --earth: #5a3a1e;
  --sun: #ffdd57;
  --text: #f5f3ef;
}

/* General Styles */
html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, sans-serif;
  cursor: pointer;
}

body {
  background: linear-gradient(to bottom, var(--sky-heavy), var(--sky-light) 70%);
  color: var(--text);
}

.container {
  min-height: 100vh;
  margin-left: 2%;
  margin-right: 2%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

h1 {
  color: var(--text);
  font-size: 3rem;
  margin-bottom: 0.3em;
  /* Text shadow for better visibility */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-top: 8vh;
}

h2 {
  color: var(--earth);
  font-weight: 300;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

/* Slightly smaller text on small screens */
@media (max-width: 600px) {
  h1 {
    font-size: 2.5rem;
  }
  h2 {
    font-size: 1.2rem;
  }
}

.scene {
  position: fixed;
  bottom: 25%;
  width: 100%;
  z-index: 1;
}

.grass-strip {
  display: flex;
  width: 100%;
  height: 130px;
  overflow: hidden;
}

.grass-strip svg {
  color: var(--green-grass);
  flex-shrink: 0;
  width: 600px;
  height: 131px;
  z-index: 1;
  fill: currentColor;
  /* Skew animation for waving effect */
	animation: skew 3s infinite;
	transform: skew;
	animation-direction: alternate;
  /* Position slightly to the left to cover animation gap */
  margin-left: -12px;
}

.grass-ground {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 25%;
  background: var(--green-grass);
  z-index: 1;
}

@keyframes skew {
	0% {
		transform: skewX(13deg) translate(-12px);
	}
	100% {
		transform: skewX(-13deg) translate(12px);
	}
}

.tree-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tree-container svg {
  width: 400px;
  height: auto;
  fill: var(--green-trees);
  z-index: 2;
  /* Light skew animation for waving effect */
	animation: skewlight 3s infinite;
	transform: skewlight;
	animation-direction: alternate;
  /* Positioning to sit above the grass */
  margin-bottom: -215px;
  /* Fading transition */
  opacity: 1;
  transition: opacity 1s ease;
}

.tree-container svg.hidden {
  opacity: 0;
}

/* Limit tree height on horizontal small screens */
@media (max-height: 500px) and (orientation: landscape) {
  .tree-container svg {
    height: 55vh;
    margin-bottom: -165px;
  }
}

@keyframes skewlight {
	0% {
		transform: skewX(1deg);
	}
	100% {
		transform: skewX(-1deg);
	}
}

/* Slightly reduce grass height when screen height is limited */
@media (max-height: 900px) {
  .scene {
    bottom: 12%;
  }
  .grass-ground {
    height: 12%;
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: linear-gradient(to bottom, var(--green-trees), var(--green-grass) 70%);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  z-index: 1001;
  color: var(--text);
}

.modal-content h1 {
  margin-top: 0;
  font-size: 2rem;
}

.modal-content p {
  line-height: 1.5;
}