/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #00d2ff;     /* 亮青色 */
    --secondary-color: #3a7bd5;   /* 深蓝色 */
    --bg-dark: #0f172a;           /* 深色背景 */
    --bg-card: #1e293b;           /* 卡片背景 */
    --text-light: #f8fafc;        /* 浅色文字 */
    --text-gray: #94a3b8;         /* 灰色文字 */
    --accent-green: #10b981;      /* 成功/安全色 */
    --accent-red: #ef4444;        /* 危险色 */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- 导航栏样式 --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

/* 激活状态下划线 */
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.btn-login {
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-login:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- 英雄区域 (Hero) --- */
.hero {
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.hero-content {
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.2s;
}

.btn-primary {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-3px);
}

/* --- 核心功能区 --- */
.features {
    padding: 5rem 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-gray);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.icon-box {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-card p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.card-link {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

/* --- 统计栏 --- */
.stats {
    display: flex;
    justify-content: space-around;
    padding: 4rem 5%;
    background-color: #162032;
    flex-wrap: wrap;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-gray);
}

/* --- 页脚 --- */
footer {
    padding: 2rem 5%;
    background-color: #0b1120;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.footer-content p {
    color: #64748b;
    font-size: 0.9rem;
}

/* --- 响应式设计 --- */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        padding: 1rem;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-actions {
        display: none; /* 移动端暂时隐藏登录按钮 */
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
}

/* --- 通用页面容器 (用于 scanner, risk, verify) --- */
.page-container {
    padding: 100px 5% 50px; /* 顶部留出导航栏高度 */
    max-width: 1200px;
    margin: 0 auto;
    min-height: 80vh;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    color: transparent;
}

.tool-box {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.main-input {
    flex: 1;
    padding: 1rem;
    border-radius: 8px;
    /* 保持原有属性，由下面的“视觉细节优化”覆盖边框和背景 */
    border: 1px solid #334155; 
    background: #0f172a;
    color: white;
    font-size: 1rem;
}

.main-input:focus {
    outline: none;
    border-color: var(--primary-color);
    /* 保持原有属性，由下面的“视觉细节优化”添加 box-shadow */
}

.btn-action {
    padding: 0 2rem;
    background: var(--primary-color);
    color: var(--bg-dark);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-action:hover {
    background: #00b8e6;
}

/* 结果区域通用样式 */
.result-area {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: none; /* 默认隐藏 */
}

.result-card {
    background: rgba(15, 23, 42, 0.5);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.score-display {
    text-align: center;
    margin-bottom: 2rem;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    color: var(--accent-green);
}

/* 移动端适配工具页 */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .btn-action {
        padding: 1rem;
    }
}

/* =========================================
   登录/注册 模态框样式
   ========================================= */
.modal-overlay {
    display: none; /* 默认隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
}
.modal-close:hover { color: #fff; }

.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: #888;
    padding: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    font-weight: bold;
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    /* 保持原有属性，由下面的“视觉细节优化”覆盖背景和边框 */
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #fff;
}
.auth-input:focus {
    border-color: var(--primary-color);
    outline: none;
    /* 保持原有属性，由下面的“视觉细节优化”添加 box-shadow */
}

.btn-full {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    border: none;
    border-radius: 6px;
    color: #000;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}
.btn-full:hover { background: #fff; }

.auth-msg {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.2em;
}
.auth-msg.error { color: var(--accent-red); }
.auth-msg.success { color: var(--accent-green); }

/* 登录后的用户信息显示 */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.btn-logout {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}
.btn-logout:hover { background: var(--accent-red); }
}

/* =========================================
   视觉细节优化
   ========================================= */

/* 1. 全局细节：滚动条与选中色 */

/* 极简深色滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark); 
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 文字选中效果 (配合主题色) */
::selection {
    background: rgba(0, 210, 255, 0.3);
    color: #fff;
}

/* 2. 输入框交互：霓虹对焦效果 */

/* 统一输入框的基准样式 (main-input, auth-input, verify-input) */
.main-input, .verify-input, .auth-input {
    /* 使用 !important 确保覆盖原始的边框和背景，实现更通透的深色和柔和边框 */
    background: rgba(15, 23, 42, 0.6) !important; 
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease; /* 新增过渡效果 */
    /* backdrop-filter: blur(5px); */ /* 可选，如果需要毛玻璃效果可以取消注释 */
}

/* 聚焦时的霓虹光晕和微动 */
.main-input:focus, .verify-input:focus, .auth-input:focus {
    border-color: var(--primary-color) !important; /* 确保边框变色 */
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4), inset 0 0 5px rgba(0, 210, 255, 0.1); 
    transform: translateY(-1px);
}

.vip-plans {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.vip-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    width: 260px;
    position: relative;
    transition: all 0.3s;
}

.vip-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 210, 255, 0.2);
    border-color: var(--primary-color);
}

.vip-card.recommended {
    border: 2px solid #10b981;
    transform: scale(1.05);
}

.vip-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: #000;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.vip-card .price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 15px 0;
}

.vip-card .price span {
    font-size: 1rem;
    color: #94a3b8;
}

.vip-card ul {
    text-align: left;
    margin: 20px 0;
    color: #ccc;
    font-size: 0.95rem;
}

.vip-card ul li {
    margin: 8px 0;
}

.btn-upgrade {
    background: linear-gradient(135deg, #10b981, #34d399);
    border: none;
    color: #000;
    padding: 6px 14px;
    border-radius: 8px;
    margin-left: 10px;
    font-weight: bold;
    cursor: pointer;
}

.vip-download-btn {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa) !important;
    margin-top: 20px;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

/* VIP升级弹窗滚动优化 */
.vip-modal-scroll {
    max-height: 90vh; /* 最大高度占屏幕90% */
    overflow: hidden;
}

.vip-scroll-container {
    max-height: calc(90vh - 120px); /* 减去标题和按钮高度 */
    overflow-y: auto; /* 垂直滚动条 */
    padding-right: 10px; /* 避免滚动条遮内容 */
    scrollbar-width: thin; /* Firefox 细滚动条 */
}

.vip-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.vip-scroll-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

.vip-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.vip-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #00e6ff;
}

/* 手机端优化：登录按钮在汉堡菜单里醒目显示 */
@media (max-width: 768px) {
    /* 隐藏桌面版登录按钮 */
    .desktop-only {
        display: none !important;
    }

    /* 菜单打开样式 */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: rgba(15, 23, 42, 0.98);
        padding: 20px 0;
        border-radius: 12px;
    }

    /* 登录按钮在菜单里 */
    .mobile-login-item {
        display: block;
        width: 100%;
        text-align: center;
        margin: 20px 0 10px;
    }

    .mobile-login-item .btn-login {
        width: 80%;
        max-width: 300px;
        padding: 14px 20px;
        font-size: 1.1rem;
        font-weight: bold;
        background: linear-gradient(135deg, #00e6ff, #0077ff) !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 50px;
        box-shadow: 0 6px 20px rgba(0, 230, 255, 0.4);
        text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    }
}
/* 统一按钮颜色：让“检查钱包风险”按钮也变成蓝色 */
.btn-secondary {
    background: linear-gradient(135deg, #00e6ff, #0077ff) !important; /* 和主按钮一样的蓝渐变 */
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0, 230, 255, 0.4) !important;
    transition: all 0.3s ease !important;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #0077ff, #0055cc) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 230, 255, 0.6) !important;
}
