/*
Theme Name: FunnyPress (Clean Room)
Theme URI: https://anime.108hd.com/funnypress
Author: anime.108hd.com
Author URI: https://anime.108hd.com/
Description: A clean-room, responsive movie-blog style theme that lists posts in a poster grid and pulls data from standard WP posts. No third-party assets included.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: funnypress
Tags: blog, grid-layout, two-columns, custom-logo, responsive-layout
*/

/* ------------------ Base / Reset ------------------ */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
  background: #0b0d10;
  color: #fff;
  line-height: 1.6;
}

a {
  color: #7dd3fc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ------------------ Layout ------------------ */
.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 1rem;
}

/* ------------------ Header / Navigation ------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 18, 22, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0;
}

.brand .title {
  font-weight: 800;
  letter-spacing: 0.3px;
  font-size: clamp(18px, 1.6vw, 22px);
}

.nav {
  display: flex;
  gap: 0.1rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  padding: 0.4rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
}

.nav a:hover {
  background: rgba(125, 211, 252, 0.1);
  border-color: rgba(125, 211, 252, 0.2);
  text-decoration: none;
}

/* ------------------ Search ------------------ */
.searchbar {
  margin-left: auto;
  position: relative;
  flex: 1;
  max-width: 320px;
}

.searchbar input {
  background: #0e1116;
  color: #e6e7e9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.6rem 2.8rem 0.6rem 0.9rem;
  width: 100%;
  box-sizing: border-box;
}

.searchbar button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.4rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #121620;
  color: #e6e7e9;
  cursor: pointer;
}

.searchbar button:hover {
  background: #0f1420;
}

@media (max-width: 768px) {
  .searchbar {
    max-width: 100%;
    margin: 10px 0;
  }

  .searchbar input {
    font-size: 16px;
  }
}

/* ------------------ Grid / Cards ------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.card {
  background: #0e1116;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.35);
}

.poster {
  aspect-ratio: 2 / 3;
  background: #0a0c0f;
  display: grid;
  place-items: center;
}

.card-body {
  padding: 0.75rem;
}

.card-title {
  font-weight: 700;
  font-size: 0.98rem;
  margin: 0 0 0.25rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
}

.meta {
  font-size: 0.8rem;
  color: #9aa0a6;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.72rem;
  padding: 0.18rem 0.45rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #121620;
}

.rating {
  color: #fbbf24;
}

/* ------------------ Single Page ------------------ */
.single-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 900px) {
  .single-hero {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }
}

.single-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 1rem;
  color: #9aa0a6;
}

.single-content,
.single-content-iframe {
  background: #0e1116;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1rem;
  padding: 1rem;
}

.related {
  margin-top: 2rem;
}

/* ------------------ Footer ------------------ */
.site-footer {
  margin-top: 2rem;
  padding: 2rem 0;
  text-align: center;
  color: #9aa0a6;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(1200px 200px at 50% 0, rgba(125, 211, 252, 0.08), transparent 60%);
}

/* ------------------ Pagination ------------------ */
.pagination {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1.5rem 0;
}

.page-numbers {
  padding: 0.5rem 0.8rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0e1116;
}

.page-numbers.current {
  background: #162032;
  border-color: rgba(125, 211, 252, 0.35);
}


















/* Hamburger & Responsive Menu */
.navbar-toggler {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}

.navbar-toggler-icon {
  display: block;
  width: 25px;
  height: 2px;
  background-color: #7dd3fc;
  position: relative;
  transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: "";
  width: 25px;
  height: 2px;
  background-color: #7dd3fc;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
  top: -8px;
}

.navbar-toggler-icon::after {
  top: 8px;
}

/* Mobile */
@media (max-width: 768px) {
  .navbar-toggler { display: block; }

  .nav {
    display: none;
    flex-direction: column;
    gap: 1;
    background: rgba(15,18,22,0.95);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 50;
  }

  .nav.show {
    display: flex;
  }

  .searchbar {
    width: 100%;
    margin-top: 0.5rem;
  }

  .searchbar input { width: 100%; }
}
.nav ul {
    list-style: none;
    margin: 4px;
    padding: 7px;
    display: flex;
    gap: 0.1rem;
}


.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: rgba(15,18,22,0.7);
  color: #7dd3fc;
  padding: .5rem .8rem;
  border: none;
  border-radius: .4rem;
  cursor: pointer;
  font-size: 0.98rem;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: rgba(15,18,22,0.95);
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  z-index: 99;
}

.dropdown-content a {
  color: #fff;
  padding: 8px 12px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background: rgba(125,211,252,0.3);
}

.dropdown:hover .dropdown-content {
  display: block;
}
.dropdown-content {
  display: none;
  position: absolute;
  background: rgba(15,18,22,0.95);
  min-width: 200px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  z-index: 99;
}

/* scrollbar สวย ๆ */
.dropdown-content::-webkit-scrollbar {
  width: 6px;
}
.dropdown-content::-webkit-scrollbar-thumb {
  background: #7dd3fc;
  border-radius: 3px;
}
.dropdown-content::-webkit-scrollbar-track {
  background: rgba(15,18,22,0.5);
}