/*
Theme Name: 猛兽吃瓜站
Theme URI: https://partyanimals.com
Author: Marvis
Description: 猛兽派对（Party Animals）主题吃瓜站 WordPress 模板，支持爆料投稿、点赞、轮播图和热榜。
Version: 1.0
License: GPL-2.0-or-later
Text Domain: party-gossip
*/

:root {
  --cream: oklch(0.97 0.02 80);
  --warm-bg: oklch(0.94 0.03 75);
  --coral: oklch(0.62 0.18 25);
  --coral-light: oklch(0.75 0.14 25);
  --coral-glow: oklch(0.82 0.10 25);
  --mint: oklch(0.68 0.10 155);
  --mint-light: oklch(0.82 0.08 155);
  --purple: oklch(0.55 0.12 320);
  --purple-light: oklch(0.72 0.10 320);
  --text: oklch(0.25 0.02 80);
  --text-sub: oklch(0.45 0.02 80);
  --text-muted: oklch(0.60 0.02 80);
  --surface: oklch(0.99 0.01 80);
  --surface-card: oklch(0.98 0.015 80);
  --shadow-sm: 0 2px 8px oklch(0.3 0.03 60 / 0.08);
  --shadow-md: 0 4px 20px oklch(0.3 0.03 60 / 0.12);
  --shadow-lg: 0 8px 32px oklch(0.3 0.03 60 / 0.16);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 36px;
  --font: 'Noto Sans SC', -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; font-size: clamp(14px, 1.6vw, 16px); }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  top: -40%; left: -20%;
  width: 80%; height: 100%;
  background: radial-gradient(ellipse, oklch(0.82 0.10 25 / 0.15) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -30%; right: -15%;
  width: 70%; height: 90%;
  background: radial-gradient(ellipse, oklch(0.82 0.08 155 / 0.12) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

.floating-paw {
  position: fixed; pointer-events: none; z-index: 0;
  opacity: 0.06; font-size: clamp(60px, 10vw, 140px);
  animation: floatPaw 20s ease-in-out infinite;
}
.floating-paw:nth-child(1) { top: 8%; left: 5%; }
.floating-paw:nth-child(2) { top: 25%; right: 3%; animation-delay: -7s; font-size: clamp(40px, 6vw, 90px); }
.floating-paw:nth-child(3) { bottom: 15%; left: 8%; animation-delay: -14s; font-size: clamp(50px, 8vw, 110px); }
.floating-paw:nth-child(4) { top: 60%; right: 6%; animation-delay: -3s; }

@keyframes floatPaw {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, -30px) rotate(5deg); }
  50% { transform: translate(-10px, -15px) rotate(-3deg); }
  75% { transform: translate(15px, 20px) rotate(4deg); }
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: oklch(0.98 0.02 80 / 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 2px solid oklch(0.9 0.03 75 / 0.5);
  padding: 0 clamp(16px, 4vw, 40px);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-icon {
  width: 42px; height: 42px; background: var(--coral);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px oklch(0.62 0.18 25 / 0.25);
  transition: transform 0.2s ease;
}
.logo:hover .logo-icon { transform: scale(1.1) rotate(-5deg); }
.logo-text { font-size: 1.25rem; font-weight: 900; letter-spacing: 0.02em; }
.logo-text span { color: var(--coral); }

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  text-decoration: none; color: var(--text-sub); font-weight: 500;
  font-size: 0.9rem; padding: 8px 16px; border-radius: var(--radius-xl);
  transition: all 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { background: oklch(0.92 0.04 75); color: var(--coral); }

/* 顶部爆料按钮 */
.header-baoliao {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 20px; border-radius: var(--radius-xl);
  font-size: 0.88rem; font-weight: 700; font-family: var(--font);
  cursor: pointer; border: none;
  background: linear-gradient(135deg, var(--coral), oklch(0.58 0.19 20));
  color: white; letter-spacing: 0.03em;
  box-shadow: 0 3px 12px oklch(0.62 0.18 25 / 0.3);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: headerPulse 2.4s ease-in-out infinite;
}
.header-baoliao:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px oklch(0.62 0.18 25 / 0.45);
}
@keyframes headerPulse {
  0%, 100% { box-shadow: 0 3px 12px oklch(0.62 0.18 25 / 0.3); }
  50% { box-shadow: 0 3px 22px oklch(0.62 0.18 25 / 0.55); }
}

/* Main layout */
.main-layout {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 40px);
  display: grid; grid-template-columns: 1fr 340px;
  gap: clamp(20px, 3vw, 36px);
  position: relative; z-index: 1;
}
.main-content { min-width: 0; }

