/* public/assets/css/life/level-tool.css */

.level-board-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 20px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
}

/* 仪器外表盘：凹陷感 */
.level-circle-outer {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 6px solid #e2e8f0;
    background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 
        inset 0 12px 25px rgba(0,0,0,0.1), 
        inset 0 -4px 10px rgba(255,255,255,0.8),
        0 10px 20px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

[data-theme="dark"] .level-circle-outer {
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
    box-shadow: 
        inset 0 12px 25px rgba(0,0,0,0.5), 
        inset 0 -4px 10px rgba(255,255,255,0.05),
        0 10px 20px rgba(0,0,0,0.2);
}

/* 十字刻度线 */
.level-crosshair-x {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.15) 10%, rgba(0,0,0,0.15) 90%, transparent 100%);
    z-index: 1;
}

.level-crosshair-y {
    position: absolute;
    height: 100%;
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.15) 10%, rgba(0,0,0,0.15) 90%, transparent 100%);
    z-index: 1;
}

[data-theme="dark"] .level-crosshair-x { background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 10%, rgba(255,255,255,0.15) 90%, transparent 100%); }
[data-theme="dark"] .level-crosshair-y { background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.15) 10%, rgba(255,255,255,0.15) 90%, transparent 100%); }

/* 靶心双环 */
.level-target-ring-outer {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.4);
    z-index: 2;
}
.level-target-ring-inner {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #10b981;
    z-index: 2;
}

/* 带有反光质感的立体水气泡 */
.level-bubble {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 
        0 6px 12px rgba(37, 99, 235, 0.4), 
        inset 0 -3px 6px rgba(0,0,0,0.2),
        inset 0 3px 6px rgba(255,255,255,0.4);
    z-index: 3;
    /* 加入类似液体的平滑阻尼动画 */
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.3s ease; 
    transform: translate(0px, 0px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.level-bubble.perfect-bg {
    background: radial-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 
        0 6px 12px rgba(16, 185, 129, 0.4), 
        inset 0 -3px 6px rgba(0,0,0,0.2),
        inset 0 3px 6px rgba(255,255,255,0.4);
}

/* 气泡的高光亮点 */
.bubble-highlight {
    width: 14px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    margin-top: 4px;
    filter: blur(1px);
}

/* 状态徽章 */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}

.status-badge.tilt { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.status-badge.perfect { background: rgba(16, 185, 129, 0.15); color: #10b981; transform: scale(1.1); border: 1px solid rgba(16, 185, 129, 0.3); }

/* 数据仪表盘网格 */
.level-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-main);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    margin-bottom: 12px;
}

.metric-bar-bg {
    width: 100%;
    height: 6px;
    background: var(--bg-body);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.metric-bar-fill {
    position: absolute;
    top: 0; left: 50%; height: 100%;
    width: 0%;
    background: #3b82f6;
    transition: width 0.15s ease, left 0.15s ease, background 0.3s ease;
}
.metric-bar-fill.perfect { background: #10b981; }

/* 底部操作按钮 */
.level-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.lvl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    border: none;
}

.btn-calib { background: var(--primary-color); color: white; box-shadow: 0 4px 10px rgba(0, 102, 204, 0.2); }
.btn-calib:hover { transform: translateY(-2px); filter: brightness(1.1); }

.btn-reset { background: var(--bg-body); border: 1px solid var(--border-color); color: var(--text-main); }
.btn-reset:hover { background: #e2e8f0; }
[data-theme="dark"] .btn-reset:hover { background: #334155; }

/* 提示卡片 */
.level-tip-card {
    background: rgba(245, 158, 11, 0.05);
    border-left: 4px solid #f59e0b;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    padding: 20px;
}
.level-tip-card h4 { color: #d97706; margin-bottom: 8px; font-size: 1.05rem; font-weight: 700; }
.level-tip-card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; line-height: 1.6; }
[data-theme="dark"] .level-tip-card h4 { color: #fbbf24; }