/* 首页样式       */
:root {
    --primary-color: #fff;
    --secondary-color: #333;
    --accent-color: #00bcd4;
    --gold-color: #FFBA51 ;
    --overlay-color: rgba(255, 255, 255, 0.9);
    --sidebar-bg: rgba(255, 255, 255, 0.9);
    --content-panel-bg: rgba(255, 255, 255, 0.95);
    --dropdown-bg: rgba(255, 255, 255, 0.5);

}

/* 引入 Inter-Regular（400 字重） */
@font-face {
    font-family: 'EnRegular';
    font-style: normal;
    font-weight: 400; /* Regular 对应 400 */
    src: url('../fonts/Inter/Inter-Regular.woff2') format('woff2');
     font-display: swap; /* 使用交换策略避免阻塞渲染 */
  }
  
  /* 引入 Inter-Extra Light（200 字重） */
  @font-face {
    font-family: 'EnLight';
    font-style: normal;
    font-weight: 200; 
    /* 路径替换为你的 Extra Light 字重文件实际位置 */
    src: url('../fonts/Inter/Inter-ExtraLight.woff2') format('woff2'); /* 假设文件名 */
     font-display: swap; /* 使用交换策略避免阻塞渲染 */
  }

/* 引入 Noto Sans SC 字体（中文）- 常规字重（400） */
@font-face {
    font-family: 'ZhRegular';
    font-style: normal;
    font-weight: 400; /* 对应 Regular */
    /* 路径指向 Noto Sans SC 常规字重文件 */
    src: url('../fonts/NotoSansSC/NotoSansSC-Regular.otf') format('opentype');
     font-display: swap; /* 使用交换策略避免阻塞渲染 */
  }
  
  /* 可选：引入 Noto Sans SC 其他字重（如粗体700） */
  @font-face {
    font-family: 'EnThin';
    font-style: normal;
    font-weight: 100; /* 对应 Bold */
    src: url('../fonts/NotoSansSC/NotoSansSC-Thin.otf') format('opentype');
     font-display: swap; /* 使用交换策略避免阻塞渲染 */
  }
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
   font-family: 'EnRegular', 'ZhRegular', sans-serif;
     /* font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; */
    font-weight: 400; /* 常规regular字重 图片上细体是200*/
}
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    transition: opacity 0.6s ease-in-out 0.6s;
    height: 5rem;
}

.logo {
    font-size: 1.5rem;
     /* font-weight: 600; */
    color: white;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-links {
    width: 100%;
  display: flex;
  justify-content: space-around;
  gap: 3rem;
}

.nav-item {
      position: relative;
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    /* font-weight: 500; */
      font-family: 'EnRegular';
    position: relative;
    padding: 0.5rem ;
    display: block;
    transition: color 0.3s ease;
    text-align: center;
    /* min-width: 140px; */
     white-space: nowrap;
}

.nav-link:hover {
    color: var(--gold-color);

}
.actives {
    color: var(--gold-color);
}
/* Remove the underline effect */
.nav-link::after {
    display: none;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    /* background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.8)); */
    /* backdrop-filter: blur(15px); */
    min-width: 140px;
    width: 100%;
    max-width: 150px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    animation: dropdownRollDown 0.5s ease forwards;
}

/* Keyframes for dropdown background roll down effect */
@keyframes dropdownRollDown {
    0% {
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

.nav-dropdown-item {
    padding: 1.1rem 1rem;
    text-decoration: none;
    display: block;
    color: var(--secondary-color);
    text-align: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(2px);
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.27) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.4) 100%);
    transition: opacity 0.3s ease;
    color: white;
    font-size: 0.8rem;
}
.nav-dropdown-item:nth-child(1){
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 55%,
        rgba(255, 255, 255, 0.5) 100%);
}
.nav-dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent); */
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.nav-dropdown-item:hover::before {
    /* transform: translateX(100%); */
  
}

/* Trigger animation for each item with different delays */
.nav-item:hover .nav-dropdown-item:nth-child(1) {
    animation: dropdownFadeIn 0.5s ease forwards 0.1s;
}

.nav-item:hover .nav-dropdown-item:nth-child(2) {
    animation: dropdownFadeIn 0.5s ease forwards 0.2s;
}

.nav-item:hover .nav-dropdown-item:nth-child(3) {
    animation: dropdownFadeIn 0.5s ease forwards 0.3s;
}

.nav-item:hover .nav-dropdown-item:nth-child(4) {
    animation: dropdownFadeIn 0.5s ease forwards 0.4s;
}

.nav-item:hover .nav-dropdown-item:nth-child(5) {
    animation: dropdownFadeIn 0.5s ease forwards 0.5s;
}

