/* d:\tmpHTML\style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000000;
    color: #ffffff;
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    user-select: none;
}

canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

canvas:active {
    cursor: grabbing;
}

/* 顶部坐标栏 */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    pointer-events: none;
}

.coord-display {
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 16px;
    border-radius: 0 0 8px 8px;
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

.coord-label {
    color: #aaaaaa;
}

.coord-value {
    color: #ffffff;
    min-width: 60px;
}

/* 工具栏 */
.toolbar {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
    padding: 6px;
}

.right-toolbar {
    right: 4px;
}

.tool-btn {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #ffffff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.tool-btn:active {
    background: rgba(255, 255, 255, 0.25);
}

/* 毛玻璃面板通用样式 */
.glass-panel {
    background: rgba(22, 27, 34, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(48, 54, 61, 0.6);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

/* 操作提示 */
.tips {
    position: fixed;
    top: 50px;
    left: 20px;
    padding: 16px 20px;
    z-index: 100;
    min-width: 180px;
}

.tips-title {
    font-size: 14px;
    font-weight: 600;
    color: #58a6ff;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.tip-item {
    font-size: 12px;
    color: #8b949e;
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: #8b949e;
    font-size: 18px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f85149;
}

/* 统计托盘 */
.tray {
    position: fixed;
    bottom: 20px;
    right: 60px;
    z-index: 100;
    min-width: 220px;
    overflow: hidden;
}

.tray-header {
    padding: 12px 16px;
    background: rgba(48, 54, 61, 0.4);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    border-bottom: 1px solid rgba(48, 54, 61, 0.3);
}

.tray-title {
    font-size: 14px;
    font-weight: 600;
    color: #e6edf3;
}

.tray-toggle {
    font-size: 12px;
    color: #8b949e;
    transition: transform 0.3s ease;
}

.tray.collapsed .tray-toggle {
    transform: rotate(-90deg);
}

.tray-content {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
}

.tray.collapsed .tray-content {
    display: none;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.stat-label {
    color: #8b949e;
}

.stat-value {
    font-family: 'Consolas', monospace;
    font-weight: 600;
    font-size: 14px;
}

.stat-value.placed {
    color: #3fb950;
}

.stat-value.destroyed {
    color: #f85149;
}

.stat-value.net {
    color: #58a6ff;
}
