@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --bg-color: #020204;
    --card-bg: rgba(0,0,0,0.8);
    --border-color: #222;
    --accent-purple: #bd00ff;
    --accent-pink: #ff00ff;
    --text-primary: #EDEDED;
    --text-secondary: #888;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    
     /* ★★★ 核心修改：设置背景图片 ★★★ */
    background-image: url('bg.jpg'); /* 确保 bg.jpg 在 public 文件夹下 */
    background-size: cover;          /* 撑满全屏 */
    background-position: center;     /* 居中 */
    background-repeat: no-repeat;    /* 不重复 */
    background-attachment: fixed;    /* 固定背景，不随滚动条移动 */
    
    /* ✅ 改为最小高度，允许延伸 */
    min-height: 100vh;
    /* ✅ 去掉 flex 居中，回归正常文档流 */
    /* display: flex; align-items: center; justify-content: center;  <-- 删掉这一行 */
}


#wave-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#butterfly-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; pointer-events: none; }
.grid-overlay { display: none; }

.main-container {
    position: relative; 
    z-index: 10; 
    width: 100%; 
    max-width: 1100px; 
    
    /* ✅ 增加上下边距，防止贴边 */
    padding: 80px 20px; 
    /* ✅ 居中容器 */
    margin: 0 auto; 
}

.bento-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) {
    .bento-grid { grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto 1fr; height: 600px; }
    .hero-card { grid-row: 1 / 4; }
}
/* ★★★ 新增：语言切换按钮 ★★★ */
.lang-switch-btn {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.lang-switch-btn:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

/* ==========================================================
   卡片通用样式 (流光描边)
   ========================================================== */
.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    display: flex; flex-direction: column; justify-content: center;
    position: relative; z-index: 1; overflow: hidden; 
}
.card::before {
    content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, transparent, transparent, var(--accent-pink), var(--accent-purple), transparent);
    animation: rotate 4s linear infinite; z-index: -2; opacity: 0; transition: opacity 0.3s;
}
.card::after {
    content: ""; position: absolute; inset: 2px; background: var(--card-bg); border-radius: 14px; z-index: -1;
}
.card:hover::before { opacity: 1; }
.hero-card::before { opacity: 1; } /* Hero描边常亮 */

@keyframes rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }


/* --- 内部样式 --- */
.hero-card {
    justify-content: space-between;
    /* 默认 (移动端): 高度由内容撑开，增加内边距防止拥挤 */
    height: auto; 
    min-height: auto;
    gap: 2rem; /* 增加内部元素间距 */
}

/* PC 端 (大屏幕): 恢复固定高度，保持 Bento Grid 对齐 */
@media (min-width: 768px) {
    .hero-card {
        height: 100%; /* 填满 Grid 单元格 */
        min-height: 420px; 
    }
}

