:root {
    --bg-dark: #0b0c10;
    --panel-bg: #1f2833;
    --text-main: #c5c6c7;
    --text-muted: #66fcf1;
    --accent-blue: #45a29e;
    --xray-green: #39ff14;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'PingFang SC', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 复用 Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    background: linear-gradient(to bottom, rgba(31, 40, 51, 0.95), rgba(11, 12, 16, 0.95));
    border-bottom: 1px solid var(--accent-blue);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.header-title { font-size: 20px; font-weight: bold; color: var(--text-muted); }

.nav-btn {
    background: transparent; border: 1px solid var(--accent-blue); color: var(--text-muted);
    padding: 6px 15px; border-radius: 4px; cursor: pointer; transition: all 0.3s;
}
.nav-btn:hover { background: rgba(69, 162, 158, 0.2); box-shadow: 0 0 10px rgba(69, 162, 158, 0.5); }

/* 主布局 */
.main-container {
    flex: 1;
    display: flex;
    padding: 20px;
    gap: 20px;
    overflow: hidden;
}

.panel-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px;
    border-left: 4px solid var(--accent-blue); padding-left: 15px;
}
h2 { margin: 0; font-size: 18px; color: #fff; text-shadow: 0 0 5px rgba(102, 252, 241, 0.3); }

/* --- 左侧 X-Ray --- */
.xray-section {
    flex: 6;
    background: var(--panel-bg);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(102, 252, 241, 0.1);
    display: flex; flex-direction: column; position: relative;
}

.instruction { font-size: 12px; color: var(--accent-blue); background: rgba(69, 162, 158, 0.1); padding: 4px 10px; border-radius: 15px; }

.xray-container {
    flex: 1;
    position: relative;
    background: #111;
    border-radius: 8px;
    overflow: hidden;
    cursor: none; /* 隐藏默认鼠标 */
    border: 2px solid #333;
}

/* 桥梁绘制 (CSS Art) */
.bridge-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

.normal-layer { background: linear-gradient(to bottom, #1a1a1a, #000); }

/* 桥拱 */
.bridge-arch {
    position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%);
    width: 80%; height: 150px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    border: 40px solid #555; /* 石头颜色 */
    border-bottom: 0;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.bridge-deck {
    position: absolute; bottom: 185px; left: 10%; width: 80%; height: 10px;
    background: #666;
    border-radius: 5px;
}

/* 透视层样式 */
.xray-layer {
    background: #001100; /* 深绿底色 */
    z-index: 10;
    /* 初始全隐藏，通过 clip-path 揭示 */
    clip-path: circle(0% at 50% 50%); 
}

.xray-layer .bridge-arch {
    border-color: rgba(57, 255, 20, 0.1); /* 半透明绿 */
    border-width: 40px;
}

/* 内部结构：腰铁 */
.iron-cramps {
    position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%);
    width: 80%; height: 150px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    /* 用虚线模拟并列砌筑的缝隙 */
    border: 40px dashed rgba(57, 255, 20, 0.3);
    border-bottom: 0;
}

/* 铁拉杆 */
.iron-rods {
    position: absolute; bottom: 100px; left: 10%; width: 80%; height: 2px;
    background: repeating-linear-gradient(90deg, var(--xray-green) 0, var(--xray-green) 50px, transparent 50px, transparent 100px);
    box-shadow: 0 0 10px var(--xray-green);
}

.xray-grid {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(57, 255, 20, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 20, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* 透视镜 UI */
.xray-scope {
    position: absolute; width: 200px; height: 200px;
    border: 2px solid var(--xray-green);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 0 30px var(--xray-green), inset 0 0 20px rgba(57, 255, 20, 0.2);
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: brightness(1.2) contrast(1.2); /* 增强透视区域亮度 */
}

.scope-crosshair {
    width: 20px; height: 20px;
    border-left: 1px solid var(--xray-green);
    border-top: 1px solid var(--xray-green);
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.scope-crosshair::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border-right: 1px solid var(--xray-green); border-bottom: 1px solid var(--xray-green);
}

.scope-data {
    position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%);
    font-family: monospace; font-size: 10px; color: var(--xray-green);
    text-align: center; background: rgba(0,0,0,0.8); padding: 4px;
}

.info-panel {
    position: absolute; bottom: 30px; left: 30px;
    background: rgba(11, 12, 16, 0.9); border: 1px solid var(--accent-blue);
    padding: 15px; width: 250px; border-radius: 4px; pointer-events: none;
}
.info-panel h3 { margin: 0 0 5px 0; color: var(--text-muted); font-size: 14px; }
.info-panel p { margin: 0; font-size: 12px; color: #ccc; }

/* --- 右侧 流程模拟 --- */
.process-section {
    flex: 4;
    background: var(--panel-bg);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(102, 252, 241, 0.1);
    display: flex; flex-direction: column; gap: 20px;
}

.steps-container {
    display: flex; flex-direction: column; gap: 10px;
}

.step-card {
    background: rgba(0,0,0,0.2); border: 1px solid transparent;
    padding: 10px; border-radius: 4px; display: flex; gap: 10px;
    transition: all 0.3s; opacity: 0.5;
}

.step-card.active {
    background: rgba(69, 162, 158, 0.1); border-color: var(--accent-blue);
    opacity: 1; transform: translateX(10px);
}

.step-num {
    font-size: 24px; font-weight: bold; color: var(--accent-blue);
    font-family: monospace; opacity: 0.3;
}
.step-card.active .step-num { opacity: 1; }

.step-content h4 { margin: 0 0 5px 0; font-size: 14px; color: #fff; }
.step-content p { margin: 0; font-size: 12px; color: #aaa; }

.animation-stage {
    flex: 1; background: #151515; border-radius: 4px;
    position: relative; overflow: hidden;
    display: flex; flex-direction: column;
}

.construction-scene {
    flex: 1; position: relative;
    /* 简单示意图背景 */
    background: linear-gradient(to top, #333 0%, #111 100%);
}

.scene-obj {
    position: absolute; transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-controls {
    display: flex; justify-content: space-between; padding: 10px;
    background: #000;
}
.timeline-controls button {
    background: #333; border: none; color: #fff; padding: 5px 10px;
    border-radius: 3px; cursor: pointer; font-size: 12px;
}
.timeline-controls button:hover { background: var(--accent-blue); color: #000; }