/* ===== VARIABLES ===== */
:root {
  --bg: #f5f5f7;
  --bg-dark: #e8e8ed;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #f5a623;
  --accent-light: #f5a62320;
  --glass: rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.5);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --font-en: 'Special Elite', cursive;
  --font-zh: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ===== RESET ===== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-zh);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== GLASS MORPHISM ===== */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== NAV ===== */
.nav-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 12px 0;
  transition: var(--transition);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.nav-logo {
  font-family: var(--font-en);
  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: 1px;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: .9rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-admin { font-size: 1.1rem !important; opacity: .4; }
.nav-admin:hover { opacity: 1; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: var(--transition); }

/* ===== HERO ===== */
.hero {
  height: 100vh; min-height: 600px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  text-align: center;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .3;
  animation: float 8s ease-in-out infinite;
}
.orb-1 { width: 400px; height: 400px; background: var(--accent); top: 10%; left: 10%; }
.orb-2 { width: 300px; height: 300px; background: #a0d2db; top: 50%; right: 10%; animation-delay: 2s; }
.orb-3 { width: 250px; height: 250px; background: #d4a5f5; bottom: 10%; left: 40%; animation-delay: 4s; }
@keyframes float {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(30px,-20px); }
}
.hero-content { position: relative; z-index: 1; }
.hero-title {
  font-family: var(--font-en);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  letter-spacing: 4px;
  margin-bottom: 16px;
}
.hero-subtitle {
  font-size: clamp(.9rem, 2vw, 1.1rem);
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 36px;
  letter-spacing: 2px;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block; padding: 12px 32px;
  border-radius: 50px; font-size: .9rem;
  font-weight: 500; transition: var(--transition);
  cursor: pointer; border: none;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 16px rgba(245,166,35,.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245,166,35,.4); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--text-secondary);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: .5;
}
.scroll-mouse {
  width: 24px; height: 38px;
  border: 2px solid var(--text-secondary);
  border-radius: 12px; position: relative;
}
.scroll-dot {
  width: 4px; height: 8px; background: var(--accent);
  border-radius: 2px; position: absolute;
  top: 6px; left: 50%; transform: translateX(-50%);
  animation: scrollDot 2s infinite;
}
@keyframes scrollDot {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(16px); }
}
.scroll-indicator span { font-size: .7rem; color: var(--text-secondary); letter-spacing: 2px; }

/* ===== SECTION TITLES ===== */
.section-title {
  font-family: var(--font-en);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: .95rem;
  margin-bottom: 32px;
}

/* ===== SECTIONS GRID ===== */
.sections-grid { padding: 100px 0 80px; }
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.card-img { position: relative; overflow: hidden; height: 220px; }
.card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.card:hover .card-img img { transform: scale(1.08); }
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,.4));
}
.card-body { padding: 20px; }
.card-body h3 {
  font-family: var(--font-en);
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.card-desc { font-size: .85rem; color: var(--text-secondary); }

/* ===== FEATURED ===== */
.featured { padding: 60px 0 100px; }
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.feat-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/5;
}
.feat-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.feat-item:hover img { transform: scale(1.06); }

/* ===== GUESTBOOK PREVIEW ===== */
.guestbook-preview {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--accent-light), transparent);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 20px 0;
  font-size: .8rem;
  color: var(--text-secondary);
}

/* ===== HOVER LIFT ===== */
.hover-lift { transition: transform var(--transition), box-shadow var(--transition); }
.hover-lift:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,.1); }

/* ===== ANIMATION CLASSES ===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PAGES COMMON ===== */
.page-header {
  padding: 140px 0 60px;
  text-align: center;
}
.page-header h1 {
  font-family: var(--font-en);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.page-header p {
  color: var(--text-secondary);
  font-size: .95rem;
}
.page-content { padding: 0 0 80px; }

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.05); }

/* Article List */
.article-list { display: flex; flex-direction: column; gap: 20px; margin-top: 40px; }
.article-card {
  display: flex; gap: 20px;
  padding: 20px;
  border-radius: var(--radius);
  transition: var(--transition);
}
.article-card:hover { background: rgba(255,255,255,.6); }
.article-thumb { width: 180px; height: 120px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-info { flex: 1; }
.article-info h3 { font-size: 1.1rem; margin-bottom: 6px; }
.article-info p { font-size: .85rem; color: var(--text-secondary); }
.article-info .tag {
  display: inline-block; padding: 2px 10px;
  background: var(--accent-light); color: var(--accent);
  border-radius: 20px; font-size: .75rem; margin-top: 8px;
}

/* Tabs */
.tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 24px;
  border: 1.5px solid var(--bg-dark);
  border-radius: 50px;
  background: transparent;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-zh);
}
.tab-btn.active, .tab-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== GUESTBOOK ===== */
.guestbook-form {
  max-width: 600px; margin: 0 auto 40px;
  padding: 32px;
  border-radius: var(--radius);
}
.guestbook-form input, .guestbook-form textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--bg-dark);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.5);
  font-family: var(--font-zh);
  font-size: .9rem;
  margin-bottom: 12px;
  transition: var(--transition);
  outline: none;
}
.guestbook-form input:focus, .guestbook-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.guestbook-form textarea { height: 120px; resize: vertical; }
.guestbook-messages { max-width: 600px; margin: 0 auto; }
.msg-item {
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.msg-item .msg-name { font-weight: 500; font-size: .95rem; }
.msg-item .msg-time { font-size: .75rem; color: var(--text-secondary); margin-left: 8px; }
.msg-item .msg-text { margin-top: 6px; font-size: .9rem; color: var(--text-secondary); }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: start; }
.about-avatar {
  width: 200px; height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-bio h3 { font-family: var(--font-en); font-size: 1.4rem; margin-bottom: 12px; }
.about-bio p { color: var(--text-secondary); font-size: .9rem; margin-bottom: 16px; }
.social-links { display: flex; gap: 12px; flex-wrap: wrap; }
.social-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: .8rem;
  transition: var(--transition);
}
.social-link:hover { background: var(--accent); color: #fff; }

/* ===== ADMIN ===== */
.admin-login { max-width: 400px; margin: 0 auto; text-align: center; }
.admin-login input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--bg-dark);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.5);
  font-size: .9rem; margin-bottom: 12px;
  outline: none;
}
.admin-panel { display: none; }
.admin-section { margin-bottom: 40px; }
.admin-section h3 { font-family: var(--font-en); font-size: 1.2rem; margin-bottom: 16px; border-bottom: 2px solid var(--accent); padding-bottom: 8px; display: inline-block; }
.admin-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.5);
  margin-bottom: 8px;
}
.admin-item .btn { padding: 6px 16px; font-size: .8rem; }
.btn-danger { background: #ff3b30; color: #fff; }
.btn-sm { padding: 6px 16px !important; font-size: .8rem !important; }

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.9);
  display: none; align-items: center; justify-content: center;
  cursor: zoom-out;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 0; right: -100%;
    width: 280px; height: 100vh;
    flex-direction: column;
    background: var(--glass);
    backdrop-filter: blur(20px);
    padding: 80px 32px 32px;
    gap: 20px;
    transition: var(--transition);
    box-shadow: -10px 0 40px rgba(0,0,0,.1);
  }
  .nav-links.open { right: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; text-align: center; }
  .article-card { flex-direction: column; }
  .article-thumb { width: 100%; height: 180px; }
  .hero-title { font-size: 2.5rem; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}
