/* ===== FUNHUB MAIN STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Noto+Sans+JP:wght@400;700&display=swap');

:root {
  --orange: #FF7D29;
  --orange-soft: #FF9A55;
  --orange-glow: rgba(255,125,41,0.35);
  --yellow: #FFD166;
  --white: #F5F0E8;
  --off-white: rgba(245,240,232,0.92);
  --black: #0A0A0F;
  --dark: #0F0F1A;
  --dark2: #13131F;
  --glass: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.12);
  --glass-strong: rgba(255,255,255,0.10);
  --text: #E8E2D9;
  --text-muted: rgba(232,226,217,0.55);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--black);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== ANIMATED BG ===== */
.bg-orbs {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: 0.4;
  animation: orbFloat 12s ease-in-out infinite;
}
.orb1 { width: 600px; height: 600px; background: radial-gradient(circle, #FF7D29, transparent); top: -15%; left: -10%; animation-delay: 0s; }
.orb2 { width: 500px; height: 500px; background: radial-gradient(circle, #1A0A2E, transparent); top: 30%; right: -15%; animation-delay: -4s; }
.orb3 { width: 400px; height: 400px; background: radial-gradient(circle, #FF7D2940, transparent); bottom: 10%; left: 20%; animation-delay: -8s; }
.orb4 { width: 300px; height: 300px; background: radial-gradient(circle, #FFD16630, transparent); top: 60%; right: 30%; animation-delay: -2s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

.noise-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,15,0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}
.nav-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  padding: 14px 24px;
}
.logo {
  text-decoration: none; display: flex; align-items: center; gap: 8px;
  font-size: 22px; font-weight: 800; letter-spacing: -0.5px;
}
.logo-fun { color: var(--white); }
.logo-hub { color: var(--orange); }
.logo-jp {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px; color: var(--text-muted);
  font-weight: 400; margin-left: 2px;
}
.nav-cats {
  display: flex; gap: 6px; flex: 1; overflow-x: auto;
  scrollbar-width: none;
}
.nav-cats::-webkit-scrollbar { display: none; }
.cat-btn {
  background: transparent; border: 1px solid var(--glass-border);
  color: var(--text-muted); font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 500; padding: 7px 16px;
  border-radius: 50px; cursor: pointer; white-space: nowrap;
  transition: all 0.2s ease;
}
.cat-btn:hover { border-color: var(--orange); color: var(--orange); }
.cat-btn.active {
  background: var(--orange); border-color: var(--orange);
  color: #fff; font-weight: 600;
}
.search-toggle {
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); padding: 9px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.search-toggle:hover { background: var(--orange); border-color: var(--orange); }

.search-bar-wrap {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  border-top: 0px solid var(--glass-border);
}
.search-bar-wrap.open { max-height: 80px; border-top: 1px solid var(--glass-border); }
.search-bar {
  display: flex; align-items: center; gap: 12px;
  max-width: 1400px; margin: 0 auto; padding: 12px 24px;
}
.s-icon { color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-family: 'Outfit', sans-serif;
  font-size: 16px; font-weight: 400;
}
.search-bar input::placeholder { color: var(--text-muted); }
.s-clear {
  background: transparent; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 14px; padding: 4px 8px; border-radius: 50%;
  transition: color 0.2s;
}
.s-clear:hover { color: var(--orange); }

/* ===== HERO ===== */
.hero {
  position: relative; z-index: 2;
  min-height: 100vh; display: flex; align-items: center;
  padding: 120px 24px 80px;
  max-width: 1400px; margin: 0 auto;
  overflow: hidden;
}
.hero-text {
  max-width: 580px;
  animation: heroIn 1s ease both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass-strong); border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px); border-radius: 50px;
  padding: 8px 18px; font-size: 13px; font-weight: 500;
  color: var(--orange-soft); margin-bottom: 24px;
  animation: heroIn 1s 0.1s ease both;
}
.hero-title {
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 900; line-height: 1.0;
  letter-spacing: -2px; color: var(--white);
  margin-bottom: 20px;
  animation: heroIn 1s 0.2s ease both;
}
.hero-accent {
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 17px; color: var(--text-muted); line-height: 1.6;
  margin-bottom: 36px; font-weight: 400;
  animation: heroIn 1s 0.3s ease both;
}
.hero-cta {
  display: inline-block; background: var(--orange);
  color: #fff; font-family: 'Outfit', sans-serif;
  font-size: 16px; font-weight: 700;
  padding: 16px 40px; border-radius: 50px;
  border: none; cursor: pointer;
  box-shadow: 0 0 40px var(--orange-glow);
  transition: all 0.3s ease;
}
.hero-cta:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 0 60px var(--orange-glow);
  background: var(--orange-soft);
}
.hero-btns {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  animation: heroIn 1s 0.4s ease both;
}
.hero-cta-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.07); border: 1px solid var(--glass-border);
  color: var(--text); text-decoration: none;
  font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 600;
  padding: 15px 28px; border-radius: 50px;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}
.hero-cta-secondary:hover {
  background: rgba(38,169,224,0.15); border-color: #26A9E0;
  color: #26A9E0; transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(38,169,224,0.2);
}

.hero-decor {
  position: absolute; right: -60px; top: 50%;
  transform: translateY(-50%);
  width: 500px; height: 500px;
  pointer-events: none;
}
.hero-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid var(--glass-border);
  animation: ringPulse 6s ease-in-out infinite;
}
.r1 { inset: 0; animation-delay: 0s; }
.r2 { inset: 40px; border-color: rgba(255,125,41,0.2); animation-delay: -2s; }
.r3 { inset: 90px; border-color: rgba(255,209,102,0.15); animation-delay: -4s; }
@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.04); opacity: 1; }
}
.hero-glyph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 140px; font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,125,41,0.15);
  animation: glyphSpin 20s linear infinite;
}
@keyframes glyphSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== SECTIONS ===== */
.trending-section, .main-section {
  position: relative; z-index: 2;
  max-width: 1400px; margin: 0 auto;
  padding: 60px 24px;
}
.section-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.sec-title {
  font-size: 24px; font-weight: 800; color: var(--white);
  letter-spacing: -0.5px;
}
.fire { font-size: 22px; }
.content-count {
  font-size: 13px; color: var(--text-muted);
  background: var(--glass); border: 1px solid var(--glass-border);
  padding: 4px 12px; border-radius: 50px;
}