/* Keyframes for waterfall effect */
@keyframes dropdownFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 导航栏下拉框 */
.nav-dropdown-item:hover {
    /* background-color: rgba(255, 255, 255, 0.3); */
    color: var(--gold-color);
    padding-left: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    transition: all .2s ease-in-out;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.collection-btn {
    background: none;
    border: none;
    color: white;
    font-size: 0.9rem;
    /* font-weight: 500; */
    cursor: pointer;
    transition: opacity 0.3s ease;
    letter-spacing: 0.05em;
       /* 添加SVG图标样式 */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 8px;
}
.menu-toggle svg {
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
}

.collection-btn:hover {
    opacity: 0.8;
}

.search-btn, .lang-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.search-btn:hover, .lang-toggle:hover {
    transform: scale(1.1);
}
/* 遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-color: rgba(0, 0, 0, 0.5); */
    z-index: 199;
    opacity: 0;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    visibility: hidden;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    z-index: 200;
    transition: left 0.5s ease;
    padding: 2rem;
    box-sizing: border-box;
    color: var(--secondary-color);
    display: flex;
    flex-direction: column;
    opacity: 0.8;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    margin: 2rem 0;
    padding-bottom: 1rem;
   text-align: left;
  /* font-weight: bolder; */
}
.sidebar-header img{
    width: 3rem !important;
    height: 3rem !important;
  }
.sidebar-title {
    font-size: 1.5rem;
     /* font-weight: 600; */
    color: var(--secondary-color);
    text-align: center;
   /* font-weight: bolder; */
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
     /* 隐藏滚动条但保持滚动功能 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}
.sidebar-menu ::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.sidebar-menu-item {
    margin-bottom: 1rem;
    /* padding-bottom: 0.5rem; */
    /* border-bottom: 1px solid rgba(0, 0, 0, 0.1); */
}

.sidebar-menu-item a {
    color: var(--secondary-color);
    text-decoration: none;
    /* font-weight: 500; */
    display: block;
    width: 100%;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    font-size: 0.8rem;
}

.sidebar-menu-item a:hover {
    color: var(--gold-color);
}

.sidebar-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    font-size: 0.9rem;
   color: #9c9c9c;
}

.sidebar-footer-title {
    /* font-weight: 500; */
    margin-bottom: 0.5rem;
    /* color: var(--secondary-color); */
}

.sidebar-footer-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.sidebar-footer-link {
    color: var(--secondary-color);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.sidebar-footer-link:hover {
    color: var(--gold-color);
}

/* Content Panel Overlay */
.content-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 149;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.content-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Content Panel Styles */
.content-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 150;
    transition: transform 0.5s ease;
    padding: 2rem;
    box-sizing: border-box;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: translateX(100%);
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.content-panel::-webkit-scrollbar {
    display: none;
}

.content-panel.active {
    transform: translateX(0);
}



.content-panel-header {
    margin-bottom: 1.5rem;
}

.content-panel-title {
    font-size: 1.2rem;
     /* font-weight: 600; */
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.content-panel-search {
    position: relative;
    margin-bottom: 1rem;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top:0.7rem;
    color: #333;
    cursor: pointer;
}

.content-panel-search-input {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--secondary-color);
    border-radius: 2rem;
}

.content-panel-search-input::placeholder {
    color: #999;
}

.content-panel-search-input:focus {
    outline: none;
    /* border-color: var(--gold-color); */
    /* box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2); */
}

.content-item {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 1.5rem;
}

.content-item:last-child {
    border-bottom: none;
}

.content-item-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.content-item-title {
    font-size: 1rem;
    /* font-weight: 500; */
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.content-item-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.search-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background-color: var(--content-panel-bg);
    backdrop-filter: blur(10px);
    z-index: 300;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.5s ease;
}

.search-overlay.active {
    transform: translateX(0);
}

.search-container {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: none;
    border-bottom: 1px solid #ddd;
    background-color: transparent;
    color: var(--secondary-color);
}

.search-input::placeholder {
    color: #999;
}

.search-input:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
}

.search-close {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
}

.search-results {
    flex: 1;
    overflow-y: auto;
}

.search-result-item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    /* font-weight: 500; */
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.search-result-description {
    font-size: 0.9rem;
    color: #666;
}

.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--dropdown-bg);
    backdrop-filter: blur(10px);
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.lang-dropdown-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown-item {
    padding: 0.8rem 1rem;
    text-decoration: none;
    display: block;
    color: var(--secondary-color);
    /* font-weight: 500; */
    transition: background-color 0.3s ease;
}

.lang-dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
.nav-lang{
  color: white;
}


/* Responsive styles */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content h2 {
        font-size: 1rem;
    }
    
    .sidebar {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content h2 {
        font-size: 0.8rem;
    }
    
    .sidebar {
        width: 200px;
    }
}

.content-panel-collection {
    height: calc(100vh - 150px); /* 调整为 150px 以增加预留空间 */
    overflow-y: auto;
    -ms-overflow-style: none; /* IE 和 Edge */
    scrollbar-width: none; /* Firefox */
}

.content-panel-collection::-webkit-scrollbar {
    display: none; /* Chrome, Safari 和 Opera */
}
/* 二维码悬浮样式 - 图标正上方定位 */
.qr-code-overlay {
    position: fixed;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    pointer-events: none;
}

.qr-code-overlay img {
    width: 150px;
    height: 150px;
    display: block;
}

.qr-code-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 确保社交链接有相对定位 */
.social-link {
    position: relative;
    display: inline-block;
}