/* Load Kantumruy Pro from Google Fonts (recommended & fastest) */
@import url("https://fonts.googleapis.com/css2?family=Kantumruy+Pro:wght@400;500;600;700&display=swap");

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

body {
  background: #e8e8e8;
  color: #1a1a1a;
  /* English → Courier New (retro) | Khmer → Kantumruy Pro (modern & beautiful) */
  font-family: "Courier New", /* English stays retro */ monospace,
    /* fallback for English */ "Kantumruy Pro",
    /* Primary Khmer font */ "Noto Sans Khmer",
    /* excellent backup */ "Khmer OS Battambang", "Khmer", sans-serif;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
}
#mousePos {
  font-family: "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 1px;
  transition: all 0.1s ease;
  opacity: 1;
}
.outcomes-content {
  padding: 10px 0 10px 10px;
  border-left: 1px solid #ccc; /* គ្រាន់តែជាការបង្ហាញថាវាជាផ្នែកដាច់ដោយឡែក */
}

/* Styling for the list within outcomes-content */
.outcomes-content h4 {
  font-size: 18px;
  color: #444;
  margin-top: 0;
  margin-bottom: 8px;
}
.outcomes-content ul {
  list-style-type: square;
  margin-left: 30px;
  padding-left: 0;
}
.pagination {
  margin-top: 20px;
  text-align: center;
}
.pagination button {
  margin: 0 3px;
  padding: 5px 10px;
  cursor: pointer;
}
.pagination button.active {
  background: #333;
  color: #fff;
}

/* Optional: Force all Khmer text to use Kantumruy Pro with better spacing */
[lang="km"],
.khmer,
.blog-content p:has([lang="km"]),
.blog-content h2:has([lang="km"]) {
  font-family: "Kantumruy Pro", sans-serif !important;
  font-weight: 500;
  line-height: 1.9; /* Khmer looks better with slightly more breathing room */
  letter-spacing: 0.3px;
}
.blog-content ul, ol{
  margin-left: 40px;
  padding-left: 0;
}
.blog-content p, code, h3, h4, h5, h6 {
  margin-left: 20px;
}

/* Slightly larger base size for Khmer readability (optional but recommended) */
[lang="km"],
.khmer {
  font-size: 17px;
}

/* Keep all your original beautiful styles unchanged */
.pixel-decor {
  position: fixed;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  top: 0;
  left: 0;
}
.pixel-block {
  position: absolute;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}
.terminal-corner,
.status-corner {
  position: fixed;
  font-size: 12px;
  line-height: 1.5;
  color: #333;
  z-index: 10;
}
.terminal-corner {
  top: 15px;
  left: 15px;
}
.status-corner {
  top: 15px;
  right: 15px;
  text-align: right;
}
.main-container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 120px 20px 60px;
}
.hero {
  text-align: center;
  margin-bottom: 60px;
}
.hero-title {
  font-size: clamp(42px, 10vw, 72px);
  font-weight: bold;
  margin-bottom: 15px;
  letter-spacing: -1px;
}
.hero-subtitle {
  font-size: 17px;
  color: #555;
}
.nav-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
}
.nav-btn {
  padding: 10px 20px;
  background: #fff;
  border: 3px solid #000;
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 4px 4px 0 #000;
}
.nav-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}
.nav-btn.active {
  background: #000;
  color: #fff;
}
.search-container {
  max-width: 700px;
  margin: 0 auto 50px;
}
.search-box {
  width: 100%;
  padding: 14px 18px;
  border: 3px solid #000;
  font-family: inherit;
  font-size: 16px;
  background: #fff;
  box-shadow: 6px 6px 0 #000;
}
.search-box:focus {
  outline: none;
  background: #fffef5;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
  margin-bottom: 80px;
}
.blog-card {
  background: #fff;
  border: 3px solid #000;
  padding: 28px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 6px 6px 0 #000;
}
.blog-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 #000;
}
.blog-category {
  display: inline-block;
  background: #000;
  color: #fff;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 15px;
  letter-spacing: 1px;
}
.blog-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 12px;
  line-height: 1.3;
}
.blog-excerpt {
  font-size: 14.5px;
  color: #555;
  margin-bottom: 18px;
}
.blog-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #888;
  padding-top: 12px;
  border-top: 2px solid #e0e0e0;
}
.blog-detail {
  display: none;
  background: #fff;
  border: 3px solid #000;
  padding: 40px 30px;
  box-shadow: 8px 8px 0 #000;
  max-width: 900px;
  margin: 0 auto 80px;
}
.blog-detail.active {
  display: block;
  animation: fadeSlide 0.5s ease;
}
@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.back-btn {
  padding: 10px 22px;
  background: #fff;
  border: 3px solid #000;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 35px;
  box-shadow: 4px 4px 0 #000;
  display: inline-block;
}
.back-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}
.detail-title {
  font-size: clamp(32px, 6vw, 46px);
  font-weight: bold;
  margin: 15px 0;
  line-height: 1.2;
}
.video-section {
  margin: 50px 0;
  padding: 35px 25px;
  background: #000;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 #000;
}
.video-section h2 {
  color: #c4e538;
  font-size: 28px;
  margin-bottom: 25px;
  text-align: center;
  text-shadow: 2px 2px 0 #000;
}
.video-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.video-item {
  background: #fff;
  border: 3px solid #000;
  padding: 20px;
  box-shadow: 6px 6px 0 #000;
}
.video-title {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 12px;
  color: #000;
}
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
  border: 3px solid #000;
}
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.blog-content {
  font-size: 16px;
  line-height: 1.9;
}
.blog-content h2 {
  font-size: 28px;
  margin: 40px 0 16px;
  padding-left: 12px;
  border-left: 6px solid #000;
}
.blog-content p {
  margin-bottom: 18px;
  color: #444;
}
.blog-content code {
  background: #f5f5f5;
  padding: 3px 8px;
  border: 2px solid #ddd;
  font-size: 14px;
}

/* Responsive remains unchanged */
@media (max-width: 768px) {
  .main-container {
    padding: 100px 15px 40px;
  }
  .nav-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .blog-card {
    padding: 24px;
  }
  .blog-detail {
    padding: 30px 20px;
  }
  .video-section {
    padding: 25px 15px;
  }
  .video-item {
    padding: 16px;
  }
}
@media (max-width: 480px) {
  .hero-title {
    font-size: 38px;
  }
  .terminal-corner,
  .status-corner {
    font-size: 11px;
  }
  .back-btn {
    padding: 10px 18px;
    font-size: 14px;
  }
}
