﻿:root {
            --primary-color: #2c3e50;
            --accent-color: #3498db;
            --bg-color: #f0f2f5;
            --card-bg: #ffffff;
            --text-color: #34495e;
            --shadow: 0 10px 30px rgba(0,0,0,0.08);
        }

        body {
            font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
            background-color: var(--bg-color);
            color: var(--text-color);
            line-height: 1.6;
            margin: 0;
            }

        .container { margin: 20px; }

        .lab-card {
            background: var(--card-bg);
            border-radius: 16px;
            padding: 40px;
            box-shadow: var(--shadow);
            margin-bottom: 30px;
        }

        .header-section {
            text-align: center;
            margin-bottom: 30px;
            border-bottom: 2px solid #eee;
            padding-bottom: 20px;
        }

        h1 {
            color: var(--primary-color);
            margin: 0 0 10px 0;
            font-size: 2rem;
        }

        .back-nav {
            margin-bottom: 20px;
        }

        .btn-back {
            display: inline-flex;
            align-items: center;
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 600;
            transition: color 0.3s;
        }

        .btn-back:hover {
            color: var(--accent-color);
        }

        .theory-section {
            margin-bottom: 30px;
            font-size: 1.05rem;
        }

        .formula-card {
            background: #f8f9fa;
            border-left: 5px solid var(--accent-color);
            padding: 20px;
            margin: 20px 0;
            text-align: center;
            font-family: 'Times New Roman', Times, serif;
            font-size: 1.3rem;
        }

        .formula-explanation {
            display: grid;
            grid-template-columns: auto 1fr;
            gap: 10px;
            margin-top: 15px;
            font-size: 0.95rem;
            text-align: left;
            max-width: 400px;
            margin-left: auto;
            margin-right: auto;
        }

        /* Simulation Container */
        .sim-wrapper {
            position: relative;
            justify-content: center;
            align-items: center;
            margin: 40px 0;
            background: #fff;
            border-radius: 12px;
            padding: 20px;
            box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
            overflow: hidden;
        }

        #total {
            position: relative;
            width: 620px;
            height: 400px;
            transform-origin: center center;
            flex-shrink: 0;
        }

        #canvas {
            position: absolute;
            left: 0;
            top: 0;
            width: 410px;
            height: 400px;
        }

        #panel {
            position: absolute;
            left: 410px;
            top: 0;
            width: 210px;
            height: 400px;
            background: #fdfdfd;
            border-left: 1px solid #eee;
            padding: 20px;
            box-sizing: border-box;
        }

        #panel div {
            position: absolute;
            width: 170px;
            left: 20px;
        }

        button {
            width: 100%;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 1rem;
            transition: all 0.2s;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            margin-bottom: 10px;
        }

        button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        }

        #bu1 { background-color: #e74c3c !important; color: white; } /* Reset */
        #bu2 { background-color: #3498db !important; color: white; } /* Start/Pause */
        #bu3 { background-color: #2ecc71 !important; color: white; } /* Diagram */

        .footer-info {
            margin-top: 40px;
            font-size: 0.9rem;
            color: #7f8c8d;
            border-top: 1px solid #eee;
            padding-top: 20px;
        }

        @media (max-width: 700px) {
            .lab-card { padding: 20px; }
            .sim-wrapper { padding: 10px; }
        }
