@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("fonts/MPLUSRounded1c-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("fonts/MPLUSRounded1c-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

/* Terra Modpack - Color Palette
   Primary Field Green: #A0D468
   Highlighted Grass: #C0E68A
   Mid-tone Green: #78AB46
   Forest/Tree Green: #33691E
   River Blue: #42A5F5
   Light Water/Sky: #BBDEFB
   Rock/Mountain Gray: #B0BEC5
   Distant Mountain: #9FA8DA
   Cloud White: #FFFFFF
   Sunlight/Yellow Glow: #FFF59D
*/

:root {
  --field-green: #a0d468;
  --highlight-grass: #c0e68a;
  --mid-green: #78ab46;
  --forest-green: #1a2f10;
  --river-blue: #64b5f6;
  --light-water: #1a2a1a;
  --rock-gray: #2d3a2d;
  --distant-mountain: #3d4a5a;
  --cloud-white: #e8f0e8;
  --sunlight-yellow: #fff59d;
  --dark-bg: #0f1a0f;
  --card-bg: rgba(30, 45, 30, 0.85);
}

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

body {
  font-family:
    "M PLUS Rounded 1c",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background-image: url("wallhaven-ogy2m7.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-color: var(--light-water);
  color: var(--forest-green);
  line-height: 1.6;
  min-height: 100vh;
}

header {
  position: relative;
  z-index: 10;
  background: linear-gradient(
    180deg,
    rgba(60, 90, 50, 0.9) 0%,
    rgba(45, 70, 40, 0.85) 50%,
    rgba(30, 50, 25, 0.8) 100%
  );
  color: var(--cloud-white);
  text-align: center;
  padding: 40px 40px;
  margin: 25px auto;
  max-width: 700px;
  border-radius: 40px 50px 35px 45px;
  border: 1px solid rgba(160, 212, 104, 0.3);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(160, 212, 104, 0.15),
    inset 0 -8px 20px rgba(0, 0, 0, 0.3),
    inset 0 8px 20px rgba(160, 212, 104, 0.1);
}

header h1 {
  font-size: 1.6rem;
  margin-bottom: 6px;
  text-shadow: 2px 2px 8px rgba(51, 105, 30, 0.3);
  font-weight: 700;
}

header p {
  font-size: 1rem;
  color: var(--highlight-grass);
}

.server-info {
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 20px;
  padding: 15px 25px;
  margin: 15px auto;
  max-width: 400px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.info-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.info-label {
  font-size: 0.9rem;
  color: var(--cloud-white);
  opacity: 0.7;
}

.info-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--sunlight-yellow);
  background-color: rgba(0, 0, 0, 0.3);
  padding: 5px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 245, 157, 0.4);
}

.info-value.address {
  font-family: monospace;
  letter-spacing: 0.5px;
}