.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 20px;
  margin-top: 8px;
}
.section-title::after {
  content: ''; flex: 1; height: 2px;
  background: oklch(0.88 0.04 75); border-radius: 1px;
}

/* 轮播图 */
.carousel {
  width: calc(100% + 340px + clamp(20px, 3vw, 36px));
  border-radius: var(--radius-xl);
  overflow: hidden; position: relative;
  margin: 12px 0 24px -0px;
  z-index: 1;
  aspect-ratio: 2.4 / 1;
  min-height: 250px; max-height: 430px;
  background: oklch(0.9 0.04 80);
  box-shadow: var(--shadow-md);
}
.carousel-track {
  display: flex; height: 100%;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-slide {
  min-width: 100%; height: 100%; position: relative;
  flex-shrink: 0;
}
.carousel-slide img {
  width: 100%; height: 100%; object-fit: cover;
}
.carousel-slide .slide-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: clamp(16px, 3vw, 28px) clamp(20px, 3vw, 36px);
  background: linear-gradient(to top, oklch(0.15 0.03 60 / 0.7), transparent);
  color: white;
}
.slide-info .slide-tag {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-xl);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em;
  background: oklch(1 0 0 / 0.2); backdrop-filter: blur(4px);
  margin-bottom: 6px;
}
.slide-info .slide-title {
  font-size: clamp(1rem, 2vw, 1.35rem); font-weight: 900;
  margin-bottom: 4px; line-height: 1.3;
}
.slide-info .slide-sub {
  font-size: 0.8rem; opacity: 0.75;
}

.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: oklch(1 0 0 / 0.8); backdrop-filter: blur(8px);
  color: var(--text); font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; z-index: 5;
  box-shadow: var(--shadow-sm);
}
.carousel-btn:hover { background: white; transform: translateY(-50%) scale(1.08); }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots {
  position: absolute; bottom: 12px; left: 50%;
  transform: translateX(-50%); display: flex; gap: 8px;
  z-index: 5;
}
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none;
  background: oklch(1 0 0 / 0.4); cursor: pointer;
  transition: all 0.3s ease; padding: 0;
}
.carousel-dots button.active {
  background: white; width: 22px; border-radius: 4px;
}

@media (max-width: 768px) {
  .carousel {
    width: 100%; margin: 12px 0 20px 0;
    min-height: 160px; max-height: 240px;
  }
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; order: -1; margin-top: 0; }
  .header-baoliao { padding: 6px 14px; font-size: 0.78rem; }
  .header-inner { height: 56px; }
  .logo-text { font-size: 1rem; }
  .nav-links a { padding: 6px 10px; font-size: 0.8rem; }
}

/* 卡片图片 */
.card-image {
  width: 100%; height: clamp(180px, 22vw, 260px);
  border-radius: var(--radius-md);
  overflow: hidden; margin-bottom: 16px;
  position: relative; background: oklch(0.9 0.04 80);
  cursor: pointer;
}
.card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card-image:hover img { transform: scale(1.06); }
.card-image .img-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, oklch(0.2 0.03 60 / 0.25), transparent 50%);
  pointer-events: none;
}
.card-image .img-badge {
  position: absolute; bottom: 10px; right: 12px;
  background: oklch(1 0 0 / 0.85); backdrop-filter: blur(8px);
  padding: 4px 10px; border-radius: var(--radius-xl);
  font-size: 0.72rem; font-weight: 700; color: var(--coral);
}

