body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(to bottom, #87CEEB 0%, #A0522D 100%);
    font-family: Arial, sans-serif;
}

#canvas-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#controls {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 139, 139, 0.7);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

#controls h5 {
    margin: 0 0 0 0;
    color: #111;
    font-size: 1em;
}

.control-group {
    margin: 0 0;
}

label {
    display: inline-block;
    max-width: 300px;
    font-size: 12px;
    color: #111;
}

input[type="checkbox"] {
    margin-right: 5px;
}

/* Slider Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 18px;
    margin-right: 6px;
    margin-bottom: 3px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 18px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:focus + .slider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider:hover {
    background-color: #b5b5b5;
}

input:checked + .slider:hover {
    background-color: #45a049;
}

/* Shake animation for denied action */
@keyframes shake {
    0%, 20%, 40%, 60%, 80% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70% {
        transform: translateX(-3px);
    }
}

.slider.shake {
    animation: shake 0.5s ease-in-out;
}

.pump-switch-label, .fullscreen-switch-label {
    color: #000;
    font-size: 12px;
    font-weight: normal;
    transition: color 0.3s ease;
}

.pump-switch-label.active, .fullscreen-switch-label.active {
    color: #FFF;
    font-weight: bold;
}

.home-button {
    background-color: #006400;
    color: white;
    border: none;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    width: 100%;
    height: 20px;
    margin-top: 2px;
    margin-bottom: 2px;
}

.home-button:hover {
    background-color: #45a049;
}

.home-button:active {
    background-color: #3d8b40;
    transform: translateY(1px);
}

#info {
    position: absolute;
    bottom: 20px;
    left: 10px;
    background: rgba(80, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    max-width: 300px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 滴灌系统参数显示区域样式 */

.system-parameters {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 10px;
    padding: 15px;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 12px;
    z-index: 1000;
    max-width: 400px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.system-parameters h3 {
    margin: 0 0 15px 0;
    color: #7FFF00;
    font-size: 16px;
    text-align: center;
    border-bottom: 2px solid #7FFF00;
    padding-bottom: 8px;
}

.parameters-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.parameters-table th,
.parameters-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.parameters-table th {
    background-color: rgba(76, 175, 80, 0.2);
    color: #7FFF00;
    font-weight: bold;
    font-size: 13px;
}

.parameters-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

.parameters-table tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.parameters-table td.param-name {
    font-weight: 500;
    color: #E0E0E0;
    width: 60%;
}

.parameters-table td.param-value {
    color: #FFFFFF;
    font-weight: 600;
    text-align: right;
    width: 40%;
}

.param-category {
    background-color: rgba(76, 175, 80, 0.3) !important;
    font-weight: bold;
    color: #7FFF00 !important;
    text-align: center !important;
}

.param-category td {
    padding: 10px !important;
    font-size: 14px !important;
}

/* 隐藏状态 */
.system-parameters.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .system-parameters {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 11px;
    }

    .system-parameters h3 {
        font-size: 14px;
    }

    .parameters-table th,
    .parameters-table td {
        padding: 4px 8px;
    }
}

/* 滚动条样式 */
.system-parameters::-webkit-scrollbar {
    width: 6px;
}

.system-parameters::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.system-parameters::-webkit-scrollbar-thumb {
    background: rgba(76, 175, 80, 0.5);
    border-radius: 3px;
}

.system-parameters::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 175, 80, 0.7);
}