.audio-player {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.audio-player button {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(160, 212, 104, 0.4);
  color: var(--cloud-white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.audio-player button:hover {
  background-color: rgba(0, 0, 0, 0.5);
  border-color: var(--highlight-grass);
}

.audio-player input[type="range"] {
  width: 80px;
  accent-color: var(--field-green);
}

.countdown {
  margin-top: 20px;
}

.countdown > p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 8px;
}

.countdown-timer {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.time-block {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--sunlight-yellow);
  min-width: 50px;
  text-align: center;
}

.time-block span {
  font-size: 1.5rem;
}

.helper-character {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(160, 212, 104, 0.2);
}

/* Section containing helper needs extra space */
section:has(.floating-helper) {
  padding-bottom: 90px;
}

/* Discord-style chat bubble Helper */
.floating-helper {
  position: absolute;
  bottom: 25px;
  left: 25px;
  right: 25px;
  z-index: 100;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
}

.floating-helper .helper-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  transition: all 0.2s ease;
  order: -1;
}

.floating-helper:hover .helper-avatar {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.floating-helper .helper-bubble {
  position: relative;
  background-color: white;
  color: var(--forest-green);
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

/* Speech bubble tail */
.floating-helper .helper-bubble::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 16px;
  height: 16px;
  background-color: white;
  border-radius: 4px;
  z-index: 1;
}

.floating-helper:hover {
  text-decoration: none !important;
}

.floating-helper:hover .helper-bubble {
  color: var(--forest-green) !important;
  text-decoration: none !important;
  background: #fff;
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

section {
  position: relative;
  z-index: 10;
  background-color: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(160, 212, 104, 0.2);
  border-radius: 30px;
  padding: 35px 40px;
  margin-bottom: 25px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 2px rgba(160, 212, 104, 0.1);
}

section h2 {
  color: var(--highlight-grass);
  border-bottom: none;
  background: linear-gradient(90deg, rgba(120, 171, 70, 0.4), transparent);
  padding: 12px 20px;
  margin: -35px -40px 20px -40px;
  border-radius: 30px 30px 0 0;
  font-size: 1.4rem;
}

section p {
  margin-bottom: 15px;
  color: var(--cloud-white);
}

ul,
ol {
  margin-left: 25px;
  margin-bottom: 15px;
}

li {
  margin-bottom: 8px;
}

li {
  color: var(--cloud-white);
}

li::marker {
  color: var(--field-green);
}

a {
  color: var(--river-blue);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--highlight-grass);
  text-decoration: underline;
}

.launcher-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sunlight-yellow);
  text-align: center;
  margin: -5px 0 15px 0;
  letter-spacing: 2px;
}

.launcher-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.or-text {
  color: var(--cloud-white);
  font-size: 1.1rem;
  opacity: 0.7;
  font-style: italic;
}

.url-box {
  display: block;
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--sunlight-yellow);
  padding: 18px 24px;
  border-radius: 20px;
  font-family: monospace;
  font-size: 1rem;
  word-break: break-all;
  border: 2px solid var(--field-green);
  margin: 15px 0;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 15px rgba(160, 212, 104, 0.2),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  user-select: all;
  cursor: pointer;
}

.url-box:hover {
  border-color: var(--highlight-grass);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(160, 212, 104, 0.4),
    inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.btn {
  display: inline-block;
  background: var(--mid-green);
  color: #fff !important;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none !important;
  border: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn:hover {
  background: var(--forest-green);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 18px;
  margin-left: 10px;
}

strong {
  color: var(--highlight-grass);
}

.talking-emoji {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 15px;
}

.emoji-face {
  font-size: 1.5rem;
  margin-top: 5px;
}

.speech-bubble {
  position: relative;
  display: inline-block;
  background-color: white;
  color: var(--forest-green);
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: white;
}

.speech-bubble:hover {
  background-color: white;
  color: var(--forest-green);
  text-decoration: none !important;
}

.speech-bubble:hover::after {
  border-top-color: white;
}

.modlist-section {
  max-width: 600px;
  margin: 0 auto 25px auto;
  background-color: rgba(40, 45, 45, 0.8);
  border-color: rgba(100, 110, 110, 0.3);
}

.modlist-section h2 {
  background: linear-gradient(90deg, rgba(80, 90, 90, 0.5), transparent);
  color: rgba(200, 210, 210, 0.9);
}

.modlist-section p {
  color: rgba(180, 190, 190, 0.8);
}

.mod-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 15px;
}

.mod-table th,
.mod-table td {
  padding: 8px 12px;
  text-align: left;
}

.mod-table thead th {
  background-color: rgba(70, 80, 80, 0.5);
  color: rgba(180, 190, 190, 0.9);
  font-size: 0.9rem;
}

.mod-table thead th:first-child {
  border-radius: 15px 0 0 0;
}

.mod-table thead th:last-child {
  border-radius: 0 15px 0 0;
}

.mod-table tbody tr {
  background-color: rgba(0, 0, 0, 0.2);
}

.mod-table tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.3);
}