/* 爆料卡片 */
.gossip-card {
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  padding: clamp(16px, 2.5vw, 24px);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid transparent;
  cursor: default; position: relative;
}
.gossip-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: oklch(0.88 0.06 75);
}

.card-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.card-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.avatar-coral { background: var(--coral-light); }
.avatar-mint { background: var(--mint-light); }
.avatar-purple { background: var(--purple-light); }

.card-meta { flex: 1; }
.card-author { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.card-time { font-size: 0.75rem; color: var(--text-muted); }

.card-tag {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-xl);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em;
}
.tag-hot { background: oklch(0.62 0.18 25 / 0.12); color: var(--coral); }
.tag-new { background: oklch(0.68 0.10 155 / 0.12); color: var(--mint); }
.tag-rumor { background: oklch(0.55 0.12 320 / 0.10); color: var(--purple); }
.tag-confirmed { background: oklch(0.95 0.06 90 / 0.4); color: oklch(0.45 0.08 65); }

.card-title {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
  margin-bottom: 8px; line-height: 1.4;
}
.card-body {
  font-size: 0.9rem; color: var(--text-sub);
  margin-bottom: 14px; line-height: 1.7;
}

.card-video { margin-bottom: 12px; }
.card-video a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: var(--radius-xl);
  background: oklch(0.68 0.08 250 / 0.1);
  color: oklch(0.42 0.09 250); font-size: 0.82rem; font-weight: 600;
  text-decoration: none; transition: background 0.2s;
}
.card-video a:hover { background: oklch(0.68 0.08 250 / 0.2); }

.card-actions { display: flex; gap: 8px; align-items: center; }

.btn-action {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: var(--radius-xl);
  border: none; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; background: oklch(0.93 0.03 80); color: var(--text-sub);
  transition: all 0.2s ease; font-family: var(--font);
  position: relative;
}
.btn-action:hover { background: oklch(0.88 0.05 75); color: var(--text); }

/* 西瓜点赞按钮 */
.watermelon-btn { position: relative; overflow: visible; }
.watermelon-btn.liked {
  background: oklch(0.78 0.13 140 / 0.22);
  color: oklch(0.42 0.10 135);
}
.watermelon-btn .wm-icon {
  font-size: 1.05rem; transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block; line-height: 1;
}
.watermelon-btn:not(.liked) .wm-icon {
  filter: grayscale(1) opacity(0.45);
}
.watermelon-btn:hover .wm-icon { transform: scale(1.25); filter: none; }

/* 吃瓜动效 */
@keyframes eatMelonPop {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.3); }
  30% { opacity: 1; transform: translate(-50%, -28px) scale(1.15); }
  60% { transform: translate(-50%, -36px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60px) scale(0.8); }
}
.melon-toast {
  position: absolute; left: 50%; top: -8px; transform: translateX(-50%);
  pointer-events: none; white-space: nowrap;
  font-size: 0.82rem; font-weight: 700;
  color: var(--coral);
  animation: eatMelonPop 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  z-index: 10;
}

/* 狗爪按钮 */
.paw-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 20px 16px 24px;
  border: none; border-radius: var(--radius-xl);
  font-size: 1.1rem; font-weight: 800;
  font-family: var(--font); cursor: pointer;
  background: linear-gradient(135deg, oklch(0.68 0.18 25) 0%, oklch(0.62 0.20 25) 100%);
  color: white;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 20px oklch(0.62 0.18 25 / 0.35);
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
}
.paw-btn::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 25%, oklch(1 0 0 / 0.18) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, oklch(1 0 0 / 0.12) 0%, transparent 50%);
  pointer-events: none;
}
.paw-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px oklch(0.62 0.18 25 / 0.5);
}
.paw-btn:active { transform: translateY(0); }
.paw-btn .paw-icon {
  font-size: clamp(36px, 5vw, 50px);
  line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
}
.paw-btn:hover .paw-icon { transform: scale(1.15) rotate(-8deg); }

