﻿: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;
        }

        /* 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;
            min-height: 480px;
        }

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

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

        #panel {
            position: absolute;
            left: 440px;
            top: 0;
            width: 340px;
            height: 440px;
            background: #fdfdfd;
            border-left: 1px solid #eee;
            box-sizing: border-box;
            font-size: 0.9rem;
        }

        #panel div {
            position: absolute;
            width: 310px;
            left: 15px;
        }

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

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

        button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        #bu1 { background-color: #34495e !important; color: white; }
        #bu2 { background-color: #3498db !important; color: white; }
        #bu3 { background-color: #2ecc71 !important; color: white; }

        input[type="text"] {
            position: absolute;
            left: 140px;
            width: 60px;
            padding: 3px 5px;
            border: 1px solid #ddd;
            border-radius: 4px;
        }

        textarea {
            width: 100%;
            height: 120px;
            padding: 10px;
            border: 1px solid #eee;
            border-radius: 8px;
            background: #f8f9fa;
            color: #2c3e50;
            font-family: inherit;
            font-size: 0.95rem;
            line-height: 1.5;
            resize: none;
        }

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

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