.mod-table tbody tr:last-child td:first-child {
  border-radius: 0 0 0 15px;
}

.mod-table tbody tr:last-child td:last-child {
  border-radius: 0 0 15px 0;
}

.mod-table td {
  color: rgba(180, 190, 190, 0.9);
  font-size: 0.85rem;
}

.mod-table td a {
  color: rgba(150, 180, 180, 0.9);
  font-weight: 600;
}

.mod-table td a:hover {
  color: rgba(220, 230, 230, 1);
}

.inline-emoji {
  height: 1.2em;
  vertical-align: middle;
  margin-left: 5px;
}

em {
  background-color: rgba(120, 171, 70, 0.4);
  color: var(--sunlight-yellow);
  padding: 6px 14px;
  border-radius: 20px;
  font-style: normal;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

footer {
  background: linear-gradient(
    135deg,
    rgba(45, 58, 45, 0.9),
    rgba(61, 74, 90, 0.9)
  );
  color: var(--cloud-white);
  text-align: center;
  padding: 30px;
  margin: 20px;
  border-radius: 40px;
  border: 1px solid rgba(160, 212, 104, 0.2);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(160, 212, 104, 0.1);
}

.critter {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.critter-whale {
  left: 3%;
  top: 45%;
  width: 55px;
  animation: bobble 8s ease-in-out infinite;
}

.critter-bee {
  width: 22px;
  animation: buzz 2s ease-in-out infinite;
}

.critter-bee-1 {
  right: 5%;
  bottom: 12%;
}

.critter-bee-2 {
  right: 12%;
  bottom: 8%;
  animation-delay: -1s;
}

.critter-pig {
  width: 28px;
  animation: wander 6s ease-in-out infinite;
}

.critter-pig-1 {
  right: 25%;
  top: 37%;
}

.critter-pig-2 {
  right: 27%;
  top: 38%;
  animation: wander-reverse 6s ease-in-out infinite;
  animation-delay: -0.5s;
}

.critter-pig-3 {
  right: 26%;
  top: 39%;
  animation-delay: -1.2s;
}

@keyframes bobble {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes wander {
  0% {
    transform: translateX(0) scaleX(1);
  }
  49% {
    transform: translateX(5px) scaleX(1);
  }
  50% {
    transform: translateX(5px) scaleX(-1);
  }
  100% {
    transform: translateX(0) scaleX(-1);
  }
}

@keyframes wander-reverse {
  0% {
    transform: translateX(0) scaleX(-1);
  }
  49% {
    transform: translateX(-5px) scaleX(-1);
  }
  50% {
    transform: translateX(-5px) scaleX(1);
  }
  100% {
    transform: translateX(0) scaleX(1);
  }
}

@keyframes buzz {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(3px, -5px);
  }
  50% {
    transform: translate(-3px, -3px);
  }
  75% {
    transform: translate(2px, -6px);
  }
}

.floating-cloud {
  position: fixed;
  z-index: 20;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
  pointer-events: none;
}

.cloud-1 {
  right: 50px;
  top: 15%;
  width: 140px;
  transform: rotate(5deg);
  animation: float1 60s ease-in-out infinite;
}

.cloud-2 {
  left: 30px;
  top: 25%;
  width: 100px;
  transform: scaleX(-1) rotate(-3deg);
  animation: float2 80s ease-in-out infinite;
}

.cloud-3 {
  right: 15%;
  top: 45%;
  width: 120px;
  transform: rotate(-7deg);
  animation: float3 70s ease-in-out infinite;
}

.cloud-4 {
  left: 10%;
  top: 60%;
  width: 90px;
  transform: scaleX(-1) rotate(4deg);
  animation: float1 90s ease-in-out infinite;
}

.cloud-5 {
  right: 8%;
  top: 75%;
  width: 110px;
  transform: rotate(8deg);
  animation: float2 75s ease-in-out infinite;
}

.cloud-6 {
  left: 5%;
  top: 10%;
  width: 80px;
  transform: scaleX(-1) rotate(-5deg);
  animation: float3 85s ease-in-out infinite;
}

.cloud-7 {
  right: 25%;
  top: 85%;
  width: 95px;
  transform: rotate(-4deg);
  animation: float1 95s ease-in-out infinite;
}

@keyframes float1 {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-20px) translateX(10px);
  }
  50% {
    transform: translateY(-10px) translateX(-15px);
  }
  75% {
    transform: translateY(-25px) translateX(5px);
  }
}

