:root {
  --header-height: 75px;
  --mobile-header-height: 75px;
  --content-padding: 15px;
  --bg-dark: #151515;
  --bg-gradient: linear-gradient(to bottom, #000000, #383838);
  --text-light: #eeeeee;
  --text-gray: #888;
  --text-dark: #151515;
  --accent-color: #ee0000;
  --border-color: #404040;
}

/* 基础样式 */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  color: var(--text-light);
}

/* 布局容器 */
.container {
  width: 100%;
  margin: 0 auto;
}
@media (min-width: 1920px) {
  .container {
    max-width: 1600px;
  }
}

/* 导航栏 */
.navbar-custom {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

#menu {
  display: flex;
  align-items: center;
  height: 100%;
}

#logo {
  width: 210px;
  height: 64px;
  background: url('/bnlogoR.png') no-repeat center / contain;
  margin-right: 40px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 100%;
  font-size: 18px;
  font-weight: bold;
  color: var(--text-light);
  text-decoration: none;
  border-top: 3px solid transparent;
  transition: border-color 0.3s;
}
.menu-item:hover {
  border-top-color: var(--accent-color);
}

/* 主要内容区 */
main {
  background: var(--bg-gradient);
  padding: var(--content-padding) 0;
  min-height: calc(100vh - 230px);
  padding-top: calc(var(--header-height) + var(--content-padding));
  color: var(--text-light);
}

/* 页脚 */
.footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 30px 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: calc(100% - 64px);
  margin: 0 auto;
  max-width: 1600px;
}

.footer-logo {
  width: 160px;
  height: 48px;
  background: url('/bnlogoR.png') no-repeat center / contain;
  margin-left: 32px;
}

.footer-info {
  text-align: right;
  font-size: 14px;
}
.footer-info a {
  color: var(--text-light);
  text-decoration: none;
  margin-left: 15px;
  transition: color 0.3s;
}
.footer-info a:hover {
  color: var(--accent-color);
}

.copyright {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-gray);
}
.copyright a {
  color: var(--text-gray);
}

/* 移动端样式 */
@media (max-width: 768px) {
  .navbar-custom {
    padding: 0 20px;
    height: var(--mobile-header-height);
  }
  
  #menu {
    display: none;
    position: absolute;
    top: var(--mobile-header-height);
    left: 0;
    right: 0;
    background-color: var(--bg-dark);
    width: 100%;
    padding: 10px 0;
    flex-direction: column;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
  }
  
  #logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 50px;
    margin-right: 0;
  }
  
  .menu-toggle {
    display: block;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: white;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }
  
  .menu-item {
    width: 100%;
    padding: 15px 20px;
    border-top: none;
    border-left: 3px solid transparent;
    height: auto;
    box-sizing: border-box;
  }
  .menu-item:hover {
    border-top: none;
    border-left-color: var(--accent-color);
  }
  
  main {
    padding-top: calc(var(--mobile-header-height) + 10px);
  }
  
  .footer-container {
    flex-direction: column;
    text-align: center;
    width: calc(100% - 40px);
  }
  
  .footer-logo {
    margin: 0 auto 20px;
  }
  
  .footer-info {
    text-align: center;
  }
  .footer-info a {
    display: block;
    margin: 10px 0;
  }
}

/* 工具类 */
.hidden {
  display: none !important;
}

/* 瀑布流样式 */
    .masonry-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
        padding: 20px 0;
    }

    .template-item {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        overflow: hidden;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .template-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .template-img-container {
        position: relative;
        padding-top: 75%; /* 4:3比例 */
        overflow: hidden;
        background: linear-gradient(135deg, #222, #444);
    }

    .template-img-container img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: opacity 0.5s ease;
    }

    /* 懒加载图片样式 */
    .lazy-load {
        opacity: 0;
        filter: blur(5px);
        z-index:1;
    }

    .lazy-load.loaded {
        opacity: 1;
        filter: blur(0);
    }

    /* 链接图标效果 */
    .template-link {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
        width: 50px;
        height: 50px;
        background: rgba(238, 0, 0, 0.8);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        z-index:10;
    }

    .template-link,
.template-link svg {
    pointer-events: auto; /* 确保 SVG 和链接都可点击 */
}

    .template-img-container:hover .template-link {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    .link-icon {
        width: 24px;
        height: 24px;
        fill: white;
    }

    /* 文字描述 */
    .template-title {
        margin: 15px 15px 5px 7px;
        color: #fff;
        font-size: 1.1rem;
    }

    .template-title a{
       
        color: #fff;
       text-decoration: none;
    }

     .template-title a:hover{
       
        color: #ee0000;
       
    }

    .template-desc {
        margin: 0 15px 15px;
        color: #aaa;
        font-size: 0.9rem;
    }

    /* 加载动画 */
    .loader {
        display: none;
        text-align: center;
        padding: 30px;
    }

    .spinner {
        width: 40px;
        height: 40px;
        margin: 0 auto;
        border: 4px solid rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        border-top-color: #ee0000;
        animation: spin 1s ease-in-out infinite;
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }

     /* 新增视频相关样式 */
    .template-video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 1;
    }
    
    
    
       
    .template-media {
        transition: opacity 0.3s ease;
        z-index: 2;
    }

    svg {
    pointer-events: auto; /* 确保 SVG 可点击 */
}
   
   
/* 自定义样式，与你的红色主题匹配 */
.pagination-container {
    margin-top: 40px;
    padding-bottom: 30px;
}

.page-item.active .page-link {
    background-color: #EE0000;
    border-color: #EE0000;
}

.page-link {
    color: #333;
}

.page-link:hover {
    color: #EE0000;
}

/* 黑暗模式适配 */
.page-link {
    background-color: #1a1a1a;
    color: #fff;
    border-color: #333;
}

.page-item.disabled .page-link {
    background-color: #1a1a1a;
    color: #6c757d;
}

.page-link:hover {
    background-color: #333;
    color: #fff;
}
</style>