* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; }
body { background-color: #0f1115; color: #e2e8f0; font-family: 'PingFang SC', sans-serif; overflow: hidden; touch-action: none; }

#ui-layer { position: absolute; width: 100vw; height: 100vh; pointer-events: none; z-index: 10; }
.screen { position: absolute; width: 100%; height: 100%; pointer-events: auto; }

#map-screen { 
    background-color: #0f1115;
    background-image: radial-gradient(circle at center, rgba(30,37,50,0.8) 0%, #0f1115 100%), linear-gradient(rgba(14, 165, 233, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(14, 165, 233, 0.05) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
}
.map-title { text-align: center; margin-top: 5vh; font-size: 2rem; color: #0ea5e9; letter-spacing: 2px; }
.map-container { position: relative; width: 100%; height: 85vh; }
.map-background-svg { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; }
.topo-line { fill: none; stroke: #1e293b; stroke-width: 2; stroke-dasharray: 10 5; opacity: 0.5; }
.route-line { stroke: rgba(14, 165, 233, 0.5); stroke-width: 4; stroke-linecap: round; }
.node-ring { fill: #0f1115; stroke: rgba(14, 165, 233, 0.8); stroke-width: 2; stroke-dasharray: 4 4; animation: spinRing 10s linear infinite; transform-origin: center; }
@keyframes spinRing { to { transform: rotate(360deg); } }

.map-node { position: absolute; cursor: pointer; display: flex; flex-direction: column; align-items: center; transition: transform 0.2s; z-index: 1; transform: translate(-50%, -50%); }
.map-node:hover { transform: translate(-50%, -50%) scale(1.15); }
.node-dot { width: 18px; height: 18px; border-radius: 50%; margin-bottom: 8px; border: 2px solid #fff; }
.node-label { font-size: 0.9rem; font-weight: bold; background: rgba(0,0,0,0.6); padding: 6px 10px; border-radius: 6px; text-align: center; line-height: 1.3;}
small { color: #94a3b8; font-size: 0.75rem; font-weight: normal; }

.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: linear-gradient(to bottom, rgba(15,17,21,0.9), transparent); }
#level-title { font-size: 1.2rem; font-weight: bold; color: #fff; text-shadow: 0 2px 4px #000; }
button { padding: 8px 15px; background-color: #334155; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; pointer-events: auto; transition: background 0.2s; }
button:hover { background-color: #0ea5e9; }
button:active { transform: scale(0.95); }

.debug-btn { position: absolute; top: 70px; right: 20px; background-color: #ef4444; color: white; font-size: 0.8rem; padding: 6px 12px; border-radius: 4px; opacity: 0.5; z-index: 100; }
.debug-btn:hover { opacity: 1; background-color: #dc2626; }
#toast { position: absolute; bottom: 40px; right: 20px; background-color: #1e293b; border-left: 4px solid #10b981; padding: 15px 25px; border-radius: 6px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); display: none; text-align: left; line-height: 1.6; z-index: 50; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0;} to { transform: translateY(0); opacity: 1;} }

#game-container { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1; }