* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0e14;
    color: #e0e0e0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    overflow: hidden;
    height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* --- Toolbar --- */
#toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: #141a22;
    border-bottom: 1px solid #1e2a38;
    flex-wrap: wrap;
    min-height: 48px;
}

#toolbar h2 {
    font-size: 14px;
    color: #3498db;
    white-space: nowrap;
    margin-right: 8px;
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-section label {
    font-size: 12px;
    color: #8899aa;
    white-space: nowrap;
}

.toolbar-section input[type="text"],
.toolbar-section input[type="number"] {
    background: #0f1923;
    border: 1px solid #2a3a4a;
    color: #e0e0e0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    width: 80px;
}

.toolbar-section input[type="text"] {
    width: 140px;
}

.toolbar-section input[type="number"] {
    width: 60px;
}

.toolbar-section span {
    font-size: 12px;
    color: #556;
}

/* Tool buttons */
.tool-btn {
    background: #1a2533;
    border: 1px solid #2a3a4a;
    color: #aab;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}

.tool-btn:hover {
    background: #243344;
    color: #fff;
}

.tool-btn.active {
    background: #2e86c1;
    border-color: #3498db;
    color: #fff;
}

/* Action buttons */
.action-btn {
    background: #1a2533;
    border: 1px solid #2a3a4a;
    color: #ccd;
    padding: 4px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}

.action-btn:hover {
    background: #243344;
    color: #fff;
}

.action-btn.primary {
    background: #1a6b3a;
    border-color: #2ecc71;
    color: #2ecc71;
}

.action-btn.primary:hover {
    background: #2ecc71;
    color: #fff;
}

.action-btn.accent {
    background: #1a4a6b;
    border-color: #3498db;
    color: #3498db;
}

.action-btn.accent:hover {
    background: #3498db;
    color: #fff;
}

.action-btn.danger {
    background: #4a1a1a;
    border-color: #e74c3c;
    color: #e74c3c;
}

.action-btn.danger:hover {
    background: #e74c3c;
    color: #fff;
}

/* --- Workspace --- */
#workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
}

#canvasWrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0e14;
    overflow: auto;
    padding: 16px;
}

#editorCanvas {
    border: 1px solid #1e2a38;
    cursor: default;
    max-width: 100%;
    max-height: 100%;
}

/* --- Side Panel --- */
#sidePanel {
    width: 220px;
    background: #111820;
    border-left: 1px solid #1e2a38;
    padding: 12px;
    overflow-y: auto;
    flex-shrink: 0;
}

#sidePanel h3 {
    font-size: 12px;
    color: #3498db;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 12px 0 6px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #1e2a38;
}

#sidePanel h3:first-child {
    margin-top: 0;
}

#sidePanel h3 span {
    color: #8899aa;
    font-weight: normal;
}

#pointList {
    max-height: 300px;
    overflow-y: auto;
}

.point-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    font-size: 11px;
    font-family: monospace;
    color: #aab;
    border-radius: 3px;
    cursor: default;
}

.point-item:hover {
    background: rgba(46, 134, 193, 0.1);
    color: #fff;
}

.point-idx {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: #e67e22;
    color: #fff;
    border-radius: 50%;
    font-size: 9px;
    flex-shrink: 0;
}

.point-del {
    margin-left: auto;
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    opacity: 0;
    transition: opacity 0.15s;
}

.point-item:hover .point-del {
    opacity: 1;
}

.point-del:hover {
    color: #ff6b6b;
}

#shooterInfo, #pathInfo, #helpInfo {
    font-size: 12px;
    color: #8899aa;
    line-height: 1.6;
}

#helpInfo p {
    margin: 2px 0;
    font-size: 11px;
}

#helpInfo b {
    color: #f1c40f;
}

/* --- Test Modal --- */
#testModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#testModalContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

#testCanvas {
    border: 1px solid #2a3a4a;
    max-width: 90vw;
    max-height: 80vh;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0e14;
}

::-webkit-scrollbar-thumb {
    background: #2a3a4a;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a4a5a;
}
