@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap");
:root {
  --ff: "Montserrat", sans-serif;
  --colorp: #f9f9f9;
  --colorp2: #fff;
  --colora: #31e6ff;
  --colora2: #187ead;
  --colorbody: #1e1e1e;
  --colors: #333;
  --h2: bold clamp(2rem, 2.5vw, 3rem)/1.5em var(--ff);
  --p: 1rem/1.8em var(--ff);
  --colorgray: hsl(0, 0%, 60%);
  --graygradient: linear-gradient(45deg, hsl(0, 0%, 20%), hsl(0, 0%, 15%));
  --transition: 0.3s ease-in-out;
}
body {
  width: 100vw;
  margin: 0;
  background-color: var(--colorbody);
  color: var(--colorp);
  font: var(--p);
  overflow-x: hidden;
  padding-top: 80px; /* Adjust to your header height */
}
.main-wrapper {
  width: 90vw;
  max-width: 1400px;
  margin: 40px auto 0 auto;
}
h2 { font: var(--h2); }
button {
  background: none;
  padding: 12px 24px;
  font: var(--p);
  color: var(--colora);
  border-radius: 12px;
  border: solid 1px var(--colora);
  cursor: pointer;
  transition: var(--transition);
}
button:active {
  scale: .95;
  box-shadow: 0 0 16px var(--colora);
}
label { font: var(--p); }
.cards {
  font: var(--p);
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-wrap: nowrap;
  max-width: 1400px;
  width: 98vw;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 3;
  padding-bottom: 40px;
}
.card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 32px;
  border-radius: 20px;
  background: var(--graygradient);
  position: relative;
  flex: 1;
  min-width: 150px;
  box-shadow: 0px 4px 4px #00000030, 0px 12px 12px #00000015;
}
.card[data-img-pos="right"] {
  flex-direction: row-reverse;
  text-align: right;
}
.card-img {
  width: 180px;
  height: 180px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  flex-shrink: 0;
  margin-bottom: 0;
  transition: box-shadow 0.3s;
  box-shadow: 0 4px 24px #0002;
}
@media (max-width: 900px) {
  .card-img {
    width: 110px;
    height: 110px;
  }
}
@media (max-width: 700px) {
  .card-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 320px;
    margin-bottom: 10px;
    border-radius: 16px;
  }
}
.card-content { flex: 1; }
.small {
  font-size: 0.85em;
  font-weight: bold;
  color: var(--colorgray);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.gamemode {
  font: var(--h2);
  line-height: .5em;
  margin-bottom: 0;
}
button:hover {
  box-shadow: 0 0 24px var(--colora);
  background: var(--colora);
  color: var(--colorp2);
}
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #181818;
    padding: 12px 2vw; /* Reduced side padding */
    gap: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-wrap: wrap;
    box-sizing: border-box;
}
.site-header nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100vw;
    overflow-x: auto;      /* Allow horizontal scroll if needed */
    padding-bottom: 2px;   /* For scroll bar space if needed */
}
.header-btn {
    min-width: 90px;
    font-size: 1em;
    padding: 8px 12px;
    white-space: nowrap;   /* Prevent text wrapping */
}
.header-btn:hover {
  background: var(--colora);
  color: var(--colorp2);
  box-shadow: 0 0 16px var(--colora);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-title {
  font: bold clamp(2.5rem, 4vw, 4rem)/1.2em var(--ff);
  color: var(--colorp);
  letter-spacing: 2px;
}
.play-now-section {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin: 40px 0 0 0;
  padding: 40px 0 48px 0;
  background: var(--colorbody);
  border-radius: 0;
  text-align: center;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
}
.server-ip-box {
  background: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}
#server-ip {
  background: none;
  color: var(--colora);
  border: 1px solid var(--colora);
  border-radius: 8px;
  padding: 8px 20px;
  font: var(--p);
  font-weight: bold;
  letter-spacing: 1px;
  min-width: 220px;
  text-align: center;
  box-shadow: 0 2px 8px #0002;
  display: inline-block;
}
#copy-ip-btn {
  font-size: 1em;
  padding: 8px 18px;
}
.hero-section {
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 0;
  position: relative;
  top: 0;
  left: 0;
  transform: none;
  overflow: hidden;
  height: 520px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: none;
  z-index: 1;
  pointer-events: none;
}
.hero-img {
  width: 100vw;
  min-width: 100vw;
  height: 520px;
  min-height: 520px;
  object-fit: cover;
  display: block;
  border-radius: 0;
  box-shadow: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-section::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(30,30,30,0) 50%,
    rgba(30,30,30,0.7) 90%,
    var(--colorbody) 100%
  );
  pointer-events: none;
}
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInCards 1.2s ease-out forwards;
  animation-delay: 0.3s;
}
@keyframes fadeInCards {
  to {
    opacity: 1;
    transform: none;
  }
}
.fade-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(.4,0,.2,1), transform 1s cubic-bezier(.4,0,.2,1);
  will-change: opacity, transform;
}
.fade-section.visible {
  opacity: 1;
  transform: none;
}
.card-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 8px;
}
.countdown-box {
  display: inline-block;
  background: none;
  color: var(--colora);
  border: 1px solid var(--colora);
  border-radius: 8px;
  padding: 8px 20px;
  font: var(--p);
  font-weight: bold;
  letter-spacing: 1px;
  margin: 0;
  text-align: center;
  box-shadow: 0 2px 8px #0002;
  min-width: 180px;
}
.logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  margin-right: 0;
  display: block;
}
/* Responsive Design */
@media (max-width: 1100px) {
  .main-wrapper {
    width: 98vw;
    max-width: 98vw;
    margin: 24px auto 0 auto;
  }
  .cards {
    max-width: 98vw;
  }
}
@media (max-width: 800px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 2vw;
        gap: 10px;
    }
    .site-header nav {
        width: 100%;
        gap: 6px;
        justify-content: flex-start;
        flex-wrap: wrap;
        overflow-x: auto;
    }
    .header-btn {
        min-width: 80px;
        font-size: 1em;
        padding: 8px 8px;
    }
}
@media (max-width: 700px) {
  .cards {
    margin-top: 220px;
    gap: 14px;
  }
  .card,
  .card[data-img-pos="right"] {
    flex-direction: column !important;
    text-align: left;
    align-items: flex-start;
    padding: 14px;
  }
  .card-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 320px;
    margin-bottom: 10px;
    border-radius: 16px;
  }
}
@media (max-width: 700px) {
  .hero-section,
  .hero-img {
    height: 180px;
    min-height: 180px;
    max-height: 180px;
  }
  .cards {
    margin-top: 120px;
  }
}
@media (max-width: 700px) {
  .play-now-section {
    padding: 24px 0 32px 0;
  }
  .server-ip-box {
    flex-direction: column;
    gap: 10px;
  }
  #server-ip {
    min-width: 0;
    width: 90vw;
    font-size: 1em;
    padding: 8px 0;
  }
}
@media (max-width: 500px) {
  .site-title {
    font-size: 1.3rem;
  }
  button,
  .header-btn {
    font-size: 1em;
    padding: 8px 10px;
  }
  .main-wrapper {
    margin: 10px auto 0 auto;
  }
}
.site-footer {
  width: 100vw;
  max-width: 100vw;
  background: #181818;
  color: var(--colorp);
  padding: 32px 0 16px 0;
  text-align: center;
  margin-top: 48px;
  font: var(--p);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--colora);
  position: relative;
  text-decoration: none;
  font-weight: bold;
  overflow: hidden;
  transition: color 0.2s;
}

a::before,
.footer-links a::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 7px; /* Increased from 3px to 6px */
  border-radius: 0px;
  background-color: currentColor;
  bottom: -4px; /* Lowered for a thicker line */
  left: 0;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  z-index: 1;
}

.footer-links a:hover,
.footer-links a:focus {
  color: var(--colora2);
}

.footer-links a:hover::before,
.footer-links a:focus::before {
  transform-origin: left;
  transform: scaleX(1);
}
.footer-copy {
  color: var(--colorgray);
  font-size: 0.95em;
}