/* ===== BODY & CONTENT PADDING ===== */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url('../img/banner.png') top center no-repeat;
  background-size: cover;
  color: #e2d9f0;
  overflow-x: hidden;
}

/* Apply to all elements you want to anchor to */
[id] {
  scroll-margin-top: 100px; /* height of your header + a little extra */
}

h3{
  font-size: 23px;
}

h4{
  margin-bottom: 2px;
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  z-index: 1000;
  box-sizing: border-box;
  padding: 15px 150px;
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20,20,20,0.5);
  z-index: -1;
}

.logo {
  height: 55px;
}

.header-right {
  display: flex;
  gap: 25px;
  align-items: center;
}

.icon {
  width: 28px;
  cursor: pointer;
  transition: transform 0.2s ease;
  margin: 0 4px;
}

.icon:hover {
  transform: scale(1.2);
}

.socials-wrapper {
  position: relative;
  display: inline-block;
}

.discord-tooltip {
  position: absolute;
  top: 50%;
  right: 120%;
  transform: translateY(-50%);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.socials-wrapper:hover .discord-tooltip {
  right: 110%;
  opacity: 1;
}

.cart {
  background: #a855f7;
  padding: 8px 16px;
  border-radius: 1px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 0 5px rgba(168,85,247,0.3);
  color: white;
  border-bottom: 4px solid rgb(76, 34, 115);
  font-size: 14 px;
}

.cart img {
  width: 27px;
  height: 23px;
  object-fit: contain;
  vertical-align: middle;
}

/* HERO */
.hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  padding: 120px 150px 80px 150px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  min-height: 400px;
  z-index: 1;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../img/banner.png');
  background-repeat: repeat;
  background-size: cover;
  background-position: top;
  filter: brightness(30%);
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 2;
}

.hero-logo {
  height: 400px;
  filter: drop-shadow(0 0 15px rgba(168,85,247,0.5));
  animation: hero-bounce 3s infinite alternate;
}

