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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1a2e;
}

#controls {
    position: absolute;
    top: 10px;
    left: 60px;
    z-index: 1000;
    display: flex;
    gap: 15px;
    align-items: center;
}

#world-selector {
    background: rgba(30, 30, 46, 0.95);
    padding: 8px 12px;
    border-radius: 6px;
    color: #cdd6f4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#world-selector label {
    margin-right: 8px;
    font-size: 14px;
}

#world-select {
    background: #313244;
    color: #cdd6f4;
    border: 1px solid #45475a;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
}

#world-select:hover {
    border-color: #89b4fa;
}

#coordinates, #player-count {
    background: rgba(30, 30, 46, 0.95);
    padding: 8px 12px;
    border-radius: 6px;
    color: #cdd6f4;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#connection-status {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1000;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

#connection-status.connected {
    background: rgba(166, 227, 161, 0.9);
    color: #1e1e2e;
}

#connection-status.disconnected {
    background: rgba(243, 139, 168, 0.9);
    color: #1e1e2e;
}

#connection-status.connecting {
    background: rgba(249, 226, 175, 0.9);
    color: #1e1e2e;
}

.player-marker {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-arrow {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 16px solid #89b4fa;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
    transform-origin: center center;
}

.player-tooltip {
    background: rgba(30, 30, 46, 0.95);
    border: 1px solid #45475a;
    border-radius: 4px;
    padding: 4px 8px;
    color: #cdd6f4;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.leaflet-container {
    background: #1a1a2e;
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

.leaflet-control-zoom a {
    background: rgba(30, 30, 46, 0.95) !important;
    color: #cdd6f4 !important;
    border: none !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(49, 50, 68, 0.95) !important;
}

.leaflet-control-attribution {
    background: rgba(30, 30, 46, 0.8) !important;
    color: #6c7086 !important;
    font-size: 10px !important;
}

.leaflet-control-attribution a {
    color: #89b4fa !important;
}

/* Player List Panel */
#player-list-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: rgba(30, 30, 46, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    min-width: 180px;
    max-width: 250px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

#player-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #45475a;
    color: #cdd6f4;
    font-size: 14px;
    font-weight: 500;
}

#player-list-toggle {
    background: #313244;
    border: 1px solid #45475a;
    border-radius: 4px;
    color: #cdd6f4;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

#player-list-toggle:hover {
    background: #45475a;
}

#player-list-content {
    overflow-y: auto;
    max-height: 400px;
}

#player-list-content.collapsed {
    display: none;
}

#player-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#player-list li {
    padding: 8px 12px;
    color: #cdd6f4;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #313244;
    transition: background 0.15s;
}

#player-list li:last-child {
    border-bottom: none;
}

#player-list li:hover {
    background: #313244;
}

#player-list li .player-icon {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 10px solid #89b4fa;
    flex-shrink: 0;
}

#player-list li .player-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#player-list li .player-coords {
    font-size: 11px;
    color: #6c7086;
    white-space: nowrap;
}

.player-list-empty {
    padding: 12px;
    color: #6c7086;
    font-size: 13px;
    text-align: center;
}
