@font-face {
    font-family: 'HajimiFont';
    src: url('assets/alimama/AlimamaFangYuanTiVF-Thin.woff2') format('woff2'),
         url('assets/alimama/AlimamaFangYuanTiVF-Thin.woff') format('woff'),
         url('assets/alimama/AlimamaFangYuanTiVF-Thin.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ZiYouFangHuaTi';
    src: url('/assets/ZiYouFangHuaTi.ttf') format('truetype');
}

body {
    margin: 0;
    padding: 73px 0 0 0; /* 顶部增加 padding 以防止内容被 fixed header 遮挡 */
    font-family: 'HajimiFont', 'ZiYouFangHuaTi', sans-serif;
    background-color: #ffffff; /* 背景改为白色 */
    color: #333333; /* 全局文字改为深色 */
    font-weight: normal; /* 确保全局字体不加粗 */
    box-sizing: border-box; /* 全局盒模型 */
}

*, *::before, *::after {
    box-sizing: inherit; /* 继承盒模型 */
}

/* =========================================
   Loading Screen Styles
   ========================================= */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999; /* Ensure it's on top of everything */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Prevent clicks when hidden */
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 新增：加载视频样式 */
.loader-video {
    width: 200px; /* 根据实际视频比例调整，这里设为 200px 宽度 */
    height: auto;
    margin-bottom: 20px;
}

.loader-text {
    color: #2C97DD;
    font-size: 18px;
    letter-spacing: 1px;
    margin-top: 10px;
}

.navbar {
    position: fixed; /* 固定在顶部 */
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px; /* 减少垂直内边距 */
    background-image: url('images/bg/title.png');
    background-size: 100% 100%; /* 强制填满 */
    background-position: center;
    background-repeat: no-repeat;
    width: 100%; /* 宽度占满 */
    height: 73px; /* 高度固定为 73px */
    box-shadow: 0 2px 5px rgba(0,0,0,0.5); /* 加深阴影以适应深色背景 */
    /* position: relative;  Removed as we use fixed */
}

.logo-container {
    flex-shrink: 0;
}

.logo {
    width: auto;
    height: 61px; /* 固定高度 61px */
    transition: transform 0.3s ease;
    cursor: pointer;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-menu {
    /* 使用绝对定位实现完美居中 */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    height: 80%; /* 占据导航栏高度的 80% */
    align-items: center; /* 垂直居中 */
}

.nav-menu ul[role="menubar"] {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.menu-item {
    position: relative;
    margin: 0 30px; /* 菜单项间距 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 导航链接样式 */
.nav-link {
    text-decoration: none;
    color: #ffffff; /* 白色字体 */
    font-family: 'ZiYouFangHuaTi', sans-serif;
    font-size: 36px; /* 字体大小改为 36px */
    font-weight: normal; /* 确保不加粗 */
    padding: 8px 28px; /* 调整内边距以匹配参考样式 */
    display: block;
    position: relative; /* 用于定位 */
    /* 移除 text-shadow 以匹配参考样式的简洁感 */
    /* text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); */
    
    /* 新增：参考实现的纯 CSS 边框和圆角效果 */
    border-radius: 999px;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.3s ease;
    
    /* 移除旧的 SVG 背景属性 */
    /* background-image, background-position, background-repeat, background-size 已不再需要用于默认状态 */
}

/* 悬停时的背景效果 - 修改为纯 CSS 实现 */
.nav-link:hover,
.menu-item:hover .nav-link,
.nav-link.active {
    color: #ffffff; /* 悬停时文字保持白色 */
    
    /* 新增：参考实现的悬停效果 */
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
    
    /* 移除旧的 SVG 背景图片 */
    background-image: none;
}

/* 下拉菜单样式 */
.dropdown-menu {
    /* 布局定位 */
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px); /* 初始上移位置，配合动画 */
    margin-top: 10px;
    
    /* 视觉样式 - 参考代码 */
    background-color: #2C97DD; /* 纯色背景 */
    border-radius: 8px;        /* 圆角 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* 阴影 */
    
    /* 尺寸与间距 */
    min-width: 150px;
    padding: 8px 0;
    z-index: 1000;
    list-style: none;
    
    /* 动画效果 - 替代 display: none */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    
    /* 移除旧的 SVG 背景 */
    background-image: none;
}

.dropdown-menu li {
    display: block;
    /* 胶囊按钮样式 */
    padding: 10px 20px;
    margin: 4px 8px;
    border-radius: 50px;
    border: 2px solid transparent;
    box-sizing: border-box;
    transition: all 0.2s ease;
    text-align: center; /* 确保文字在胶囊中居中 */
}

.dropdown-menu a {
    color: #fff; /* 白色文字 */
    text-decoration: none;
    display: block;
    font-size: 20px;
    font-weight: normal;
    background-color: transparent;
    padding: 0; /* Padding 已移至 li */
}

/* 悬停效果 - 作用于 li */
.dropdown-menu li:hover {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

/* 移除旧的链接悬停效果 */
.dropdown-menu a:hover {
    background-color: transparent;
    color: #fff;
    border-radius: 0;
}

/* 显示下拉菜单 - 使用动画属性 */
.menu-item.dropdown:hover .dropdown-menu,
.menu-item.dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* 汉堡菜单按钮样式 */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* 汉堡菜单激活状态（变为X） */
.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 响应式调整 - 移动端侧边栏 */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* 默认隐藏在右侧屏幕外 */
        width: 250px;
        height: 100vh;
        background-color: rgba(44, 151, 221, 0.95); /* 使用主题蓝色背景，略带透明 */
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px; /* 给顶部留出空间 */
        transition: right 0.3s ease;
        z-index: 1000;
        transform: none; /* 重置 desktop 的 transform */
        left: auto; /* 重置 desktop 的 left */
        align-items: flex-start; /* 左对齐内容 */
        overflow-y: auto; /* 允许纵向滚动，防止内容溢出 */
        box-sizing: border-box; /* 确保 padding 不增加宽度 */
    }

    .nav-menu.active {
        right: 0; /* 激活时滑入 */
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }

    .nav-menu ul[role="menubar"] {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    .menu-item {
        margin: 15px 0;
        width: 100%;
        justify-content: flex-start; /* 菜单项左对齐 */
        flex-direction: column; /* 垂直排列，确保子菜单在下方 */
        align-items: flex-start; /* 左对齐 */
    }

    .nav-link {
        font-size: 24px; /* 移动端字体稍小 */
        padding: 10px 15px; /* 增加左右内边距 */
        width: fit-content; /* 宽度自适应文字长度 */
        display: block;
    }

    /* 移动端下拉菜单处理 */
    .dropdown-menu {
        position: static; /* 在流中文档布局 */
        transform: none !important; /* 强制覆盖 desktop 的 transform，使用 !important 确保优先级 */
        background-color: transparent; /* 透明背景 */
        box-shadow: none;
        padding: 0 0 0 20px; /* 仅保留左侧缩进，初始无上下内边距 */
        opacity: 0;
        visibility: hidden;
        display: block; /* 始终为 block，通过 max-height 控制显示 */
        width: 100%;
        min-width: auto;
        margin: 0;
        max-height: 0; /* 初始高度为0 */
        overflow: hidden;
        transition: all 0.3s ease; /* 统一过渡效果 */
        border: none; /* 确保无边框 */
        left: auto !important; /* 重置 left */
    }

    /* 强制覆盖 desktop 的 hover/focus 效果，防止干扰移动端点击交互 */
    .menu-item.dropdown:hover .dropdown-menu,
    .menu-item.dropdown:focus-within .dropdown-menu {
        transform: none !important;
        position: static !important;
        /* 在移动端 hover 不应自动显示，除非有 active 类，但这里主要重置位置 */
    }

    .menu-item.dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 500px; /* 展开高度 */
        margin-top: 10px; /* 展开后增加一点顶部间距 */
        transform: none !important; /* 再次确保 */
    }
    
    /* 移动端下拉箭头指示 */
    .menu-item.dropdown .nav-link::after {
        content: '▼';
        font-size: 12px;
        margin-left: 10px;
        vertical-align: middle;
        transition: transform 0.3s ease;
        display: inline-block;
    }

    .menu-item.dropdown.active .nav-link::after {
        transform: rotate(180deg); /* 展开时旋转箭头 */
    }

    .dropdown-menu li:hover {
        border-color: #fff;
        background-color: rgba(255, 255, 255, 0.15);
        transform: none; /* 禁止移动 */
    }

    .dropdown-menu li {
        text-align: left;
        margin: 5px 0;
        padding: 5px 10px; /* 增加内边距，使椭圆框更好看 */
        border-radius: 50px; /* 保持椭圆形状 */
        border: 2px solid transparent; /* 预留边框位置 */
        transition: all 0.2s ease;
        display: block; /* 确保块级显示 */
        width: fit-content; /* 宽度适应内容，避免过长 */
    }
    
    .dropdown-menu a {
        font-size: 18px;
    }
}

/* =========================================
   提示文字样式
   ========================================= */
.notice-container {
    text-align: center;
    padding: 40px 20px 10px; /* 顶部留白，与 header 分开 */
    max-width: 1200px;
    margin: 0 auto;
}

.notice-text {
    font-size: 32px; /* 根据需求调整大小，使其显眼 */
    color: #333333;
    margin: 0;
    font-weight: normal;
    letter-spacing: 1px; /* 增加一点字间距 */
}

/* =========================================
   NFT 展示网格样式
   ========================================= */

/* 网格容器 */
.nft-gallery {
    display: grid;
    /* 自适应列宽，最小宽度 240px，自动填满 */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px; /* 网格间距 */
    padding: 20px 20px 40px; /* 顶部内边距减小，因为上方有文字 */
    max-width: 1600px; /* 最大宽度限制 */
    margin: 180px auto 0; /* 增加顶部外边距，使其下移 */
}

/* 单个 NFT 卡片 */
.nft-card {
    background-color: #ffffff; /* 卡片背景改为白色 */
    border-radius: 12px; /* 圆角 */
    overflow: hidden; /* 隐藏溢出内容 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* 调整阴影以适应白底 */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* 悬停动画 */
    cursor: pointer;
    border: 1px solid #f0f0f0; /* 添加轻微边框增加层次感 */
}

/* 卡片悬停效果 */
.nft-card:hover {
    transform: translateY(-5px); /* 上浮效果 */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12); /* 加深阴影 */
}

/* 图片容器 */
.nft-image-box {
    width: 100%;
    aspect-ratio: 1 / 1; /* 保持正方形比例 */
    background-color: #f7f7f7; /* 图片背景调浅 */
    overflow: hidden;
    position: relative;
}

/* 图片样式 */
.nft-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 改为 cover 以填满区域，适合 NFT 展示 */
    padding: 0; /* 移除 padding，让 NFT 图片充满 */
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

/* 图片悬停放大 */
.nft-card:hover .nft-image-box img {
    transform: scale(1.05);
}

/* 信息区域 */
.nft-info {
    padding: 15px;
    background-color: #ffffff; /* 确保与卡片背景一致 */
    display: flex; /* 开启 Flex 布局 */
    justify-content: space-between; /* 两端对齐 */
    align-items: center; /* 垂直居中 */
}

/* NFT 名称 */
.nft-name {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #333333; /* 深色文字 */
}

/* 下载按钮样式 */
.download-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #888; /* 默认灰色图标 */
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background-color: #f0f0f0; /* 悬停时浅灰背景 */
    color: #2C97DD; /* 悬停时蓝色图标 */
    transform: scale(1.1);
}

/* 移除旧的 NFT 编号样式（如果不再需要） */
.nft-id {
    display: none;
}
