body {
    margin: 0;
    overflow: hidden;
    background: #000;
}

canvas {
    display: block;
}

.controls {
    position: fixed;
    top: 0;
    right: -320px; /* 增加隐藏宽度，确保完全隐藏 */
    width: 300px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3); /* 添加阴影效果 */
    z-index: 100; /* 确保在画布上层 */
}

.controls.show {
    right: 0;
}

.control-group {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.glow-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.glow-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.slider-container {
    width: 100%;
    color: white;
    margin-bottom: 10px;
}

.slider-container label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.slider-container input {
    width: 100%;
    margin-top: 5px;
}

.glow-select {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    outline: none;
    flex: 1;
    min-width: 100px;
}

.glow-select:hover {
    background: rgba(255, 255, 255, 0.3);
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: white;
    cursor: pointer;
}

.toggle input {
    display: none;
}

.toggle-label {
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.toggle input:checked + .toggle-label {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.floating-nickname {
    position: absolute;
    color: white;
    font-size: 16px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    white-space: nowrap;
    transform-origin: center bottom;
    transition: transform 0.1s ease-out, opacity 0.1s ease-out;
    font-weight: bold;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}
