
:root {
    --primary-color: #00d2ff; /* 科技蓝 */
    --secondary-color: #3a7bd5; /* 深蓝 */
    --accent-color: #f0c419; /* 金色 - 强调转化 */
    --bg-dark: #0f172a;
    --text-light: #ffffff;
    --text-gray: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.85);
    --border-color: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000;
    color: var(--text-light);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

#bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* 修复背景图显示问题：使用 fixed 定位层 */
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.8)), url('bg_placeholder.jpg'); 
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}

/* 移动端容器 */
#app-container {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.95) 100%);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    padding-bottom: 80px; /* 为底部Tab留空间 */
    overflow-x: hidden;
}

/* 头部 */
header {
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); /* 占位符 */
    object-fit: contain;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

/* 英雄区域 */
.hero-section {
    padding: 20px;
    text-align: center;
    animation: fadeIn 1s ease;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.4;
}

.hero-title span {
    color: var(--primary-color);
}

.hero-desc {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* 输入区域 */
.input-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 25px 20px;
    margin: 0 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

input[type="text"] {
    width: 100%;
    padding: 16px 16px 16px 45px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--secondary-color);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.action-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.action-btn:active {
    transform: scale(0.98);
}

/* 闪光特效 */
.action-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(30deg); }
    20% { transform: translateX(100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

/* 维度分析图标 */
.features-grid {
    display: flex;
    justify-content: space-around;
    margin-top: 25px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-gray);
}

.feature-icon-box {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* 滚动通知条 */
.ticker-wrap {
    width: 100%;
    background: rgba(0,0,0,0.3);
    margin-top: 30px;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.ticker {
    display: inline-block;
    animation: ticker 20s linear infinite;
}

.ticker-item {
    display: inline-block;
    padding: 0 20px;
    font-size: 0.8rem;
    color: var(--text-gray);
}

.ticker-item span {
    color: var(--accent-color);
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    height: 65px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--border-color);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-gray);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

/* 模态框 - 全屏覆盖 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 进度条弹窗 - 优化版 */
.progress-modal {
    background: rgba(15, 23, 42, 0.9);
    width: 85%;
    max-width: 320px;
    padding: 40px 20px;
    border-radius: 24px;
    border: 1px solid rgba(0, 210, 255, 0.3);
    text-align: center;
    display: none;
    box-shadow: 0 0 50px rgba(0, 210, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* 扫描线特效 */
.progress-modal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: scan 2s linear infinite;
    opacity: 0.5;
}

@keyframes scan {
    0% { top: 0; }
    100% { top: 100%; }
}

.progress-circle {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 25px;
}

svg {
    transform: rotate(-90deg);
    width: 140px;
    height: 140px;
}

circle {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
}

.bg-circle {
    stroke: rgba(255,255,255,0.05);
}

.fg-circle {
    stroke: var(--primary-color);
    stroke-dasharray: 395.84; /* 2 * PI * 63 */
    stroke-dashoffset: 395.84;
    transition: stroke-dashoffset 0.1s linear;
    filter: drop-shadow(0 0 8px var(--primary-color));
}

/* 雷达扫描圈 */
.radar-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 1px solid rgba(0, 210, 255, 0.3);
    background: radial-gradient(circle, rgba(0, 210, 255, 0.1) 0%, transparent 70%);
    animation: radar-pulse 2s infinite;
}

.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.4));
    transform-origin: top left;
    animation: radar-spin 2s linear infinite;
    border-radius: 0 0 100% 0;
    mask-image: radial-gradient(circle at top left, transparent 0, black 100%);
    -webkit-mask-image: radial-gradient(circle at top left, transparent 0, black 100%);
}

@keyframes radar-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes radar-pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
    font-family: 'Courier New', monospace;
}

.analyzing-text {
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 打字机光标效果 */
.analyzing-text::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: var(--primary-color);
    margin-left: 5px;
    vertical-align: middle;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 结果弹窗 - 增强入场动画 */
.result-modal {
    /* 使用弹窗背景图 */
    background: url('popup.png') no-repeat center center;
    background-size: cover;
    background-color: #1e293b;
    width: 85%;
    max-width: 340px;
    padding: 0;
    border-radius: 24px;
    border: 2px solid var(--accent-color);
    text-align: center;
    display: none;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(240, 196, 25, 0.4);
    position: relative;
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0.5) translateY(50px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    background: linear-gradient(90deg, #f0c419, #f7971e);
    padding: 15px;
    color: #000;
    font-weight: bold;
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
}

.modal-body {
    padding: 25px;
    background: rgba(15, 23, 42, 0.85); /* 增加半透明遮罩确保文字可读 */
    position: relative;
    z-index: 2;
}

.success-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.result-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #fff;
}

.result-desc {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.5;
}

.line-btn {
    display: block;
    width: 100%;
    background: #06c755; /* LINE 绿色 */
    color: #fff;
    padding: 15px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(6, 199, 85, 0.4);
    animation: pulse-btn 2s infinite;
}

@keyframes pulse-btn {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 法律文档模态框 */
.legal-modal {
    background: #1e293b;
    width: 90%;
    height: 80%;
    border-radius: 15px;
    padding: 20px;
    display: none;
    flex-direction: column;
}

.legal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.legal-content {
    flex: 1;
    overflow-y: auto;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.6;
    white-space: pre-wrap;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.hidden { display: none !important; }
