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

        .rule-card {
            background: #eef7ff;
            padding: 20px;
            border-radius: 12px;
            margin: 20px 0;
            border-left: 5px solid var(--accent-color);
        }

        /* 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: 440px;
        }

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

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

        #panel {
            position: absolute;
            left: 400px;
            top: 0;
            width: 200px;
            height: 400px;
            background: #fdfdfd;
            border-left: 1px solid #eee;
            padding: 20px;
            box-sizing: border-box;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
        }

        /* 覆盖 app.css 中的绝对定位 */
        #panel div, #panel span, #panel input, #panel select, #panel button, #panel label {
            position: relative !important;
            top: auto !important;
            left: auto !important;
            margin: 0 !important;
        }

        #panel span {
            white-space: normal !important;
            text-align: center;
        }

        button {
            width: 100%;
            padding: 12px;
            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);
            background-color: #e67e22 !important;
            color: white;
        }

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

        .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; }
        }
