/* General Layout */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif&display=swap');

html {
  margin: 0;
  padding: 0;
  height: 100%;
  box-sizing: border-box; /* opsional, kalau pakai box-sizing border-box */
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f8f9fb;
  user-select: none;
  -webkit-user-select: none;
}

main {
  flex: 1;
}

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

/* Novel Sections (for homepage/archive) */
.homepage-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.novel-section {
    margin-top: 40px;
}

.novel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.novel-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s;
}

.novel-card:hover {
    transform: scale(1.05);
}

.novel-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.novel-card h3 {
    padding: 10px;
    font-size: 16px;
}

/* Layout Page/Halaman Statis */
  .page-container {
    max-width: 960px;
    margin: 50px auto 80px;
    padding: 0 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
  }

  h1 {
    text-align: center;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #222;
  }

  h2 {
    text-align: left;
    font-weight: 700;
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 8px;
    color: #222;
  }

  p {
    font-size: 1.1em;
    color: #444;
    margin-bottom: 20px;
  }

  a {
    color: #0073aa;
    text-decoration: underline;
  }

  a:hover {
    text-decoration: none;
  }

  strong {
    color: #000;
  }

  small {
    color: #888;
  }

/* Genre Section (for homepage/archive) */
.genre-group {
    margin-top: 30px;
}

.genre-group h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

/* General Ad Styles (used across multiple pages) */
.novel-ad-container {
    margin: 20px 0;
}

/* ==== HEADER ==== */
.site-header {
  position: relative;
  top: 0;
  background: white;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.header-container {
  margin: 0;
  padding: 5px 30px 0;
  position: relative; /* biar top:0 efektif */
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  flex: 1;
}
.site-logo img {
  max-height: 50px;
  height: auto;
  width: auto;
}

.site-logo a {
  font-weight: bold;
  font-size: 1.5rem;
  text-decoration: none;
  color: #111;
}

.menu-user-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.main-nav {
  display: flex;
  flex: 1;
  text-align: center;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  margin: 0 10px;
}

.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.user-icon img {
  border-radius: 50%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: #333;
  margin: 4px 0;
}


        .separator {
    position: relative;
    text-align: center;
    margin: 30px 0 20px;
}

.separator span {
    background: white;
    padding: 0 12px;
    color: #666;
    font-size: 0.9em;
    position: relative;
    z-index: 1;
}

.separator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    height: 1px;
    width: 100%;
    background: #ddd;
    z-index: 0;
}
.google-signin-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* Mobile layout */
@media (max-width: 768px) {
  .menu-user-wrapper {
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    background: #fff;
    top: 60px;
    right: 0;
    width: 50%;
    height: 100vh; /* supaya menutup separuh tinggi layar juga */
    padding: 1rem;
    display: none;
    border-left: 1px solid #ddd;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.1); /* bayangan dari sisi kanan */
    z-index: 999;
  }

  .menu-user-wrapper.active {
    display: flex;
  }
  
  .nav-menu {
    flex-direction: column;
    width: 100%;
    padding: 0;
  }

  .nav-menu li {
    width: 100%;
    text-align: right;
    padding: 0.25rem 0;
    border-bottom: 1px solid #eee;
  }

  .nav-menu a {
    display: block;
    width: 100%;
    padding: 0.25rem;
    color: #333;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
  }

  .menu-toggle span {
    height: 3px;
    width: 25px;
    background: #333;
  }

  .logo {
    text-align: center;
    flex: 1;
    order: 2;
  }

  .menu-toggle {
    order: 1;
  }

  .user-icon {
    order: 3;
  }
}

/* ==== Modal Login KlikNovel ==== */
.login-modal {
  position: fixed;
  z-index: 9999;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center;
}
.login-modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.close-login-modal {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}
.login-modal-content input[type="email"],
.login-modal-content input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}
.remember-label {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.remember-label input { margin-right: 6px; }
.login-modal-content button {
  width: 100%;
  padding: 10px;
  background: #2d6cdf;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
}
.login-modal-content button:hover {
  background: #1a56bb;
}
.login-modal-content a {
  color: #2d6cdf;
  text-decoration: none;
}
.login-modal-content a:hover {
  text-decoration: underline;
}

/* Tombol Login di Header */
.kliknovel-login-button {
  display: inline-block;
  padding: 8px 16px;
  background-color: #2d6cdf;
  color: #fff;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}
.kliknovel-login-button:hover {
  background-color: #1a56bb;
}

/* ==== USER NOTIFS ==== */
.notif-wrapper {
  display: flex;
  justify-content: center;
  margin: 0 0 0.85rem;
}

.notif-box {
  max-width: 600px;
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.notif-box.success {
  background-color: #e6ffed;
  border: 1px solid #a3e6b3;
  color: #216e39;
}

.notif-box.warning {
  background-color: #fff8e1;
  border: 1px solid #ffdf85;
  color: #8a6d3b;
}

.notif-box.error {
  background-color: #ffe6e6;
  border: 1px solid #ff9999;
  color: #a94442;
}

.notif-dismiss {
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0 8px;
}

/* ==== Vote Event Grid ====*/
/* Grid wrapper */
.vote-event-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Grid layout */
.vote-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.vote-event-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.vote-event-card:hover {
  transform: translateY(-5px);
}

.vote-event-thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.no-thumb {
  width: 100%;
  height: 200px;
  background: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}

.vote-event-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.vote-event-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 0 0.5rem;
}

.vote-event-desc {
  flex-grow: 1;
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 1rem;
  text-align: justify;
}

.vote-event-cta {
  text-align: center;
  padding: 0.75rem 1rem;
  background-color: #351E10;
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s ease;
}

.vote-event-cta:hover {
  background-color: #33CC33;
  color: #4C2F24;
}

.vote-pagination {
  margin-top: 3rem;
  text-align: center;
}

.vote-pagination .page-numbers {
  display: inline-block;
  margin: 0 6px;
  padding: 6px 12px;
  border-radius: 6px;
  background: #eee;
  color: #333;
  text-decoration: none;
  font-weight: bold;
}

.vote-pagination .current {
  background: #333;
  color: #fff;
}

/* === FOOTER STYLE === */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1rem 0;
  font-family: system-ui, sans-serif;
  color: #555;
  line-height: 1.5;
}

.footer-main {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  gap: 0.20rem;
}

.footer-menu {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu-right{
  font-weight: 100;
  gap: 0.35rem;
}

.footer-separator {
  margin: 0 10px;
  color: #aaa;
}


.footer-menu a {
  color: inherit;
  text-decoration: none;
}

.footer-menu a:hover {
  text-decoration: underline;
}

.footer-credit {
  font-size: 0.80rem;
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
}

.heart {
  color: #ff4d4d;
  margin: 0 3px;
  display: inline-flex;
}

.bendera {
  height: 13px;
  margin-left: 5px;
  vertical-align: middle;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
  .footer-main {
    flex-direction: column;
    gap: 0.3rem;
  }
  
  .footer-menu {
    gap: 0.75rem;
  }
}