/* =========================================
   1. 基础重置与全局变量
   ========================================= */
:root {
  --bg-color: #ffffff;
  --bg-card: #f3f3f3;
  --bg-card2: #fafafa;
  --text-primary: #000000;
  --text-secondary: #4b5563;
  --text-muted: #cacaca;
  --text-one: #ffffff;
  --text-two: #a0a0a0;
  --nav-bg: rgba(255, 255, 255, 0.60);
  --gradient-primary: linear-gradient(90deg, #006205 0%, #90af04 100%);
  --transition-speed: 0.3s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Manrope', sans-serif; background-color: linear-gradient(180deg, var(--bg-color, #FFF) 0%, var(--bg-card, #F3F3F3) 100%); color: var(--text-primary); }

/* 默认在桌面端隐藏移动端按钮 */
.btn-menu-mobile, .btn-download-tablet { display: none; }

/* =========================================
   2. 导航栏 (Navbar)
   ========================================= */
.navbar { position: fixed; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 12px 80px; background: var(--nav-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: all var(--transition-speed) ease; }
.nav-logo { display: flex; align-items: center; max-width: 40px; }
.nav-logo img { max-width: 40px; aspect-ratio: 1 / 1; object-fit: contain; }
.nav-menu { display: inline-flex; align-items: center; background: var(--nav-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 24px; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05) inset; border: 1px solid rgba(255, 255, 255, 0.3); }
.nav-link { padding: 10px 24px; color: var(--text-secondary); font-size: 15px; font-weight: 500; text-decoration: none; border-radius: 999px; transition: all var(--transition-speed) ease; }
.nav-link:hover { color: var(--text-primary); }
.nav-link.active { background: linear-gradient(180deg, #f8ffee 0%, #ffffff 100%); color: var(--text-primary); border-radius: 42px; box-shadow: -2px -2px 2px 0 rgba(168, 196, 238, 0.25) inset; }
.nav-actions { display: flex; justify-content: flex-end; width: 200px; }
.btn-download { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 20px; background-color: var(--text-primary); color: var(--text-one); font-size: 15px; font-weight: 500; text-decoration: none; border-radius: 42px; transition: background-color var(--transition-speed) ease; }
.btn-download:hover { background-color: #333333; }

/* =========================================
   3. Playground 瀑布流布局
   ========================================= */
.playground-section {
  padding: 140px 80px 80px 80px; 
  background-color: transparent;
  width: 100%;
}

.masonry-grid {
  column-count: 3; /* 🌟 桌面端：按照 Figma 设定为 3 列 */
  column-gap: 20px; 
  width: 100%;
}

.masonry-item {
  break-inside: avoid; 
  margin-bottom: 20px; 
  border-radius: 20px;
  overflow: hidden;
  background-color: var(--bg-card); 
  cursor: zoom-in; 
}

.masonry-item img {
  display: block;
  width: 100%;
  height: auto; 
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); 
}

.masonry-item:hover img {
  transform: scale(1.03);
}

/* =========================================
   8. 页脚 (Footer Section)
   ========================================= */
.footer-section { display: flex; flex-direction: column; gap: 86px; background-color: var(--text-primary); color: var(--bg-color); padding: 120px 80px 40px 80px; border-radius: 40px 40px 0 0; font-family: 'Geist', sans-serif; }
.footer-top { display: flex; width: 100%; justify-content: space-between; align-items: stretch; }
.footer-brand { display: flex; flex-direction: column; justify-content: space-between; }
.footer-logo { max-width: 96px; max-height: 89px; object-fit: contain; }
.footer-slogan { font-size: 24px; font-weight: 400; color: var(--bg-color); text-transform: capitalize; }
.footer-links-container { display: flex; min-width: 363px; justify-content: space-between; align-items: flex-start; }
.footer-nav-col { display: flex; width: 168px; flex-direction: column; align-items: flex-start; gap: 31px; flex-shrink: 0; }
.footer-col-title { color: var(--bg-color); font-size: 24px; font-weight: 500; text-transform: capitalize; }
.footer-link { font-size: 18px; font-weight: 400; color: #E6E6E6; text-decoration: none; transition: color var(--transition-speed) ease; }
.footer-link:hover { color: var(--bg-color); }
.footer-bottom { display: flex; align-items: flex-start; }
.copyright-text { font-size: 18px; color: var(--text-muted); font-weight: 400; }
.legal-link { font-size: 18px; color: #e4f2ff; text-decoration: none; font-weight: 400; transition: opacity var(--transition-speed) ease; }
.legal-link:hover { opacity: 0.7; }

/* =========================================
   9. 响应式适配 (Tablet & Mobile)
   ========================================= */

/* -----------------------------------------
   [ Tablet 端适配 ] (屏幕宽度 <= 1024px)
   ----------------------------------------- */
@media screen and (max-width: 1024px) {
  /* Navbar */
  .navbar { padding: 12px 40px; }
  .nav-logo { flex: 1; display: flex; align-items: center; max-width: none; }
  .nav-logo img { max-width: 40px; aspect-ratio: 1 / 1; object-fit: contain; }
  .nav-actions { flex: 1; display: flex; justify-content: flex-end; width: auto; gap: 12px; }
  .btn-download { display: none; } 
  .btn-download-tablet {
    display: flex; width: 44px; height: 44px; padding: 0;
    justify-content: center; align-items: center;
    background-color: var(--text-primary); color: var(--text-one); border-radius: 50%; 
    transition: background-color var(--transition-speed) ease;
  }
  .btn-download-tablet:hover { background-color: #333333; }

  /* 🌟 Playground 瀑布流：降为 2 列 */
  .playground-section { padding: 120px 40px 80px 40px; }
  .masonry-grid {
    column-count: 2;
    column-gap: 20px;
  }
  
  /* Footer */
  .footer-section { padding: 80px 40px 40px 40px; gap: 60px; }
  .footer-links-container { min-width: 300px; gap: 40px; }
}

/* -----------------------------------------
   [ Mobile 手机端适配 ] (屏幕宽度 <= 768px)
   ----------------------------------------- */
@media screen and (max-width: 768px) {
  /* =========================================
     1. Navbar & 下拉菜单 (完全锁定，与主页一致)
     ========================================= */
  .navbar { 
    padding: 12px 20px; 
    flex-wrap: wrap; 
    background: rgba(255, 255, 255, 0.75); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  .nav-logo { order: 1; }
  .nav-actions { order: 2; width: auto; gap: 12px; }
  
  .btn-menu-mobile {
    display: flex; width: 44px; height: 44px;
    justify-content: center; align-items: center;
    background-color: var(--text-primary); color: var(--text-one);
    border-radius: 50%; border: none; cursor: pointer;
    transition: background-color var(--transition-speed) ease;
  }

  .nav-menu {
    order: 3; width: 100%; flex-direction: column; align-items: flex-start;
    position: static; background: transparent; backdrop-filter: none;
    -webkit-backdrop-filter: none; border: none; box-shadow: none; border-radius: 0;
    max-height: 0; opacity: 0; overflow: hidden; padding: 0 10px; margin-top: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .nav-menu.active { max-height: 400px; opacity: 1; padding: 20px 10px 10px 10px; margin-top: 10px; border-top: 1px solid rgba(0, 0, 0, 0.05); }
  .nav-link { font-size: 24px; padding: 16px 0; font-weight: 500; width: 100%; }
  .nav-link.active { background: transparent; box-shadow: none; color: var(--text-primary); }

  /* 🌟 Playground 瀑布流：保持 2 列，缩小间距与圆角 */
  .playground-section { padding: 100px 16px 60px 16px; }
  .masonry-grid {
    column-count: 2;
    column-gap: 12px; 
  }
  .masonry-item {
    margin-bottom: 12px;
    border-radius: 12px;
  }

  /* Footer */
  .footer-section { padding: 80px 20px 40px 20px; border-radius: 20px 20px 0 0; gap: 40px; }
  .footer-logo { max-width: 60px; height: auto; padding-bottom: 20px; object-fit: cover;}
  .footer-slogan { font-size: 20px; font-weight: 400; }
  .footer-link { font-size: 14px; }
  .footer-col-title { font-size: 20px; }
  .footer-top { flex-direction: column; gap: 40px; }
  .footer-links-container { flex-direction: column; gap: 40px; }
  .footer-nav-col { gap: 20px; width: 100%; min-height: auto; } 
  .footer-bottom { flex-direction: column; gap: 10px; }
  .copyright-text, .legal-link { font-size: 14px; }
}