/* 侧边栏 */
.sidebar { align-self: start; display: flex; flex-direction: column; gap: 20px; margin-top: 450px; }

.sidebar-card {
  background: var(--surface-card); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-sm);
  border: 2px solid oklch(0.9 0.03 80 / 0.5);
}
.sidebar-card h3 {
  font-size: 0.95rem; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 6px;
}

.hot-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid oklch(0.9 0.02 80);
  cursor: pointer; transition: all 0.2s ease;
}
.hot-item:last-child { border-bottom: none; }
.hot-item:hover { padding-left: 4px; }

.hot-thumb {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  overflow: hidden; flex-shrink: 0; background: oklch(0.9 0.04 80);
}
.hot-thumb img { width: 100%; height: 100%; object-fit: cover; }

.hot-rank {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 0.7rem; flex-shrink: 0;
}
.rank-1 { background: var(--coral); color: white; }
.rank-2 { background: oklch(0.72 0.16 25); color: white; }
.rank-3 { background: oklch(0.78 0.12 25); color: white; }
.rank-normal { background: oklch(0.9 0.03 80); color: var(--text-muted); }
.hot-text { font-size: 0.82rem; font-weight: 500; color: var(--text-sub); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-count { font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; }

/* 弹窗 */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: oklch(0.2 0.03 60 / 0.4); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease; padding: 20px;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 36px); max-width: 520px; width: 100%;
  box-shadow: var(--shadow-lg);
  transform: translateY(30px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.modal-overlay.active .modal { transform: translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px;
}
.modal-header h2 { font-size: 1.3rem; font-weight: 900; display: flex; align-items: center; gap: 6px; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: oklch(0.92 0.03 80); color: var(--text-sub);
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.modal-close:hover { background: oklch(0.85 0.05 75); color: var(--text); }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 12px 16px; border: 2px solid oklch(0.9 0.03 80);
  border-radius: var(--radius-md); font-size: 0.9rem;
  font-family: var(--font); color: var(--text);
  background: oklch(0.97 0.01 80); transition: all 0.2s ease; outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--coral-light);
  box-shadow: 0 0 0 4px oklch(0.62 0.18 25 / 0.08);
  background: var(--surface);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { cursor: pointer; }

.form-file { padding: 10px 12px; }
.form-file::file-selector-button {
  padding: 6px 14px; border: none; border-radius: var(--radius-sm);
  background: var(--coral-light); color: var(--coral);
  font-family: var(--font); font-weight: 700; font-size: 0.8rem;
  cursor: pointer; margin-right: 10px;
  transition: background 0.2s;
}
.form-file::file-selector-button:hover { background: oklch(0.78 0.16 25 / 0.3); }

.img-preview { margin-top: 10px; }
.img-preview img {
  max-width: 100%; max-height: 200px; border-radius: var(--radius-md);
  border: 2px solid oklch(0.9 0.03 80);
}

.form-submit {
  width: 100%; padding: 14px; border: none; border-radius: var(--radius-md);
  font-size: 1rem; font-weight: 700; font-family: var(--font); cursor: pointer;
  background: linear-gradient(135deg, var(--coral), oklch(0.58 0.19 20));
  color: white; box-shadow: 0 4px 16px oklch(0.62 0.18 25 / 0.25);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); margin-top: 4px;
}
.form-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px oklch(0.62 0.18 25 / 0.35); }
.form-submit:active { transform: translateY(0); }
.char-count { text-align: right; font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* Toast */
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text); color: white; padding: 12px 28px;
  border-radius: var(--radius-xl); font-weight: 600; font-size: 0.9rem;
  z-index: 300; pointer-events: none; opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.site-footer {
  text-align: center; padding: 32px 20px 24px;
  color: var(--text-muted); font-size: 0.8rem;
  position: relative; z-index: 1;
}

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}