@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&display=swap');

:root {
  --bg-main: #0a0f1f;          /* neon dark */
  --bg-nav: #0d1228;           /* neon header */
  --accent: #00eaff;           /* neon cyan glow */
  --accent-soft: #6af7ff;      /* hover glow */
  --text-light: #e0e6ff;
  --text-dark: #000;
  --font-main: 'Montserrat', sans-serif;
  --radius: 1vw;
  --shadow-card: 0 0 20px rgba(0,255,255,0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-main);
  font-family: var(--font-main);
  color: var(--text-light);
}

/* Navigation Bar */
nav {
  position: fixed;
  top: 0;
  left: 0;
  background-color: var(--bg-nav);
  display: flex;
  align-items: center;
  height: clamp(56px, 7vw, 120px);
  width: 100%;
  padding: 0 1%;
  z-index: 1000;
  border-bottom: 2px solid rgba(0,255,255,0.3);
  box-shadow: 0 0 20px rgba(0,255,255,0.25);
}

nav img {
  height: 80%;
  margin-right: 1%;
  border-radius: var(--radius);
  cursor: pointer;
  user-select: none;
  box-shadow: 0 0 15px rgba(0,255,255,0.4);
}

nav h1 {
  font-size: clamp(24px, 4vw, 64px);
  font-weight: 800;
  margin-right: 1%;
  color: var(--accent-soft);
  text-shadow: 0 0 10px var(--accent);
}

/* Content Wrapper */
.content {
  display: flex;
  flex-direction: column;
  padding: calc(clamp(56px, 7vw, 120px) + 1.5vw) 2vw 2vw;
  padding-top: 0;
}

.content hr {
  border: none;
  height: 4px;
  background-image: linear-gradient(to right, transparent, var(--accent), transparent);
  margin: 1vw 0;
}

/* Search Bar */
.search {
  display: flex;
  gap: 0;
  margin: 2.5vw 0 0 1.2vw;
  user-select: none;
}

.search input {
  background-color: #0a0f1f;
  border: 2px solid var(--accent);
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text-light);
  font-size: clamp(14px, 1.5vw, 20px);
  font-weight: 600;
  padding: 0.8vw 1.5vw;
  outline: none;
  box-shadow: 0 0 12px rgba(0,255,255,0.3);
}

.search input::placeholder {
  color: var(--text-light);
  font-weight: 600;
}

.search input:focus {
  border-color: var(--accent-soft);
  box-shadow: 0 0 20px rgba(0,255,255,0.6);
}

.search button {
  background-color: var(--accent);
  border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-dark);
  font-size: clamp(14px, 1.5vw, 20px);
  font-weight: 700;
  padding: 0.8vw 1vw;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 0 15px var(--accent);
}

.search button:hover {
  background-color: var(--accent-soft);
  box-shadow: 0 0 20px var(--accent-soft);
}

.search button:active {
  transform: scale(0.98);
}

/* Game Grid */
#games {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.6vw;
  padding-bottom: 5vw;
}

#games a {
  display: inline-block;
}

#games img {
  height: 15.6vw;
  width: 15.6vw;
  border-radius: var(--radius);
  margin: 0.5vw;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
  box-shadow: 0 0 15px rgba(0,255,255,0.3);
}

#games img:hover {
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(0,255,255,0.8);
}

/* Featured Section */
.featured {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1vw;
  margin: 6vw 1%;
}

.featured h1 {
  font-size: clamp(22px, 3.5vw, 54px);
  font-weight: 700;
  margin: 1vw;
  width: 100%;
  text-align: left;
  color: var(--accent-soft);
  text-shadow: 0 0 10px var(--accent);
}

.featured img {
  height: 12.5vw;
  width: 12.5vw;
  border-radius: var(--radius);
  margin: 0.5vw;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  display: block;
  box-shadow: 0 0 15px rgba(0,255,255,0.3);
}

.featured img:hover {
  transform: scale(1.06);
  filter: brightness(70%);
  box-shadow: 0 0 25px rgba(0,255,255,0.8);
}

.featured .row img {
  height: 26vw;
  width: 26vw;
}

/* Play Button Overlay */
.featured a {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.featured .play-button {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.featured a:hover .play-button {
  opacity: 1;
}

.featured .play-button i {
  font-size: 5vw;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent);
}

/* MOTD Overlay */
.motd-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
}

.motd-box {
  background: #0d1228;
  color: var(--text-light);
  padding: 2vw;
  border-radius: var(--radius);
  max-width: 520px;
  width: 85%;
  text-align: center;
  position: relative;
  animation: motdFadeIn 0.25s ease;
  font-family: var(--font-main);
  box-shadow: 0 0 25px rgba(0,255,255,0.6);
  border: 2px solid var(--accent);
}

.motd-box h2 {
  margin: 0 0 0.8em;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 800;
  color: var(--accent-soft);
  text-shadow: 0 0 10px var(--accent);
}

.motd-box p {
  margin: 0;
  font-size: clamp(14px, 1.6vw, 18px);
  color: var(--text-light);
}

.motd-close {
  position: absolute;
  top: 0.6vw;
  right: 1vw;
  font-size: clamp(18px, 2vw, 28px);
  line-height: 1;
  border: none;
  background: transparent;
  color: var(--accent-soft);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.1s ease;
}

.motd-close:hover {
  color: var(--accent);
}

.motd-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  margin-top: 1em;
  box-shadow: 0 0 15px rgba(0,255,255,0.4);
}

/* Animation */
@keyframes motdFadeIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile adjustments */
@media (max-width: 720px) {
  :root { --radius: 3vw; }

  .featured img {
    height: 30vw;
    width: 30vw;
  }

  .featured .row img {
    height: 60vw;
    width: 60vw;
  }

  #games img {
    height: 32vw;
    width: 32vw;
  }

  .search {
    margin: 5vw 2vw 0;
  }

  .motd-image {
    height: 40vw;
  }
}