@keyframes float2 {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  33% {
    transform: translateY(-15px) translateX(-12px);
  }
  66% {
    transform: translateY(-22px) translateX(8px);
  }
}

@keyframes float3 {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  20% {
    transform: translateY(-18px) translateX(6px);
  }
  40% {
    transform: translateY(-8px) translateX(-10px);
  }
  60% {
    transform: translateY(-24px) translateX(4px);
  }
  80% {
    transform: translateY(-12px) translateX(-8px);
  }
}

/* Floating Screenshots - Modern Glass Style */
.floating-screenshot {
  position: fixed;
  z-index: 5;
  display: block;
  padding: 6px;
  background: rgba(30, 50, 30, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(160, 212, 104, 0.3);
  border-radius: 12px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(160, 212, 104, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.floating-screenshot:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(160, 212, 104, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
  border-color: rgba(160, 212, 104, 0.5);
  z-index: 25;
}

.floating-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.screenshot-1 {
  width: 300px;
  left: 2%;
  top: 18%;
  transform: rotate(-4deg);
  animation: floatScreenshot1 45s ease-in-out infinite;
}

.screenshot-2 {
  width: 280px;
  right: 3%;
  top: 35%;
  transform: rotate(3deg);
  animation: floatScreenshot2 50s ease-in-out infinite;
}

.screenshot-3 {
  width: 260px;
  left: 4%;
  top: 65%;
  transform: rotate(-2deg);
  animation: floatScreenshot3 55s ease-in-out infinite;
}

@keyframes floatScreenshot1 {
  0%,
  100% {
    transform: rotate(-4deg) translateY(0) translateX(0);
  }
  25% {
    transform: rotate(-2deg) translateY(-15px) translateX(8px);
  }
  50% {
    transform: rotate(-5deg) translateY(-8px) translateX(-5px);
  }
  75% {
    transform: rotate(-3deg) translateY(-20px) translateX(3px);
  }
}

@keyframes floatScreenshot2 {
  0%,
  100% {
    transform: rotate(3deg) translateY(0) translateX(0);
  }
  33% {
    transform: rotate(5deg) translateY(-12px) translateX(-10px);
  }
  66% {
    transform: rotate(2deg) translateY(-18px) translateX(6px);
  }
}

@keyframes floatScreenshot3 {
  0%,
  100% {
    transform: rotate(-2deg) translateY(0) translateX(0);
  }
  20% {
    transform: rotate(-4deg) translateY(-10px) translateX(5px);
  }
  40% {
    transform: rotate(-1deg) translateY(-22px) translateX(-8px);
  }
  60% {
    transform: rotate(-3deg) translateY(-14px) translateX(10px);
  }
  80% {
    transform: rotate(0deg) translateY(-18px) translateX(-4px);
  }
}

@media (max-width: 600px) {
  header {
    margin: 10px;
    padding: 30px 20px;
    border-radius: 30px;
  }

  header h1 {
    font-size: 1.8rem;
  }

  section {
    padding: 25px 20px;
    border-radius: 25px;
  }

  section h2 {
    margin: -25px -20px 20px -20px;
    padding: 10px 15px;
    border-radius: 25px 25px 0 0;
  }

  main {
    padding: 10px;
  }

  footer {
    margin: 10px;
    border-radius: 30px;
  }

  .floating-cloud {
    display: none;
  }

  .critter {
    display: none;
  }

  .floating-screenshot {
    display: none;
  }
}
