/* =========================================
   眼图模块 - 升余弦成形版（蓝白背景统一版）
   ========================================= */

* { 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.88);
    -webkit-backdrop-filter: blur(12px);
    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: 1200px; margin: 0 auto; padding: 20px; }

.top-bar {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.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: 22px;
    color: #0f4c81;
}

.experiment-area {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.control-panel {
    flex: 0 0 340px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-panel h2 {
    font-size: 16px;
    color: #0f4c81;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.hint {
    font-size: 13px;
    color: #64748b;
    line-height: 1.7;
}

.slider-box {
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.slider-box label {
    display: block;
    font-size: 14px;
    color: #334155;
    margin-bottom: 8px;
    font-weight: 600;
}

.slider-hint {
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
    line-height: 1.6;
}

input[type=range] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #bfdbfe, #60a5fa);
    border-radius: 3px;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(59,130,246,0.35);
}

input[type=range]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(59,130,246,0.35);
}

.theory-box {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid #3b82f6;
    padding: 10px;
    border-radius: 0 6px 6px 0;
}

.theory-box h3 {
    font-size: 14px;
    color: #1d4ed8;
    margin-bottom: 6px;
}

.theory-box p {
    font-size: 12px;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 6px;
    text-align: justify;
}

.theory-box .formula {
    font-family: 'Times New Roman', serif;
    font-size: 16px;
    font-style: italic;
    text-align: center;
    font-weight: bold;
    color: #1d4ed8;
    background: rgba(255,255,255,0.65);
    padding: 8px;
    border-radius: 6px;
    margin: 10px 0;
}

.contact-box {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid #22c55e;
    padding: 10px;
    border-radius: 8px;
    margin-top: auto;
}

.contact-box h3 {
    font-size: 14px;
    color: #16a34a;
    margin-bottom: 6px;
}

.contact-info {
    background: rgba(255,255,255,0.8);
    padding: 8px;
    border-radius: 6px;
}

.contact-info p {
    font-size: 13px;
    color: #334155;
    margin-bottom: 4px;
}

.contact-info p:last-child {
    color: #dc2626;
    font-weight: bold;
}

.chart-panel {
    flex: 1;
    min-width: 500px;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.chart-header h2 {
    font-size: 16px;
    color: #0f4c81;
}

.status-group {
    display: flex;
    gap: 15px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(241, 245, 249, 0.9);
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.status-label {
    font-size: 13px;
    color: #64748b;
}

.status-value {
    font-size: 14px;
    font-weight: bold;
    font-family: 'Consolas', monospace;
}

.status-value.good { color: #16a34a; }
.status-value.warning { color: #d97706; }
.status-value.danger { color: #dc2626; }

.canvas-wrapper {
    position: relative;
    width: 100%;
    height: 420px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8), 0 0 20px rgba(34,197,94,0.15);
    border: 2px solid #166534;
}

#gridCanvas, #eyeCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.params-display {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding: 10px;
    background: rgba(241, 245, 249, 0.9);
    border-radius: 8px;
}

.param-item {
    text-align: center;
}

.param-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.param-value {
    font-size: 16px;
    font-weight: bold;
    color: #16a34a;
    font-family: 'Consolas', monospace;
}

@media (max-width: 900px) {
    .experiment-area { flex-direction: column; }
    .control-panel { flex: 0 0 auto; width: 100%; }
    .chart-panel { min-width: 100%; }
}
