* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Microsoft YaHei', 'Segoe UI', 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.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: 16px; box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08); border: 1px solid rgba(255, 255, 255, 0.9);
    padding: 20px;
}

.container { max-width: 1250px; margin: 0 auto; padding: 25px; }

.top-bar { display: flex; align-items: center; margin-bottom: 25px; }
.back-btn {
    text-decoration: none; background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
    color: #1d4ed8; padding: 10px 18px; border-radius: 8px; font-weight: 600;
    margin-right: 20px; border: 1px solid #93c5fd; display: inline-flex; align-items: center; gap: 6px; transition: all 0.25s;
}
.back-btn:hover { background: #3b82f6; color: #fff; transform: translateX(-4px); }
.top-bar h1 { font-size: 23px; color: #0f4c81; display: flex; align-items: center; gap: 8px; }

.experiment-area { display: flex; gap: 25px; flex-wrap: wrap; }

.control-panel { width: 380px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.control-panel h2 { color: #0f4c81; font-size: 17px; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.hint { color: #64748b; font-size: 13px; margin-bottom: 5px; }

.input-box { background: #f8fafc; padding: 14px; border-radius: 10px; border: 1px solid #e2e8f0; }
.input-box label { font-size: 14px; font-weight: 600; color: #334155; display: block; margin-bottom: 8px; }
.input-wrapper { position: relative; margin-bottom: 10px; }
.input-wrapper input { width: 100%; padding: 10px 14px; border: 2px solid #cbd5e1; border-radius: 8px; font-size: 15px; font-family: Consolas, monospace; background: #fff; transition: all 0.25s; }
.input-wrapper input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); outline: none; }
.encode-btn { width: 100%; padding: 11px; background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.25s; }
.encode-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 20px rgba(139, 92, 246, 0.35); }

.slider-box { background: rgba(241, 245, 249, 0.9); border-radius: 10px; padding: 14px; border: 1px solid #e2e8f0; }
.slider-header { font-size: 14px; font-weight: 600; color: #475569; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.slider-labels { display: flex; justify-content: space-between; font-size: 12px; color: #64748b; margin-top: 6px; }
.current-val { font-weight: 700; color: #8b5cf6; font-size: 13px; }

input[type="range"] { width: 100%; height: 6px; -webkit-appearance: none; -moz-appearance: none; appearance: none; background: linear-gradient(90deg, #c4b5fd, #8b5cf6); border-radius: 3px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; background: #fff; border: 3px solid #8b5cf6; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; background: #fff; border: 3px solid #8b5cf6; border-radius: 50%; cursor: pointer; border: none; }

.theory-box { background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(139, 92, 246, 0.1)); border-left: 4px solid #8b5cf6; border-radius: 0 10px 10px 0; padding: 12px; margin-top: 5px; }
.theory-box h3 { font-size: 14px; color: #6d28d9; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.theory-box .formula { font-family: 'Times New Roman', serif; font-size: 16px; font-weight: 600; color: #7c3aed; background: rgba(255,255,255,0.7); padding: 8px; border-radius: 6px; margin: 8px 0; text-align: center; }
.theory-box p { font-size: 12px; color: #5b21b6; line-height: 1.6; margin-bottom: 4px; }
.theory-box .note { color: #dc2626; font-weight: bold; margin-top: 6px; }

.contact-box { background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.1)); border: 1px dashed #3b82f6; border-radius: 10px; padding: 12px; margin-top: auto; }
.contact-box h3 { font-size: 14px; color: #1d4ed8; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.contact-info { background: rgba(255,255,255,0.8); border-radius: 8px; padding: 10px; }
.contact-info p { font-size: 13px; color: #0f4c81; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.contact-info p:last-child { color: #dc2626; font-weight: 700; margin-bottom: 0; }

.chart-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid #e2e8f0; }
.chart-header h2 { color: #0f4c81; font-size: 18px; display: flex; align-items: center; gap: 8px; }

.signal-status { background: rgba(139, 92, 246, 0.08); padding: 6px 14px; border-radius: 20px; font-size: 13px; color: #4c1d95; }
.signal-status .highlight { color: #8b5cf6; font-weight: 700; font-family: Consolas, monospace; font-size: 14px;}

.charts-container { display: flex; flex-direction: column; gap: 14px; }
.chart-section { background: #fff; border-radius: 10px; border: 1px solid #e2e8f0; padding: 12px; }
.chart-title { font-size: 13px; font-weight: 600; color: #475569; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.slate { background: #64748b; }
.dot.green { background: #22c55e; }
.dot.purple { background: #8b5cf6; }

@media (max-width: 1000px) {
    .experiment-area { flex-direction: column; }
    .control-panel { width: 100%; }
}
