/* ============================================================
   MinecraftHD — style.css
   Dark-themed Minecraft map resource site
   ============================================================ */

/* ----- 1. Reset + Base ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #0f0f1a;
  color: #f0f0f0;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #4ade80;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #22c55e;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ----- 2. Typography ----- */
h1, h2, h3, h4 {
  color: #f0f0f0;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 500; }

.pixel-font {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.9rem;
  line-height: 1.6;
  letter-spacing: 0.5px;
}

h1.pixel-font { font-size: 1.2rem; }
h2.pixel-font { font-size: 1rem; }
h3.pixel-font { font-size: 0.85rem; }

.text-muted {
  color: #9ca3af;
}

.text-accent {
  color: #4ade80;
}

p {
  margin-bottom: 1em;
}

/* ----- 3. Layout ----- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ----- 4. Navigation ----- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #0f0f1a;
  border-bottom: 1px solid #2a2a4a;
  padding: 0.75rem 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  text-decoration: none;
  color: #4ade80;
  transition: opacity 0.2s ease;
}

.nav-logo:hover {
  color: #4ade80;
  opacity: 0.85;
}

.nav-logo .pixel-font {
  font-size: 0.8rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links li a {
  color: #f0f0f0;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: #4ade80;
}

.nav-links li a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #4ade80;
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 32px;
  height: 32px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #f0f0f0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger animation when active */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ----- 5. Hero Section ----- */
.hero {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.25rem;
  background: linear-gradient(
    135deg,
    rgba(74, 222, 128, 0.08) 0%,
    rgba(15, 15, 26, 0.95) 50%,
    rgba(26, 26, 46, 0.6) 100%
  );
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(74, 222, 128, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-content h1 {
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.15rem;
  color: #9ca3af;
  margin-bottom: 2rem;
}

/* ----- 6. Cards ----- */
.map-card {
  display: block;
  background-color: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  color: #f0f0f0;
}

.map-card:hover {
  transform: translateY(-3px);
  background-color: #1f1f3a;
  border-color: rgba(74, 222, 128, 0.3);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.15);
  color: #f0f0f0;
}

.map-card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #1f1f3a;
  overflow: hidden;
}

.map-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.map-card:hover .map-card-thumbnail img {
  transform: scale(1.05);
}

.map-card-body {
  padding: 1rem 1.25rem 1.25rem;
}

.map-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.map-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

.category-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background-color: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ----- 7. Map Page Layout ----- */
.map-hero {
  padding: 2.5rem 0;
  border-bottom: 1px solid #2a2a4a;
}

.map-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  padding: 2rem 0;
}

.map-main {
  min-width: 0; /* prevent grid blowout */
}

.map-sidebar {
  min-width: 0;
}

.map-details {
  background-color: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 12px;
  padding: 1.5rem;
}

.map-details h3 {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #2a2a4a;
}

.map-details ul li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(42, 42, 74, 0.5);
  font-size: 0.95rem;
}

.map-details ul li:last-child {
  border-bottom: none;
}

.map-details ul li span:first-child {
  color: #9ca3af;
}

/* ----- 8. Buttons ----- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #4ade80;
  color: #0f0f1a;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
  text-decoration: none;
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  color: #0f0f1a;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: transparent;
  color: #4ade80;
  border: 2px solid #4ade80;
  border-radius: 8px;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  text-decoration: none;
}

.btn-outline:hover {
  background-color: rgba(74, 222, 128, 0.1);
  color: #22c55e;
  transform: translateY(-1px);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #4ade80;
  color: #0f0f1a;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
  text-decoration: none;
  width: 100%;
}

.btn-download::before {
  content: '\2193';
  font-size: 1.2rem;
  font-weight: 700;
}

.btn-download:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  color: #0f0f1a;
}

/* ----- 9. Forms ----- */
.email-form {
  display: flex;
  gap: 0.5rem;
}

.email-form input[type="email"] {
  flex: 1;
  padding: 0.65rem 1rem;
  background-color: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 8px;
  color: #f0f0f0;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s ease;
}

.email-form input[type="email"]::placeholder {
  color: #6b7280;
}

