/*
Theme Name: Gamou Child
Template: twentytwentyfour
Version: 1.0.0
Description: Child theme for Gamou with custom header/footer and hero.
Author: Gamou
*/

:root {
  --yellow: #f7c600;
  --bg-dark: #0b0b0b;
  --text-light: #f4f4f4;
  --text-dark: #222;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
  color: var(--text-dark);
  background: #f4f6fb;
}

a { color: inherit; }

.site-main {
  padding: 40px clamp(24px, 5vw, 72px) 60px;
}

body:not(.home) .site-main {
  margin: 120px auto 80px;
  padding: 32px clamp(28px, 4vw, 64px) 70px;
  max-width: 900px;
  width: min(900px, calc(100% - 48px));
}

/* Top nav floating */
.top-wrap {
  position: absolute;
  top: 14px;
  left: 0;
  width: 100%;
  z-index: 10;
  padding: 0 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #f5f5f5;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0,0,0,0.15);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  background: #fff;
}

.top-nav {
  display: flex;
  gap: 22px;
  font-size: 16px;
  align-items: center;
  font-weight: 600;
}

.top-nav a {
  text-decoration: none;
  color: #fdfdfd;
  padding: 6px 0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.top-nav a:hover { opacity: 0.9; }

/* 炫彩文字样式 - 用于更新日誌等 */
.colorful-text,
.top-nav a[href*="changelog"] { /* 兼容 WordPress 动态菜单 */
  /* 优化后的高亮炫彩：亮粉 -> 青 -> 明黄 -> 亮紫 -> 亮粉 (循环) */
  background: linear-gradient(90deg, #ff00cc, #00ffff, #ffff00, #9d00ff, #ff00cc);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: colorfulFlow 4s linear infinite;
  font-weight: 800;
  text-shadow: none !important;
  display: inline-block;
  position: relative;
  border-radius: 15px;
  padding: 5px 20px;
}

.colorful-text::before,
.top-nav a[href*="changelog"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 2px;
  background: repeating-linear-gradient(45deg, #ffcccc, #ffcccc 10px, #ffffcc 10px, #ffffcc 20px);
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: colorfulFlow 10s linear infinite;
}

@keyframes colorfulFlow {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/hero-gamou.png") center/cover no-repeat;
  transform: scale(1.05);
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.18), rgba(0,0,0,0.5));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 12px;
  padding: 0 5vw;
}

.hero h1 {
  margin: 0;
  font-size: 64px;
  font-weight: 700;
  color: #71b6f6;
  background: linear-gradient(120deg, #ff4d4d, #ffcf00 65%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: heroTitleFlow 6s ease-in-out infinite;
  letter-spacing: 2px;
}

@keyframes heroTitleFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 400;
  color: #f1f1f1;
}

.hero .tagline {
  margin: 6px 0 0;
  font-size: 18px;
  color: #e8e8e8;
  letter-spacing: 0.2px;
}

/* Buttons */
.btn-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 12px;
}

.btn {
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 1px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.2s ease;
  color: #111;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.3); filter: brightness(1.03); }
.btn.red { background: linear-gradient(135deg, #ff4d4d, #ff8a8a); color: #180000; }
.btn.green { background: linear-gradient(135deg, #1ec77c, #66e0a3); color: #041f11; }
.btn.blue { background: linear-gradient(135deg, #3d8bff, #66b3ff); color: #f7fbff; }

/* Support + footer with animated border */
.footer-frame {
  position: relative;
  padding: 20px;
  margin: 64px 4vw 56px;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  background: #f4f6fb;
}

.footer-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(120deg, #ff5b2e, #ffcf00, #6ec8ff, #c75bff, #ff5b2e);
  background-size: 300% 300%;
  animation: borderFlow 10s linear infinite;
  filter: drop-shadow(0 12px 26px rgba(0,0,0,0.28));
  z-index: 0;
}

.footer-frame::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 14px;
  background: var(--bg-dark);
  z-index: 0;
}

@keyframes borderFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.support-footer {
  position: relative;
  z-index: 1;
  color: var(--text-light);
  padding: 42px 7vw 34px;
  display: grid;
  gap: 20px;
  text-align: center;
}

.support-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.support-row .label { font-size: 18px; font-weight: 600; color: #f5f5f5; }

.support-btn {
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  color: #111;
  background: linear-gradient(120deg, #ff5b2e, #ffcf00, #6ec8ff, #c75bff, #ff5b2e);
  background-size: 220% 220%;
  animation: pulseFlow 6s ease-in-out infinite;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.support-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0,0,0,0.38); }

@keyframes pulseFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

footer {
  color: #c7c7c7;
  font-size: 14px;
}

.footer-nav {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  font-weight: 600;
  margin-bottom: 10px;
}

.footer-nav a { color: #e6e6e6; text-decoration: none; }
.footer-nav a:hover { opacity: 0.9; }

/* Photo Album Styles */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.album-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* 流彩边框设置 - 黄红黄 */
  background: linear-gradient(120deg, #ffcf00, #ff2a2a, #ffcf00);
  background-size: 300% 300%;
  animation: borderFlow 10s linear infinite;
  padding: 3px; /* 边框宽度 */
}

.album-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}

.album-link {
  display: flex;
  width: 100%;
  height: 100%;
  background-color: #fff; /* 内部背景色 */
  background-size: contain; /* 保持图片比例 */
  background-repeat: no-repeat;
  background-position: center;
  text-decoration: none;
  align-items: flex-end;
  border-radius: 9px; /* 适配外层圆角 */
  overflow: hidden;
}

.album-info {
  width: 100%;
  padding: 12px 16px;
  /* 半透明背景确保文字清晰，且不完全遮挡底部图片 */
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  color: #222;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.album-info h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  text-shadow: none;
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .hero h1 { font-size: 48px; }
  .hero h2 { font-size: 26px; }
  .top-nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .hero { padding: 80px 0 60px; }
  .hero h1 { font-size: 42px; }
  .hero h2 { font-size: 22px; }
  .top-wrap { padding: 0 4vw; }
  .footer-frame { margin: 40px 3vw 36px; }
}

/* 自动化相册瀑布流样式 */
.gamou-photo-grid {
  column-count: 3;
  column-gap: 20px;
}

@media (max-width: 900px) {
  .gamou-photo-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .gamou-photo-grid {
    column-count: 1;
  }
}

.photo-item {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.photo-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.15);
}

.photo-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Site Notice Popup */
.site-notice-popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 300px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 9999;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  font-size: 14px;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.site-notice-popup.show {
  transform: translateY(0);
}

.notice-header {
  background: linear-gradient(135deg, #ff5b2e, #ffcf00);
  color: #fff;
  padding: 10px 16px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notice-close {
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  opacity: 0.8;
}

.notice-close:hover { opacity: 1; }

.notice-content {
  padding: 16px;
  color: #333;
}

.notice-content h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.notice-content p {
  margin: 0;
  line-height: 1.5;
}
