/**
 * SCL-90 视觉系统规范
 * 风格：Apple Design + 微动效 + 证据链高亮
 */

:root {
    /* 苹果标准色板 */
    --ios-bg: #F2F2F7;
    --ios-card: #FFFFFF;
    --ios-text: #1D1D1F;
    --ios-subtext: #86868B;
    --ios-blue: #007AFF;
    --ios-green: #34C759;
    --ios-orange: #FF9500;
    --ios-red: #FF3B30;
    --ios-divider: rgba(60, 60, 67, 0.12);
    
    /* 阴影与圆角 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --radius-card: 22px;
    --radius-btn: 14px;
    
    /* 字体 */
    --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

/* ================== 🧬 基础重置 ================== */
*, *::before, *::after { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body {
    margin: 0; padding: 0;
    font-family: var(--font-stack);
    background-color: var(--ios-bg);
    color: var(--ios-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ================== 📱 布局组件 ================== */
.app-container {
    max-width: 480px; 
    margin: 0 auto; 
    min-height: 100vh;
    display: flex; 
    flex-direction: column;
}

.content { 
    padding: 20px; 
    flex: 1; 
}

/* 导航栏毛玻璃特效 */
.navbar {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--ios-divider);
    padding: 12px 20px;
    display: flex; justify-content: space-between; align-items: center;
}

.nav-title { font-weight: 700; font-size: 17px; letter-spacing: -0.4px; }

/* ================== 🃏 卡片系统 ================== */
.card {
    background: var(--ios-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 20px;
    border: 0.5px solid rgba(0,0,0,0.02);
}

/* 渐入动效 */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================== 🔘 交互组件 ================== */
.btn-primary {
    display: block; width: 100%; 
    background: var(--ios-blue); 
    color: #fff;
    border: none; padding: 16px; 
    font-size: 17px; font-weight: 600;
    border-radius: var(--radius-btn); 
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:active { 
    transform: scale(0.96); 
    opacity: 0.85; 
}

.btn-sec {
    background: rgba(118, 118, 128, 0.12);
    color: var(--ios-text);
    border: none; padding: 12px 18px;
    border-radius: 12px; font-weight: 600;
    font-size: 15px; cursor: pointer;
}

/* 选项按钮深度打磨 */
.opt-btn {
    background: #FFFFFF;
    border: 1.5px solid transparent;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.opt-btn:active { transform: scale(0.98); background: #F9F9F9; }

.opt-btn.selected {
    border-color: var(--ios-blue);
    background: rgba(0, 122, 255, 0.05);
    color: var(--ios-blue);
}

/* ================== 📊 报告与证据链 ================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
}

.bg-green { background: #E8F5E9; color: var(--ios-green); }
.bg-orange { background: #FFF3E0; color: var(--ios-orange); }
.bg-red { background: #FFEBEE; color: var(--ios-red); }

.res-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0;
    border-bottom: 0.5px solid var(--ios-divider);
}

.res-name { font-weight: 500; font-size: 15px; }

/* 证据链详情行样式 */
.evidence-item {
    display: flex; justify-content: space-between;
    font-size: 13px; line-height: 2;
    border-bottom: 1px dotted #E5E5EA;
    padding: 4px 0;
}

/* ================== 🧭 进度环 ================== */
.ring-container { position: relative; width: 36px; height: 36px; }
.ring-svg circle { 
    transition: stroke-dashoffset 0.4s ease-in-out; 
    transform: rotate(-90deg); transform-origin: 50% 50%; 
}
.ring-text {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px; font-weight: 700; color: var(--ios-subtext);
}

/* ================== 🎡 特效微互动 ================== */
.spinner {
    width: 24px; height: 24px;
    border: 3px solid rgba(0, 122, 255, 0.1);
    border-top: 3px solid var(--ios-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* 打印优化：隐藏不需要的证据说明 */
@media print {
    .btn-primary, .btn-sec, .navbar { display: none; }
    .card { box-shadow: none; border: 1px solid #eee; }
}