.email-form input[type="email"]:focus {
  outline: none;
  border-color: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.15);
}

.email-form .btn-primary {
  white-space: nowrap;
}

/* ----- 10. Affiliate / Ad Placeholders ----- */
.ad-placeholder {
  border: 2px dashed #2a2a4a;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.85rem;
  padding: 1.5rem;
  text-align: center;
  min-height: 120px;
  background-color: rgba(26, 26, 46, 0.3);
}

.ad-placeholder--leaderboard {
  width: 100%;
  min-height: 100px;
}

.ad-placeholder--sidebar {
  width: 100%;
  min-height: 250px;
}

.ad-placeholder--in-content {
  width: 100%;
  min-height: 150px;
  margin: 2rem 0;
}

.affiliate-box {
  background-color: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-left: 3px solid #4ade80;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.affiliate-box h4 {
  margin-bottom: 0.5rem;
}

.affiliate-box p {
  font-size: 0.9rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

/* ----- 11. Footer ----- */
.site-footer {
  background-color: #0a0a14;
  border-top: 1px solid #2a2a4a;
  padding: 3rem 0 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 2rem;
}

.footer-col h3 {
  margin-bottom: 1rem;
}

.footer-col h4 {
  margin-bottom: 1rem;
  color: #f0f0f0;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: #9ca3af;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-col ul li a:hover {
  color: #4ade80;
}

.footer-col p {
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid #2a2a4a;
  margin-top: 2.5rem;
  padding: 1.5rem 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

/* ----- 12. Guide / Article Layout ----- */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  padding: 2rem 0;
}

.article-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-content ol {
  list-style: decimal;
}

.article-content ul {
  list-style: disc;
}

.article-content li {
  margin-bottom: 0.4rem;
}

.article-content code {
  background-color: #1a1a2e;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: #4ade80;
}

.article-content pre {
  background-color: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.article-content pre code {
  background: none;
  padding: 0;
}

.toc {
  background-color: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.toc h4 {
  margin-bottom: 0.75rem;
  color: #4ade80;
}

.toc ul {
  list-style: none;
}

.toc ul li {
  margin-bottom: 0.4rem;
}

.toc ul li a {
  color: #9ca3af;
  font-size: 0.9rem;
}

.toc ul li a:hover {
  color: #4ade80;
}

/* ----- 13. Toast Notification ----- */
.toast {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background-color: #4ade80;
  color: #0f0f1a;
  text-align: center;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  animation: toastSlideDown 0.3s ease;
}

@keyframes toastSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast--dismiss {
  animation: toastSlideUp 0.3s ease forwards;
}

@keyframes toastSlideUp {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

/* ----- 14. Responsive ----- */

/* Tablet and below */
@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Navigation: hamburger mode */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #0f0f1a;
    border-bottom: 1px solid #2a2a4a;
    padding: 1rem 1.25rem;
    gap: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(42, 42, 74, 0.5);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .navbar {
    position: sticky;
  }

  .nav-container {
    position: relative;
  }

  /* Map page: single column */
  .map-content {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .hero {
    min-height: 300px;
    padding: 3rem 1.25rem;
  }

  h1 { font-size: 1.6rem; }
  h1.pixel-font { font-size: 1rem; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Small phones */
@media (max-width: 480px) {
  body {
    font-size: 0.95rem;
  }

  .container {
    padding: 0 0.75rem;
  }

  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.25rem; }
  h1.pixel-font { font-size: 0.85rem; }
  h2.pixel-font { font-size: 0.75rem; }

  .hero {
    min-height: 250px;
    padding: 2rem 0.75rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .btn-primary,
  .btn-outline {
    padding: 0.55rem 1.15rem;
    font-size: 0.9rem;
  }

  .btn-download {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .map-card-body {
    padding: 0.85rem 1rem 1rem;
  }

  .email-form {
    flex-direction: column;
  }

  .email-form input[type="email"],
  .email-form .btn-primary {
    width: 100%;
  }
}

/* ----- 15. Utilities ----- */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 2rem;
}