/* ===== TRENDING STRIP ===== */
.trending-strip {
  display: flex; gap: 16px;
  overflow-x: auto; padding-bottom: 12px;
  scrollbar-width: thin; scrollbar-color: var(--glass-border) transparent;
}
.trending-strip::-webkit-scrollbar { height: 4px; }
.trending-strip::-webkit-scrollbar-track { background: transparent; }
.trending-strip::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 4px; }

.trending-card {
  flex-shrink: 0; width: 200px; height: 280px;
  position: relative; border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.trending-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px var(--orange-glow);
}
.trending-card .tc-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.trending-card:hover .tc-img { transform: scale(1.06); }
.tc-no-img {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
}
.tc-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
}
.tc-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--orange); color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 9px;
  border-radius: 50px; text-transform: uppercase;
}
.tc-views {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  color: var(--yellow); font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 50px;
}
.tc-info {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 14px;
}
.tc-title {
  font-size: 14px; font-weight: 700; color: #fff;
  line-height: 1.3; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ===== CONTENT GRID ===== */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.content-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  transition: all 0.3s ease;
  animation: cardIn 0.5s ease both;
  backdrop-filter: blur(12px);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.content-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,125,41,0.4);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 20px var(--orange-glow);
}
.card-banner {
  width: 100%; height: 300px;
  position: relative; overflow: hidden;
}
.card-banner img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.content-card:hover .card-banner img { transform: scale(1.06); }
.card-no-img {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 50%, #1a0a0a 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
}
.card-no-img .ni-emoji { font-size: 48px; }
.card-no-img .ni-text { font-size: 12px; color: var(--text-muted); }
.card-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
}
.card-cat-tag {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; font-weight: 700;
  padding: 4px 10px; border-radius: 50px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.cat-Movie { background: #FF7D29; color: #fff; }
.cat-Drama { background: #9B59B6; color: #fff; }
.cat-Series { background: #3498DB; color: #fff; }
.cat-Anime { background: #E74C3C; color: #fff; }
.cat-Show { background: #2ECC71; color: #fff; }
.cat-Other { background: #7F8C8D; color: #fff; }

.card-body {
  padding: 14px 16px;
}
.card-title {
  font-size: 15px; font-weight: 700; color: var(--white);
  line-height: 1.3; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-desc {
  font-size: 12.5px; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 10px;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.card-views {
  font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px;
}
.card-play-btn {
  width: 32px; height: 32px;
  background: var(--orange); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 0 12px var(--orange-glow);
}
.content-card:hover .card-play-btn {
  background: var(--yellow); transform: scale(1.15);
}

/* ===== SKELETON ===== */
.skeleton-row { display: flex; gap: 16px; }
.skel-card {
  flex-shrink: 0; width: 200px; height: 280px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ===== LOAD MORE ===== */
.load-more-wrap { text-align: center; margin-top: 40px; }
.load-more-btn {
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); font-family: 'Outfit', sans-serif;
  font-size: 15px; font-weight: 600;
  padding: 14px 40px; border-radius: 50px; cursor: pointer;
  backdrop-filter: blur(12px); transition: all 0.3s;
}
.load-more-btn:hover { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; padding: 80px 24px;
}
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state p { color: var(--text-muted); font-size: 16px; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-glass {
  background: rgba(15,15,26,0.95);
  border: 1px solid var(--glass-border);
  border-radius: 28px; overflow: hidden;
  max-width: 640px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 40px 120px rgba(0,0,0,0.8), 0 0 60px var(--orange-glow);
}
.modal-overlay.open .modal-glass { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  background: rgba(0,0,0,0.6); border: 1px solid var(--glass-border);
  color: var(--text); width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--orange); border-color: var(--orange); }
.modal-banner-wrap { width: 100%; max-height: 360px; overflow: hidden; }
.modal-banner-wrap img { width: 100%; height: 100%; object-fit: cover; }
.modal-no-banner {
  height: 200px; background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
  display: flex; align-items: center; justify-content: center;
  font-size: 72px;
}
.modal-body { padding: 28px; }
.modal-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.modal-cat {
  font-size: 11px; font-weight: 700; padding: 4px 12px;
  border-radius: 50px; text-transform: uppercase;
}
.modal-views { font-size: 12px; color: var(--text-muted); }
.modal-title { font-size: 26px; font-weight: 800; color: var(--white); margin-bottom: 14px; line-height: 1.2; }
.modal-desc { font-size: 14.5px; color: var(--text-muted); line-height: 1.7; margin-bottom: 28px; }
.modal-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--orange), var(--orange-soft));
  color: #fff; text-decoration: none;
  font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 700;
  padding: 16px 36px; border-radius: 50px;
  box-shadow: 0 0 40px var(--orange-glow);
  transition: all 0.3s ease;
}
.modal-cta:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 0 60px var(--orange-glow); }
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.modal-share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--text); font-family: 'Outfit', sans-serif;
  font-size: 15px; font-weight: 600;
  padding: 15px 24px; border-radius: 50px; cursor: pointer;
  backdrop-filter: blur(12px); transition: all 0.3s ease;
}
.modal-share-btn:hover { border-color: var(--orange); color: var(--orange); background: rgba(255,125,41,0.1); }
.share-toast {
  margin-top: 14px; padding: 10px 18px;
  background: rgba(46,213,115,0.15); border: 1px solid rgba(46,213,115,0.3);
  color: #2ED573; border-radius: 50px; font-size: 13px; font-weight: 600;
  display: none; width: fit-content;
  animation: toastIn 0.3s ease;
}
.share-toast.show { display: block; }
@keyframes toastIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* ===== FOOTER ===== */
.footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--glass-border);
  padding: 40px 24px;
  text-align: center;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
  margin-top: 60px;
}
.footer-logo { font-size: 24px; font-weight: 800; color: var(--white); margin-bottom: 8px; }
.footer-logo span { color: var(--orange); }
.footer-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.footer-copy { font-size: 12px; color: rgba(232,226,217,0.3); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero { padding: 100px 20px 60px; min-height: auto; }
  .hero-decor { display: none; }
  .hero-title { font-size: 44px; }
  .hero-btns { flex-direction: column; align-items: flex-start; }
  .content-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .card-banner { height: 240px; }
  .nav-cats { display: none; }
  .trending-section, .main-section { padding: 40px 16px; }
  .modal-glass { border-radius: 20px; }
  .modal-body { padding: 20px; }
  .modal-title { font-size: 20px; }
}
@media (max-width: 480px) {
  .content-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-banner { height: 200px; }
  .card-body { padding: 10px 12px; }
  .card-title { font-size: 13px; }
}
