* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* 左侧控制面板 */
.control-panel {
    width: 300px;
    background-color: #2d2d2d;
    border-right: 1px solid #444;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-panel h2 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.control-section {
    background-color: #333;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #444;
}

.control-section h3 {
    color: #cccccc;
    margin-bottom: 15px;
    font-size: 1.1em;
}

/* 表单样式 */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input, textarea, button {
    padding: 8px;
    border: 1px solid #555;
    border-radius: 3px;
    background-color: #222;
    color: #e0e0e0;
    font-size: 14px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #888;
    background-color: #2a2a2a;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

button {
    cursor: pointer;
    background-color: #444;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #555;
}

button:active {
    background-color: #666;
}

/* 天体列表样式 */
#celestialList {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.celestial-item {
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.celestial-item .name {
    font-weight: bold;
    color: #ffffff;
}

.celestial-item .coords {
    font-size: 12px;
    color: #aaa;
}

.celestial-item .actions {
    display: flex;
    gap: 5px;
}

.celestial-item button {
    padding: 4px 8px;
    font-size: 12px;
}

.delete-btn {
    background-color: #5a3a3a;
    border-color: #7a5a5a;
}

.delete-btn:hover {
    background-color: #6a4a4a;
}

/* 右侧星图容器 */
.map-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #121212;
}

.map-header {
    padding: 15px 20px;
    background-color: #1e1e1e;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-header h2 {
    color: #ffffff;
    font-size: 1.5em;
}

.zoom-controls {
    display: flex;
    gap: 10px;
}

.zoom-controls button {
    padding: 6px 12px;
}

/* 星图画布 */
.map-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    background-color: #0a0a0a;
    width: 100%;
    height: 100%;
}

#starMap {
    cursor: grab;
    display: block;
    background-color: #0a0a0a;
    width: 100%;
    height: 100%;
}

#starMap:active {
    cursor: grabbing;
}

/* 天体信息标签 */
.celestial-info {
    position: absolute;
    background-color: rgba(30, 30, 30, 0.9);
    border: 1px solid #555;
    border-radius: 5px;
    padding: 10px;
    max-width: 250px;
    pointer-events: none;
    z-index: 1000;
    display: none;
    transform: translate(10px, 10px); /* 调整位置偏移 */
}

.celestial-info h3 {
    color: #ffffff;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.celestial-info p {
    color: #cccccc;
    font-size: 14px;
    line-height: 1.4;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #222;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}
