/* 基础设置与统一背景 */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Microsoft YaHei', sans-serif; }
body { min-height: 100vh; color: #1a365d; overflow-x: hidden; }

.bg-animation {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(-45deg, #f0f8ff, #e0f2fe, #bae6fd, #ffffff);
    background-size: 400% 400%; animation: gradientBG 15s ease infinite; z-index: -1;
}
@keyframes gradientBG { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.glass-box {
    background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 1); border-radius: 15px;
    box-shadow: 0 8px 30px rgba(14, 65, 136, 0.1); padding: 25px;
}
.container { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }

/* 头部返回按钮 */
.top-bar { display: flex; align-items: center; margin-bottom: 30px; }
.back-btn { 
    text-decoration: none; background: #e0f2fe; color: #0284c7; 
    padding: 10px 20px; border-radius: 8px; font-weight: bold; 
    margin-right: 30px; transition: 0.3s; border: 1px solid #bae6fd;
}
.back-btn:hover { background: #0284c7; color: white; transform: translateX(-5px); }
.top-bar h1 { font-size: 26px; color: #0f4c81; }

/* 左右排版 */
.experiment-area { display: flex; gap: 30px; flex-wrap: wrap; }
.control-panel { flex: 1; min-width: 320px; display: flex; flex-direction: column; gap: 15px; }
.control-panel h2 { font-size: 20px; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; color: #0f4c81;}
.hint { font-size: 14px; color: #64748b; margin-bottom: -5px; }

/* 输入框样式 */
.input-box { background: #f8fafc; padding: 15px; border-radius: 10px; border: 1px solid #e2e8f0; }
.input-box label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: bold; }
.input-box input { width: 100%; padding: 10px; border: 2px solid #cbd5e1; border-radius: 8px; font-size: 15px; margin-bottom: 10px; font-family: 'Consolas', monospace; transition: 0.3s; }
.input-box input:focus { border-color: #0ea5e9; outline: none; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2); }
.encode-btn { width: 100%; padding: 10px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.encode-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4); }

/* 滑块样式 */
.slider-box { background: #f8fafc; padding: 12px 15px; border-radius: 10px; border: 1px solid #e2e8f0; }
.slider-box label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: bold; }
input[type=range] { width: 100%; cursor: pointer; accent-color: #8b5cf6; }

/* 理论知识框 */
.theory-box { background: #f5f3ff; border-left: 5px solid #8b5cf6; padding: 15px; border-radius: 0 10px 10px 0; font-size: 14px; line-height: 1.8; color: #5b21b6; }
.theory-box h3 { margin-bottom: 8px; color: #7c3aed; }
.theory-box p { margin-bottom: 5px; }

/* 联系卡片 */
.contact-box { background: #eff6ff; border: 1px dashed #93c5fd; padding: 15px; border-radius: 10px; margin-top: auto; }
.contact-box h3 { font-size: 16px; color: #1d4ed8; margin-bottom: 8px; }
.contact-box p { font-size: 13px; color: #475569; margin-bottom: 10px; line-height: 1.5; }
.contact-info { background: white; padding: 10px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.contact-info p { margin-bottom: 5px; font-size: 14px; color: #0f4c81; }
.contact-info p:last-child { margin-bottom: 0; color: #e11d48; font-size: 16px; font-weight: bold; }

/* 右侧图表区 */
.chart-panel { flex: 2; min-width: 500px; display: flex; flex-direction: column; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; }
.chart-header h2 { font-size: 20px; color: #0f4c81; margin: 0; }
.signal-status { font-size: 14px; font-weight: bold; color: #475569; }
.signal-status span { padding: 5px 12px; border-radius: 20px; color: white; transition: 0.3s; }

.badge-ready { background-color: #22c55e; }
.badge-wrong { background-color: #ef4444; animation: blink 1s infinite; }
@keyframes blink { 0% {opacity: 1;} 50% {opacity: 0.7; transform: scale(1.02);} 100% {opacity: 1;} }
