/* ===== Main Style ===== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #121212;
  color: #fff;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

/* Light Theme */
body.light-theme {
  background: #f5f5f5;
  color: #121212;
}

/* Header */
header {
  background: #1f1f1f;
  padding: 15px;
  text-align: center;
  transition: background 0.3s;
}
body.light-theme header {
  background: #e0e0e0;
}
header h1 {
  color: #ff4757;
  margin: 0;
}

/* ==============================
   ✅ Mobile Hamburger Navigation
================================= */

.main-nav {
  background: #2b2b2b;
  padding: 10px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: background 0.3s;
  z-index: 1001;
}

body.light-theme .main-nav {
  background: #dcdcdc;
}

.nav-desktop {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-desktop a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  transition: color 0.3s;
}

body.light-theme .nav-desktop a {
  color: #121212;
}

.nav-desktop a:hover {
  color: #ff4757;
}

.nav-desktop a.active {
  color: #ff4757;
  border-bottom: 2px solid #ff4757;
}

/* Hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
}

body.light-theme .nav-toggle {
  color: #121212;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Drawer */
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  transform: translateX(-105%);
  transition: transform 0.25s ease;
  z-index: 2000;
  padding: 12px;
}

body.light-theme .nav-drawer {
  background: rgba(245, 245, 245, 0.98);
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

body.light-theme .nav-drawer-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.nav-title {
  font-weight: 800;
  font-size: 16px;
  color: #fff;
}

body.light-theme .nav-title {
  color: #121212;
}

.nav-close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
}

body.light-theme .nav-close {
  color: #121212;
}

.nav-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.nav-drawer-links a {
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 12px;
  transition: background 0.25s, color 0.25s;
}

body.light-theme .nav-drawer-links a {
  color: #121212;
}

.nav-drawer-links a:hover {
  background: rgba(255, 71, 87, 0.20);
}

.nav-drawer-links a.active {
  background: rgba(255, 71, 87, 0.25);
  color: #ff4757;
}

/* Backdrop overlay */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1500;
}

/* Open states */
body.nav-open .nav-drawer {
  transform: translateX(0);
}

body.nav-open .nav-backdrop {
  display: block;
}

body.nav-open {
  overflow: hidden; /* block scroll behind drawer */
}

/* ✅ Mobile mode: show hamburger + hide desktop menu */
@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-desktop {
    display: none;
  }

  .main-nav {
    justify-content: flex-start;
    padding-left: 52px; /* space for ☰ */
  }
}

/* ===== Theme Switch ===== */
.theme-switch {
  position: fixed;
  top: 15px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 20px;
  user-select: none;
  z-index: 1000;
}
.theme-switch input {
  display: none;
}
.theme-switch label {
  display: block;
  width: 50px;
  height: 25px;
  background: #555;
  border-radius: 50px;
  position: relative;
  transition: background 0.3s;
  cursor: pointer;
}
.theme-switch label::after {
  content: "";
  width: 23px;
  height: 23px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: transform 0.3s;
}
.theme-switch input:checked + label::after {
  transform: translateX(25px);
}
.theme-switch .sun,
.theme-switch .moon {
  font-size: 18px;
}

/* ===== Container ===== */
.container {
  max-width: 900px;
  margin: 20px auto;
  padding: 0 20px;
}

/* Article */
.article img {
  max-width: 100%;
  border-radius: 10px;
  transition: transform 0.3s;
}
.article img:hover {
  transform: scale(1.05);
}
.article h1 {
  color: #ff4757;
  margin-bottom: 10px;
}
body.light-theme .article h1 {
  color: #d91e18;
}
.article p {
  margin-bottom: 15px;
}
.author {
  font-style: italic;
  color: #ffa502;
  margin-bottom: 15px;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #ff4757;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.back-to-top:hover {
  opacity: 1;
}

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 15px;
  background: #1f1f1f;
  margin-top: 30px;
  transition: background 0.3s, color 0.3s;
}
body.light-theme footer {
  background: #e0e0e0;
  color: #121212;
}

/* ===== Floating Share Button ===== */
.share-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 9999;
}
.share-btn {
  background: #ff4757;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s, box-shadow 0.3s, opacity 0.3s;
  opacity: 0.7;
}
.share-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  opacity: 1;
}
.social-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}
.social-btns.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.social-btns a {
  padding: 8px 12px;
  border-radius: 6px;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.3s;
}
.social-btns a.whatsapp {
  background: #25D366;
}
.social-btns a.facebook {
  background: #1877F2;
}
.social-btns a:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ===== Responsive Fixes ===== */
@media screen and (max-width: 600px) {
  /* Share button smaller */
  .share-btn {
    padding: 8px 10px;
    font-size: 13px;
  }

  /* Theme switch smaller */
  .theme-switch {
    top: 10px;
    right: 10px;
    transform: scale(0.85);
    font-size: 16px;
  }
  .sun,
  .moon {
    font-size: 15px;
  }
}

.link {
  color: hwb(253 17% 1%);
  text-decoration: none;
  font-weight: bold;
}

.link:hover {
  text-decoration: underline;
}

/* Video container (responsive) */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin: 20px 0;
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* ===== Table of Contents ===== */
.toc {
  background: #111;
  color: #fff;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 25px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.toc h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  border-bottom: 2px solid #e50914; /* red theme */
  padding-bottom: 5px;
}

/* Only affect the TOC, not your game lists */
.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toc li {
  background: #222;
  border-radius: 6px;
  transition: background 0.3s;
}

.toc li:hover {
  background: #e50914;
}

.toc a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 8px 12px;
  font-weight: 500;
}

/* ===== Month Sections ===== */
.month-section {
  margin: 50px 0;
}

.month-section h3 {
  color: #e50914;
  border-bottom: 2px solid #e50914;
  padding-bottom: 4px;
  margin-bottom: 10px;
}

/* Keep numbering visible for your game lists */
.month-section ol {
  list-style-type: decimal;
  padding-left: 25px;
}

.month-section li {
  margin-bottom: 6px;
}

html{
  scroll-behavior: smooth;
}

/* Ad Slot Styling */
.ad-slot {
  text-align: center;
  margin: 15px auto;
  display: block;
}

.ad-slot img {
  width: 100%;
  max-width: 728px; /* Adjust per size */
  border-radius: 8px;
  transition: 0.3s ease;
}

.ad-slot img:hover {
  transform: scale(1.03);
}
#ad-rotator img {
  width: 100%;
  max-width: 728px;
  border-radius: 8px;
  transition: opacity 1s ease-in-out;
}

/* popup img */

/* ==== Popup Word with Image Effect ==== */

.popup-word {
  position: relative;
  color: #ff3c3c;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  -webkit-tap-highlight-color: transparent; /* disable blue tap flash */
}

.popup-word:hover {
  color: #ff7b7b;
}

/* Hidden popup image */
.popup-word::after {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  width: 160px;
  height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 999;
}

/* Hover/Active Show */
.popup-word:hover::after,
.popup-word.active::after {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

/* Caption */
.popup-word::before {
  content: attr(data-caption);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1000;
}

.popup-word:hover::before,
.popup-word.active::before {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

/* 🔹 Mobile optimization */
@media (max-width: 768px) {
  .popup-word::after {
    top: -140px;
    width: 140px;
    height: 140px;
  }
}