.badge {  perspective: 1000px;  border: 1px solid var(--border-color); color: var(--text-secondary); padding: 6px 12px; border-radius: 100px; font-size: 12px; font-weight: 500; width: fit-content; position: relative; z-index: 10; }
.badge img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform 0.4s ease;
    transform-style: preserve-3d;  /* 保持3D子元素 */
    
    /* 持续旋转动画 */
    animation: rotate3D 12s linear infinite;
    
    /* 赛博朋克霓虹发光 */
    filter: drop-shadow(0 0 8px #a78bfa)
            drop-shadow(0 0 15px #7c3aed)
            drop-shadow(0 0 25px #c084fc);
}

/* 持续旋转动画 */
@keyframes rotate3D {
    from {
        transform: rotateY(0deg) rotateX(10deg); /* 轻微倾斜更立体 */
    }
    to {
        transform: rotateY(360deg) rotateX(10deg);
    }
}
.hero-title {
    /* 默认 (移动端): 稍微小一点 */
    font-size: 2.5rem; 
    font-weight: 900; 
    line-height: 1.2; 
    margin-bottom: 16px; 
    margin-top: 20px; 
    position: relative; 
    z-index: 10;
    color: #fff;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4rem;
        margin-top: 40px;
    }
}
.text-gradient { background: linear-gradient(to right, var(--accent-pink), var(--accent-purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { color: var(--text-secondary); font-size: 1.1rem; line-height: 1.6; max-width: 90%; position: relative; z-index: 10; }
.tag-row { display: flex; gap: 8px; position: relative; z-index: 10; }
.tag { background: #111; border: 1px solid #222; color: #888; padding: 8px 16px; border-radius: 8px; font-size: 13px; }

/* 社交图标样式 */
.social-row { display: flex; gap: 12px; position: relative; z-index: 10; margin-left: auto; /* 靠右对齐 */ }
.social-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: #ccc; font-size: 18px; transition: all 0.2s; backdrop-filter: blur(5px); }
.social-btn:hover { background: rgba(255, 255, 255, 0.15); border-color: var(--accent-pink); color: var(--accent-pink); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 0, 204, 0.2); }

.stats-card { justify-content: center; padding: 24px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 10; }
.label { font-size: 13px; color: var(--text-secondary); font-weight: 700; }
.value { font-size: 1.5rem; font-weight: 700; color: #fff; }
.mono { font-family: 'JetBrains Mono', monospace; }
.text-accent { color: var(--accent-purple); text-shadow: 0 0 10px rgba(189,0,255,0.3); }
.divider { height: 1px; background: var(--border-color); margin: 16px 0; position: relative; z-index: 10; }

.action-card { justify-content: center; gap: 12px; padding: 24px; }
.btn { width: 100%; padding: 14px; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; transition: all 0.2s; position: relative; z-index: 10; }
.primary-btn { background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink)); color: white; border: none; box-shadow: 0 5px 15px rgba(189, 0, 255, 0.3); }
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(189, 0, 255, 0.5); }
.secondary-btn { background: transparent; border: 1px solid var(--border-color); color: var(--text-secondary); }
.secondary-btn:hover { border-color: #666; color: #fff; background: rgba(255,255,255,0.05); }
/* 禁用状态样式 */
.btn:disabled {
    opacity: 0.5;           /* 半透明 */
    cursor: not-allowed;    /* 鼠标变成禁止符号 */
    background: #333;       /* 灰色背景 */
    color: #666;            /* 灰色文字 */
    box-shadow: none;       /* 去掉光晕 */
    transform: none !important; /* 禁止点击动画 */
}
.feed-card { padding: 0; overflow: hidden; justify-content: flex-start; }
.feed-header { padding: 16px 24px; border-bottom: 1px solid var(--border-color); font-size: 12px; font-weight: 700; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; background: var(--card-bg); position: relative; z-index: 10; width: 100%; }
.status-dot { width: 6px; height: 6px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 5px #22c55e; }
.feed-list { padding: 0; overflow-y: auto; height: 100%; position: relative; z-index: 10; }
.feed-item { padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13px; color: #ccc; transition: background 0.2s; }
.feed-item:hover { background: #0F0F0F; }
.feed-user { color: var(--accent-pink); font-weight: 700; margin-right: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.loading { padding: 24px; text-align: center; color: #333; font-size: 12px; }

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #222; border-radius: 2px; }
.airdrop-badge { background: var(--accent-purple); color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; margin-left: 6px; }
/* --- Avatar Cloud (头像云) --- */
.avatar-cloud {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    
    /* 移动端调整：高度限制在 120px，防止挡住下面的标题 */
    height: 120px; 
    
    z-index: 5;
    pointer-events: none;
    overflow: hidden; 
    border-radius: 16px;
    
    /* 关键：确保它是显示的 */
    display: block !important; 
}

/* PC 端调整：高度恢复到 60% */
@media (min-width: 768px) {
    .avatar-cloud {
        height: 60%;
    }
}

.avatar-bubble {
    position: absolute;
    
    /* 移动端调整：头像缩小到 28px */
    width: 28px;
    height: 28px;
    
    border-radius: 50%;
    border: 2px solid rgba(189, 0, 255, 0.6);
    box-shadow: 0 0 15px rgba(189, 0, 255, 0.4);
    object-fit: cover;
    opacity: 0;
    transition: all 1.5s ease-in-out;
}

/* PC 端调整：头像恢复大尺寸 */
@media (min-width: 768px) {
    .avatar-bubble {
        width: 36px;
        height: 36px;
    }
}
.mobile-bottom-bar {
    display: none; /* 默认隐藏 */
}

@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        
        padding: 12px 16px;
        background: rgba(30, 20, 60, 0.85);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(147, 51, 234, 0.4);
        box-shadow: 0 -4px 20px rgba(147, 51, 234, 0.3);
    }
    
}

@media (max-width: 768px) {    
    .tag-row {
        flex-direction: column;    
        align-items: stretch;     
        gap: 12px;          
    }
    
    .tag {
        width: 100%;        
        text-align: center;       
        padding: 10px 16px;      
        font-size: 1rem;        
    }
}