/* ============================================================
   🎨 THEME: Institutional Trust (专业金融机构风)
   目标：建立信任，消除“诈骗感”，模拟银行/研报风格
   ============================================================ */

:root {
    /* --- 核心配色 --- */
    --bg-color: #f0f2f5;       /* 浅灰背景，类似 Facebook/LinkedIn 的商务底色 */
    --card-bg: #ffffff;        /* 纯白卡片，干净整洁 */
    --text-main: #1c1e21;      /* 深灰接近黑，阅读舒适 */
    --text-sub: #65676b;       /* 次级文字颜色 */
    
    /* --- 品牌色 (KBC/Bolero 风格蓝) --- */
    --primary: #0084ff;        /* 科技蓝：用于强调和主要按钮 */
    --primary-hover: #0073e6;  /* 按钮悬停色 */
    
    /* --- 功能色 --- */
    --success-green: #00c853;  /* 沉稳的绿色：用于看涨信号/WhatsApp */
    --warning-orange: #ff9800; /* 沉稳的橙色：用于人工复核 */
    --border-color: #dfe3e8;   /* 淡淡的边框线 */
    
    /* --- 阴影 (柔和投影，代替发光) --- */
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* =========================================
   1. 背景雷达 (改为淡淡的水印效果)
========================================= */
.radar-scope {
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120vmax;
    height: 120vmax;
    border-radius: 50%;
    /* 极淡的蓝色线条 */
    border: 1px solid rgba(0, 132, 255, 0.05);
    background-image: 
        linear-gradient(rgba(0, 132, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 132, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
    pointer-events: none;
}

.radar-scope::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    /* 极淡的扫描拖尾 */
    background: conic-gradient(from 0deg, transparent 0deg, transparent 280deg, rgba(0, 132, 255, 0.05) 360deg);
    animation: spin 6s infinite linear;
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* =========================================
   2. 主要内容区
========================================= */
.main-content {
    z-index: 10;
    width: 90%;
    max-width: 420px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 40px; 
    margin-top: -40px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.header-section h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    color: var(--text-main);
    letter-spacing: -0.5px;
}
.header-section h1 span { 
    color: var(--primary); 
    position: relative;
    display: inline-block;
}

/* 给 DIAGNOSIS 加一个小底线，增加设计感 */
.header-section h1 span::after {
    content: '';
    display: block;
    width: 100%;
    height: 4px;
    background: var(--primary);
    opacity: 0.2;
    margin-top: -8px;
    border-radius: 2px;
}

.header-section .subtitle {
    color: var(--text-sub);
    font-size: 1rem;
    margin-top: 15px;
    line-height: 1.5;
    font-weight: 400;
}

/* --- 卡片容器 (拟物化白卡片) --- */
.control-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: var(--shadow-soft); /* 柔和投影 */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- 输入框 --- */
input {
    width: 100%;
    background: #f8f9fa; /* 极浅灰输入框 */
    border: 2px solid var(--border-color);
    color: var(--text-main);
    font-family: "Courier New", monospace; /* 保留一点数据感 */
    font-size: 1.3rem;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

input::placeholder {
    color: #bdc3c7;
    font-family: -apple-system, sans-serif;
    font-weight: normal;
    text-transform: none;
    font-size: 1rem;
    letter-spacing: 0;
}

input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 132, 255, 0.1); /* 聚焦时的蓝色光晕 */
}

input.error {
    border-color: #ff4757;
    background: #fff5f5;
    animation: shake 0.3s;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* --- 扫描按钮 (蓝色专业感) --- */
.btn-main {
    background: var(--primary);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 15px rgba(0, 132, 255, 0.3);
    transition: transform 0.1s, background 0.2s;
}
.btn-main:hover { background: var(--primary-hover); }
.btn-main:active { transform: scale(0.98); }

/* =========================================
   3. 结果弹窗 (底部抽屉 - 白底)
========================================= */
#result-modal {
    display: none;
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    background: #ffffff; /* 白底 */
    border-top: 1px solid var(--border-color);
    border-radius: 24px 24px 0 0;
    padding: 30px 20px 40px 20px;
    z-index: 100;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* 优化结果页头部布局 */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* 垂直居中对齐 */
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* 优化模糊数据表格，增加真实感 */
#blur-area {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 0; /*去掉内边距，交给子元素 */
    overflow: hidden;
}

#blur-area .data-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    color: #555;
}

#blur-area .data-row:last-child {
    border-bottom: none;
}

/* 模糊的值 */
.blur-value {
    color: #007bff; /* 蓝色 */
    font-weight: bold;
    font-family: monospace; /* 等宽字体更像数据 */
    filter: blur(4px);
    user-select: none;
}
/* --- 锁定图标 --- */
.lock-container {
    text-align: center; padding: 10px;
}
.lock-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    /* 纯色金色，去掉了霓虹感 */
    background: none; 
    color: #f1c40f; 
}

/* --- WhatsApp 按钮 (经典绿) --- */
.btn-whatsapp {
    background: #25D366; 
    color: #fff; width: 100%; padding: 16px;
    border-radius: 12px; text-decoration: none; display: flex;
    justify-content: center; align-items: center; font-weight: bold; font-size: 1.1rem;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: background 0.2s;
}
.btn-whatsapp:hover { background: #1ebc57; }
.btn-icon {
    width: 24px; height: 24px; margin-right: 10px; fill: white;
}

/* --- Loading 遮罩 (改为白底) --- */
#loading-screen {
    display: none; position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(255,255,255,0.95); /* 半透明白底 */
    z-index: 200;
    flex-direction: column; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}
.spinner {
    width: 50px; height: 50px; 
    border: 4px solid #f3f3f3; 
    border-top: 4px solid var(--primary); /* 蓝色转圈 */
    border-radius: 50%;
    animation: spin 1s infinite linear; margin-bottom: 20px;
}
.loading-text { 
    color: var(--primary); 
    font-weight: 600; 
    font-family: -apple-system, sans-serif;
    letter-spacing: 1px; 
}