@keyframes hero-bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* IP boxes */
.ip {
  padding: 8px 15px;
  font-size: 20px;
  min-width: 200px;
  min-height: 90px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ip-java {
  padding: 8px 15px;
  font-size: 20px;
  min-width: 200px;
  min-height: 210px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ip:hover, .ip-java:hover {
  background: rgba(168,85,247,0.1);
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(168,85,247,0.4);
}

/* Stack Bedrock boxes */
.ip-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

/* NAVIGATION */
.nav-buttons {
  text-align: center;
  background: #141414;
  padding: 40px 150px 20px 150px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-buttons button {
  margin: 0 4px;
  padding: 25px 45px;
  font-size: 18px;
  border: none;
  border-radius: 1px;
  background: #a855f7;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-buttons button:hover {
  background: #9333ea;
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.nav-buttons .nav-link {
  margin: 1px;
  padding: 25px 5px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  text-decoration: none;
  border-radius: 1px;
  background: linear-gradient(#9333ea);
  border-bottom: 6px solid rgb(76, 34, 115);
  transition: all 0.3s ease;
}

.nav-buttons .nav-link:hover {
  background: linear-gradient(135deg, #9333ea, #7c3aed);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 5px 0 rgba(168,85,247,0.5);
}

.nav-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 8px;
  padding: 15px 25px;
  border-radius: 6px;
  background: #a855f7;
  color: white;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  min-width: 150px;
}

.nav-link:hover {
  background: #9333ea;
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.nav-link span {
  display: block;
  width: 100%;
}

/* TITLE & SUBTITLE */
.nav-title {
  font-size: 22px;
  font-weight: bold;
  line-height: 1.2;
  text-align: left;
}

.nav-subtitle {
  font-size: 12px;
  font-weight: normal;
  margin-top: 6px;
  color: rgba(255,255,255,0.85);
  line-height: 1.2;
  text-align: left;
}

.nav-title, .nav-subtitle {
  padding-left: 5px;
}

/* UPDATES */
.updates {
  padding: 60px 150px 80px 150px;
  background: #141414;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.updates-label {
  font-size: 16px;
  font-weight: bold;
  color: #e879f9;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

/* UPDATE CARD */
.update-card {
  display: flex;
  flex-direction: row;
  background: #1f1f1f;
  border-radius: 1px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 20px;
}

.update-card img {
  width: 50%;
  object-fit: cover;
}

.update-text {
  padding: 20px;
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.update-text h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #d8b4fe;
}

ul {
  margin: 0;      
  padding-left: 20px; 
  line-height: 1.3; 
}

.update-text p {
  margin: 0;
  color: #e2d9f0;
}

/* == COOKING AN EVENT == */
.cooking-placeholder { display: none; }
.update-text, .event-img { display: block; }

/* When id="cooking": flip it */
#cooking .cooking-placeholder {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

#cooking .cooking-placeholder .update-text {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  padding: 20px;
}

#cooking > .update-card > .update-text {
  display: none;
}

#cooking > .update-card > .update-text {
  display: none;
}

#cooking .event-img {
  width: 50%;
  object-fit: cover;
  opacity: 90%;
}


/* ===== FOOTER ===== */
footer {
  background: #141414;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: #e2d9f0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding: 50px 150px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 180px;
}

.footer-col h4 {
  font-size: 18px;
  font-weight: bold;
  color: #e879f9;
  margin: 0 0 6px 0;
}

.footer-col p {
  margin: 0;
  font-size: 14px;
  color: #e2d9f0;
  line-height: 1.6;
}

.footer-col a {
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #9333ea;
}

.footer-icons {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 150px;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: #141414;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom-left {
  display: flex;
  gap: 10px;
}

.footer-bottom-left button {
  padding: 8px 20px;
  margin-left: 40px;
  border: none;
  border-radius: 1px;
  background: #a855f7;
  color: white;
  cursor: pointer;
  font-weight: bold;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  transition: background 0.2s ease;
}

.footer-bottom-left button:hover {
  background: #9333ea;
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
  color: #e2d9f0;
}

/* CART MODAL */
.cart-modal {
  position: fixed;
  top: 13%;
  right: 20px;
  background: #1e1e1e;
  padding: 20px;
  border-radius: 1px;
  border: 1px solid rgba(255,255,255,0.05);
  display: none;
  width: 250px;
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
  z-index: 1001;
}

.cart-modal h3 {
  margin-top: 0;
}

/* SCROLL BUTTON */
button[onclick="scrollTopPage()"] {
  margin-top: 10px;
  padding: 12px 25px;
  border: none;
  border-radius: 6px;
  background: #a855f7;
  color: white;
  cursor: pointer;
}

button[onclick="scrollTopPage()"]:hover {
  background: #9333ea;
}

/* TOAST NOTIFICATION */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #1e1e1e;
  color: #e2d9f0;
  padding: 15px 20px 15px 50px;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  width: 250px;
  max-width: 90%;
  opacity: 0.8;
}

.toast.show {
  opacity: 0.8;
  transform: translateY(-10px);
  pointer-events: auto;
}

.toast img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* HOW TO JOIN SECTION */
.how-to-join {
  padding: 60px 150px 80px 150px;
  background: #141414;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #e2d9f0;
}

.how-to-join .updates-label {
  font-size: 16px;
  font-weight: bold;
  color: #e879f9;
  letter-spacing: 1px;
}

.join-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.join-card {
  display: flex;
  flex-direction: column;
  background: #1f1f1f;
  border-radius: 1px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  width: 100%;
  max-width: 598px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.join-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.join-text {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.join-text h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #d8b4fe;
}

.join-text p {
  margin: 0;
  color: #e2d9f0;
}

/* FLOATING MASCOT */
.mascot-wrapper {
  position: fixed;
  bottom: 0;
  left: -90px;
  bottom: -180px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mascot {
  height: 390px;
  object-fit: contain;
  cursor: pointer;
  animation: mascot-float 3s ease-in-out infinite;
  transition: transform 0.2s ease;
}

.mascot:hover {
  transform: scaleX(-1) translateY(0px) scale(1.08);
}

@keyframes mascot-float {
  0%, 100% { transform: scaleX(1) rotate(15deg) translateY(0px); }
  50%       { transform: scaleX(1) rotate(15deg) translateY(-10px); }
}

.mascot-bubble {
  background: #1f1f1f;
  border: 1px solid rgba(168,85,247,0.4);
  color: #e2d9f0;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(168,85,247,0.2);
  animation: bubble-pulse 3s ease-in-out infinite;
  position: relative;
  left: 65px;
  bottom: -18px;
  transform: rotate(15deg);
}

.mascot-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #1f1f1f;
}


@keyframes bubble-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* Hide on mobile so it doesn't crowd the screen */
@media (max-width: 767px) {
  .mascot-wrapper {
    display: none;
  }
}


/* ===== TABLET (768px – 1024px) ===== */
@media (max-width: 1024px) {

  /* Hide IP stack elements on tablets */
  .ip-stack,
  .ip-java {
    display: none !important;
  }

  /* Header */
  .header {
    padding: 12px 40px;
  }

  .logo {
    height: 42px;
  }

  /* Hero */
  .hero {
    padding: 100px 40px 80px 40px;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-logo {
    height: 350px;
  }

  /* Navigation — horizontal scroll */
  .nav-buttons {
    padding: 20px 0;
    display: flex;
    flex-wrap: nowrap;           /* prevent wrapping */
    justify-content: flex-start;
    overflow-x: auto;            /* enable horizontal scroll */
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 10px;
    /* hide scrollbar visually but keep it functional */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-buttons::-webkit-scrollbar {
    display: none;
  }

  /* add side padding via pseudo-padding trick using first/last child margins */
  .nav-buttons > *:first-child {
    margin-left: 40px;
  }

  .nav-buttons > *:last-child {
    margin-right: 40px;
  }

  .nav-buttons button {
    flex-shrink: 0;              /* don't shrink items */
    padding: 18px 28px;
    font-size: 16px;
    scroll-snap-align: start;
  }

  .nav-link {
    flex-shrink: 0;              /* don't shrink items */
    min-width: 120px;
    margin: 0;
    height: 20px;
  }

  .nav-title {
    font-size: 18px;
  }

  .nav-subtitle {
    font-size: 11px;
  }

  /* Updates */
  .updates {
    padding: 35px 40px 60px 40px;
  }

  .update-card {
    flex-direction: column;
    margin: auto 54px;
  }

  .update-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
  }

  .update-text {
    width: 100%;
    box-sizing: border-box;
  }

  #cooking .event-img {
  width: 100%;
  object-fit: cover;
  opacity: 90%;
}


  /* How to join */
  .how-to-join {
    padding: 60px 40px 60px 40px;
  }

  .join-container {
    gap: 16px;
    margin: auto 0;
  }

  .join-card img {
    height: 220px;
  }

  /* Footer */
  .footer-top {
    padding: 40px 40px;
    gap: 30px;
  }

  .footer-bottom {
    padding: 14px 40px;
  }

  .footer-bottom-left button{
    margin-left: 70px;
  }

  /* IP regular boxes — scale down but keep visible */
  .ip {
    font-size: 16px;
    min-width: 160px;
    min-height: 70px;
  }
  
  /* Mascot */
  .mascot-wrapper {
  left: -60px;
  bottom: -110px;
  }

  .mascot {
    height: 250px;
  }

  .mascot-bubble {
    left: 45px;
    font-size: 12px;
    bottom: -8px;
  }
}


/* ===== PHONE (≤767px) ===== */
@media (max-width: 767px) {

  /* Hide IP stack elements on phones */
  .ip-stack,
  .ip-java {
    display: none !important;
  }

  /* Header */
  .header {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .update-text h3 {
  font-size: 16px;
  }

  .update-text h4 {
    font-size: 14px;
  }
  .logo {
    height: 34px;
  }

  .header-right {
    gap: 14px;
  }

  .icon {
    width: 22px;
  }

  .cart {
    padding: 6px 12px;
    font-size: 14px;
  }

  /* Hero — stack vertically */
  .hero {
    padding: 80px 16px 80px 16px;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
    min-height: auto;
  }

  .hero-logo {
    height: 260px;
  }

  .hero > * {
    height: 200px;
    box-sizing: border-box;
  }

  /* Hide regular .ip boxes on phones */
  .ip {
    display: none !important;
  }

  /* Navigation — horizontal scroll */
  .nav-buttons {
    padding: 16px 0;
    display: flex;
    flex-wrap: nowrap;           /* prevent wrapping */
    justify-content: flex-start;
    overflow-x: auto;            /* enable horizontal scroll */
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-buttons::-webkit-scrollbar {
    display: none;
  }

  .nav-buttons > *:first-child {
    margin-left: 16px;
  }

  .nav-buttons > *:last-child {
    margin-right: 16px;
  }

  .nav-buttons button {
    flex-shrink: 0;
    padding: 14px 20px;
    font-size: 15px;
    white-space: nowrap;
    scroll-snap-align: start;
  }

  .nav-link {
    flex-shrink: 0;
    min-width: unset;
    width: auto;
    box-sizing: border-box;
    flex-direction: column;
    margin: 0;
    height: 60px;
  }

  .nav-title {
    font-size: 13px;
    white-space: nowrap;
  }

  .nav-subtitle {
    font-size: 10px;
    margin-top: 2px;
    white-space: nowrap;
  }

  /* Updates */
  .updates {
    padding: 60px 16px 40px 16px;
  }

  .updates-label {
    font-size: 16px;
  }

  .update-card {
    flex-direction: column;
    margin: 0;
  }

  .update-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
  }

  .update-text {
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
  }

  .update-text h3 {
    font-size: 16px;
  }

  .update-text p {
    font-size: 14px;
  }


  /* How to join */
  .how-to-join {
    padding: 60px 16px 40px 16px;
  }

  .join-container {
    flex-direction: column;
    gap: 12px;
  }

  .join-card {
    max-width: 100%;
  }

  .join-card img {
    height: 180px;
  }

  .join-text {
    padding: 14px;
  }

  .join-text h3 {
    font-size: 16px;
  }

  .join-text p {
    font-size: 14px;
  }

  /* Footer */
  .footer-top {
    flex-direction: column;
    padding: 30px 16px;
    gap: 24px;
  }

  .footer-col {
    min-width: unset;
    width: 100%;
  }

  .footer-col h4 {
    font-size: 15px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    padding: 14px 16px;
    gap: 10px;
  }

  .footer-bottom-left {
    flex-wrap: wrap;
  }

  .footer-bottom-left button {
    padding: 8px 14px;
    font-size: 13px;
    margin: 0;
  }

  .footer-bottom p {
    font-size: 12px;
  }

  /* Cart modal */
  .cart-modal {
    right: 8px;
    width: calc(100vw - 32px);
    top: 11%;
  }

  /* Toast */
  .toast {
    bottom: 16px;
    right: 16px;
    width: calc(100vw - 48px);
    max-width: 320px;
  }

  /* Discord tooltip — flip direction for small screens */
  .discord-tooltip {
    right: auto;
    left: 120%;
    top: 50%;
    transform: translateY(-50%);
  }

  .socials-wrapper:hover .discord-tooltip {
    right: auto;
    left: 110%;
  }

  .mascot-wrapper {
    display: flex;
    left: -50px;
    bottom: -80px;
}

  .mascot {
    height: 160px;
  }

  .mascot-bubble {
    font-size: 11px;
    padding: 6px 10px;
    left: 30px;
    bottom: -5px;
  }
}