body {
    margin: 0;
    padding: 0;
    background: #000;
    color: #fff;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
}

.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    margin: 10px 0;
    text-align: center;
    font-size: 2rem;
    text-shadow: 0 0 10px #00aaff, 0 0 20px #00aaff;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px #00aaff, 0 0 20px #00aaff;
    }
    to {
        text-shadow: 0 0 15px #00aaff, 0 0 30px #00aaff, 0 0 40px #00aaff;
    }
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(26, 26, 46, 0.7);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(0, 170, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.2);
}

button {
    background: #1a1a2e;
    color: #fff;
    border: 1px solid #00aaff;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

button:hover {
    background: #0f3460;
    box-shadow: 0 0 10px #00aaff, 0 0 20px #00aaff;
}

button:active {
    transform: translateY(1px);
}

/* 特殊按钮样式 */
#blackHoleBtn {
    border-color: #ff5555;
    box-shadow: 0 0 5px #ff5555;
}

#blackHoleBtn:hover {
    box-shadow: 0 0 10px #ff5555, 0 0 20px #ff5555;
}

.speed-control, .trail-mode-control, .g-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 52, 96, 0.3);
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid rgba(0, 170, 255, 0.2);
}

.speed-control label, .trail-mode-control label, .g-control label {
    font-weight: bold;
    color: #00aaff;
    text-shadow: 0 0 5px rgba(0, 170, 255, 0.5);
}

#speedSlider {
    width: 100px;
    background: #0f3460;
    height: 5px;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

#speedSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #00aaff;
    cursor: pointer;
    box-shadow: 0 0 5px #00aaff;
}

#speedSlider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #00aaff;
    cursor: pointer;
    box-shadow: 0 0 5px #00aaff;
    border: none;
}

.trail-mode-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

#trailMode {
    background: #0f3460;
    color: #fff;
    border: 1px solid #00aaff;
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 0 5px rgba(0, 170, 255, 0.3);
    outline: none;
}

#trailMode:focus {
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

.g-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

#gSlider {
    width: 100px;
    background: #0f3460;
    height: 5px;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

#gSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #00aaff;
    cursor: pointer;
    box-shadow: 0 0 5px #00aaff;
}

#gSlider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #00aaff;
    cursor: pointer;
    box-shadow: 0 0 5px #00aaff;
    border: none;
.collision-mode-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 52, 96, 0.3);
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid rgba(0, 170, 255, 0.2);
}

.collision-mode-control label {
    font-weight: bold;
    color: #00aaff;
    text-shadow: 0 0 5px rgba(0, 170, 255, 0.5);
}

#collisionMode {
    background: #0f3460;
    color: #fff;
    border: 1px solid #00aaff;
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 0 5px rgba(0, 170, 255, 0.3);
    outline: none;
}

#collisionMode:focus {
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

.blackhole-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(26, 26, 46, 0.7);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 85, 85, 0.3);
    box-shadow: 0 0 15px rgba(255, 85, 85, 0.2);
}

.blackhole-force-control, .blackhole-radius-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 52, 96, 0.3);
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid rgba(255, 85, 85, 0.2);
}

.blackhole-force-control label, .blackhole-radius-control label {
    font-weight: bold;
    color: #ff5555;
    text-shadow: 0 0 5px rgba(255, 85, 85, 0.5);
}

#blackHoleForceSlider, #blackHoleRadiusSlider {
    width: 100px;
    background: #0f3460;
    height: 5px;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

#blackHoleForceSlider::-webkit-slider-thumb, #blackHoleRadiusSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ff5555;
    cursor: pointer;
    box-shadow: 0 0 5px #ff5555;
}

#blackHoleForceSlider::-moz-range-thumb, #blackHoleRadiusSlider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ff5555;
    cursor: pointer;
    box-shadow: 0 0 5px #ff5555;
    border: none;
}

.energy-display {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(26, 26, 46, 0.7);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid rgba(0, 170, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.2);
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.energy-display div {
    color: #00aaff;
    text-shadow: 0 0 5px rgba(0, 170, 255, 0.5);
}
}

#gravityCanvas {
    border: 1px solid #333;
    background: #000 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23000"/><circle cx="20" cy="30" r="1" fill="%23333"/><circle cx="50" cy="20" r="0.5" fill="%23333"/><circle cx="80" cy="40" r="0.7" fill="%23333"/><circle cx="30" cy="70" r="0.8" fill="%23333"/><circle cx="70" cy="80" r="0.6" fill="%23333"/></svg>');
    background-size: 200px 200px;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.5);
}

.info {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #aaa;
    text-align: center;
    background: rgba(26, 26, 46, 0.5);
    padding: 8px 15px;
    border-radius: 5px;
    border: 1px solid rgba(0, 170, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.1);
}

/* 星球参数编辑弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #1a1a2e;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #00aaff;
    box-shadow: 0 0 20px #00aaff;
    width: 300px;
    transform: scale(0.8);
    animation: scaleIn 0.3s forwards;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

.modal-content h2 {
    margin-top: 0;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #00aaff;
    background: #0f3460;
    color: #fff;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
    border-color: #00aaff;
}

.modal-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
    margin: 0 5px;
}

/* 拖拽时的视觉效果 */
.dragging {
    cursor: grabbing;
}